cdma-numiscorner/ebay-inventory-api
最新稳定版本:1.2
Composer 安装命令:
composer require cdma-numiscorner/ebay-inventory-api
包简介
The Inventory API is used to create and manage inventory, and then to publish and manage this inventory on an eBay marketplace. There are also methods in this API that will convert eligible, active eBay listings into the Inventory API model.
README 文档
README
The Inventory API is used to create and manage inventory, and then to publish and manage this inventory on an eBay marketplace. There are also methods in this API that will convert eligible, active eBay listings into the Inventory API model.
Installation & Usage
Requirements
PHP 7.2 and later.
Composer
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/cdma-numiscorner/EbayInventoryApi.git"
}
],
"require": {
"cdma-numiscorner/EbayInventoryApi": "*@dev"
}
}
Then run composer install
Regenerate Client
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli:v5.0.1 generate -i https://developer.ebay.com/api-docs/master/sell/inventory/openapi/3/sell_inventory_v1_oas3.yaml -g php --git-user-id cdma-numiscorner --git-host github.com --git-repo-id ebay-inventory-api --invoker-package 'OpenAPI\EbayInventoryClient' --artifact-version 1.0 --release-note "Initial commit" -o /local ```
### Manual Installation
Download the files and include `autoload.php`:
```php
<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: api_auth $config = OpenAPI\EbayInventoryClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new OpenAPI\EbayInventoryClient\Api\InventoryItemApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $bulk_inventory_item = new \OpenAPI\EbayInventoryClient\Model\BulkInventoryItem(); // \OpenAPI\EbayInventoryClient\Model\BulkInventoryItem | Details of the inventories with sku and locale try { $result = $apiInstance->bulkCreateOrReplaceInventoryItem($bulk_inventory_item); print_r($result); } catch (Exception $e) { echo 'Exception when calling InventoryItemApi->bulkCreateOrReplaceInventoryItem: ', $e->getMessage(), PHP_EOL; }
API Endpoints
All URIs are relative to https://api.ebay.com/sell/inventory/v1
| Class | Method | HTTP request | Description |
|---|---|---|---|
| InventoryItemApi | bulkCreateOrReplaceInventoryItem | POST /bulk_create_or_replace_inventory_item | |
| InventoryItemApi | bulkGetInventoryItem | POST /bulk_get_inventory_item | |
| InventoryItemApi | bulkUpdatePriceQuantity | POST /bulk_update_price_quantity | |
| InventoryItemApi | createOrReplaceInventoryItem | PUT /inventory_item/{sku} | |
| InventoryItemApi | deleteInventoryItem | DELETE /inventory_item/{sku} | |
| InventoryItemApi | getInventoryItem | GET /inventory_item/{sku} | |
| InventoryItemApi | getInventoryItems | GET /inventory_item | |
| InventoryItemGroupApi | createOrReplaceInventoryItemGroup | PUT /inventory_item_group/{inventoryItemGroupKey} | |
| InventoryItemGroupApi | deleteInventoryItemGroup | DELETE /inventory_item_group/{inventoryItemGroupKey} | |
| InventoryItemGroupApi | getInventoryItemGroup | GET /inventory_item_group/{inventoryItemGroupKey} | |
| ListingApi | bulkMigrateListing | POST /bulk_migrate_listing | |
| LocationApi | createInventoryLocation | POST /location/{merchantLocationKey} | |
| LocationApi | deleteInventoryLocation | DELETE /location/{merchantLocationKey} | |
| LocationApi | disableInventoryLocation | POST /location/{merchantLocationKey}/disable | |
| LocationApi | enableInventoryLocation | POST /location/{merchantLocationKey}/enable | |
| LocationApi | getInventoryLocation | GET /location/{merchantLocationKey} | |
| LocationApi | getInventoryLocations | GET /location | |
| LocationApi | updateInventoryLocation | POST /location/{merchantLocationKey}/update_location_details | |
| OfferApi | bulkCreateOffer | POST /bulk_create_offer | |
| OfferApi | bulkPublishOffer | POST /bulk_publish_offer | |
| OfferApi | createOffer | POST /offer | |
| OfferApi | deleteOffer | DELETE /offer/{offerId} | |
| OfferApi | getListingFees | POST /offer/get_listing_fees | |
| OfferApi | getOffer | GET /offer/{offerId} | |
| OfferApi | getOffers | GET /offer | |
| OfferApi | publishOffer | POST /offer/{offerId}/publish/ | |
| OfferApi | publishOfferByInventoryItemGroup | POST /offer/publish_by_inventory_item_group/ | |
| OfferApi | updateOffer | PUT /offer/{offerId} | |
| OfferApi | withdrawOffer | POST /offer/{offerId}/withdraw | |
| OfferApi | withdrawOfferByInventoryItemGroup | POST /offer/withdraw_by_inventory_item_group | |
| ProductCompatibilityApi | createOrReplaceProductCompatibility | PUT /inventory_item/{sku}/product_compatibility | |
| ProductCompatibilityApi | deleteProductCompatibility | DELETE /inventory_item/{sku}/product_compatibility | |
| ProductCompatibilityApi | getProductCompatibility | GET /inventory_item/{sku}/product_compatibility |
Models
- Address
- Amount
- Availability
- AvailabilityDistribution
- AvailabilityWithAll
- BaseResponse
- BestOffer
- BulkEbayOfferDetailsWithKeys
- BulkGetInventoryItem
- BulkGetInventoryItemResponse
- BulkInventoryItem
- BulkInventoryItemResponse
- BulkMigrateListing
- BulkMigrateListingResponse
- BulkOffer
- BulkOfferResponse
- BulkPriceQuantity
- BulkPriceQuantityResponse
- BulkPublishResponse
- Charity
- Compatibility
- CompatibleProduct
- Dimension
- EbayOfferDetailsWithAll
- EbayOfferDetailsWithId
- EbayOfferDetailsWithKeys
- Error
- ErrorParameter
- ExtendedProducerResponsibility
- Fee
- FeeSummary
- FeesSummaryResponse
- FormatAllocation
- GeoCoordinates
- GetInventoryItem
- GetInventoryItemResponse
- Interval
- InventoryItem
- InventoryItemGroup
- InventoryItemListing
- InventoryItemResponse
- InventoryItemWithSkuLocale
- InventoryItemWithSkuLocaleGroupKeys
- InventoryItemWithSkuLocaleGroupid
- InventoryItems
- InventoryLocation
- InventoryLocationFull
- InventoryLocationResponse
- ListingDetails
- ListingPolicies
- Location
- LocationDetails
- LocationResponse
- MigrateListing
- MigrateListingResponse
- NameValueList
- OfferKeyWithId
- OfferKeysWithId
- OfferPriceQuantity
- OfferResponse
- OfferResponseWithListingId
- OfferSkuResponse
- Offers
- OperatingHours
- PackageWeightAndSize
- PickupAtLocationAvailability
- PriceQuantity
- PriceQuantityResponse
- PricingSummary
- Product
- ProductFamilyProperties
- ProductIdentifier
- PublishByInventoryItemGroupRequest
- PublishResponse
- ShipToLocationAvailability
- ShipToLocationAvailabilityWithAll
- ShippingCostOverride
- SpecialHours
- Specification
- Tax
- TimeDuration
- VariesBy
- Version
- Weight
- WithdrawByInventoryItemGroupRequest
- WithdrawResponse
Authorization
api_auth
- Type:
OAuth - Flow:
accessCode - Authorization URL:
https://auth.ebay.com/oauth2/authorize - Scopes:
- https://api.ebay.com/oauth/api_scope/sell.inventory: View and manage your inventory and offers
- https://api.ebay.com/oauth/api_scope/sell.inventory.readonly: View your inventory and offers
Tests
To run the tests, use:
composer install vendor/bin/phpunit
Author
About this package
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
1.16.1- Package version:
1.0
- Package version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen
统计信息
- 总下载量: 1.74k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: unlicense
- 更新时间: 2020-12-24