cdma-numiscorner / ebay-inventory-api
库存API用于创建和管理库存,然后在该eBay市场上发布和管理此库存。此API中还有将符合条件的、活跃的eBay商品列表转换为库存API模型的方法。
1.2
2023-01-24 13:42 UTC
Requires
- php: >=7.2
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.12
- phpunit/phpunit: ^8.0 || ^9.0
This package is auto-updated.
Last update: 2024-09-26 19:39:29 UTC
README
库存API用于创建和管理库存,然后在该eBay市场上发布和管理此库存。此API中还有将符合条件的、活跃的eBay商品列表转换为库存API模型的方法。
安装与使用
要求
PHP 7.2 及更高版本。
Composer
要使用Composer安装绑定,请将以下内容添加到 composer.json
{ "repositories": [ { "type": "vcs", "url": "https://github.com/cdma-numiscorner/EbayInventoryApi.git" } ], "require": { "cdma-numiscorner/EbayInventoryApi": "*@dev" } }
然后运行 composer install
重新生成客户端
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');
入门
请按照 安装过程 进行操作,然后运行以下命令
<?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端点
所有URI均相对于 https://api.ebay.com/sell/inventory/v1
模型
- 地址
- 金额
- 可用性
- 可用性分布
- 全部可用性
- 基本响应
- 最佳出价
- 批量eBay出价详情
- 批量获取库存项
- 批量获取库存项响应
- 批量库存项
- 批量库存项响应
- 批量迁移商品
- 批量迁移商品响应
- 批量出价
- 批量出价响应
- 批量价格数量
- 批量价格数量响应
- 批量发布响应
- 慈善
- 兼容性
- 兼容产品
- 尺寸
- eBay出价详情
- eBay出价详情
- eBay出价详情
- 错误
- 错误参数
- 扩展生产者责任
- 费用
- 费用摘要
- 费用摘要响应
- 格式分配
- 地理坐标
- 获取库存项
- 获取库存项响应
- 间隔
- 库存项
- 库存项组
- 库存项列表
- 库存项响应
- 库存项与SKU地区
- 库存项与SKU地区组键
- 库存项与SKU地区组ID
- 库存项列表
- 库存位置
- 库存位置完整信息
- 库存位置响应
- 列表详情
- 列表政策
- 位置
- 位置详情
- 位置响应
- 迁移列表
- 迁移列表响应
- 名称值列表
- 出价键与ID
- 出价键与ID列表
- 出价价格数量
- 出价响应
- 出价响应与列表ID
- 出价SKU响应
- 出价列表
- 营业时间
- 包装重量和尺寸
- 门店取货可用性
- 价格数量
- 价格数量响应
- 定价摘要
- 产品
- 产品家族属性
- 产品标识符
- 通过库存项组请求发布
- 发布响应
- 送到位置可用性
- 送到位置全部可用性
- 覆盖运费
- 特殊营业时间
- 规格
- 税费
- 时间长度
- 变化
- 版本
- 重量
- 通过库存项组请求撤回
- 撤回响应
授权
api_auth
- 类型:
OAuth
- 流程:
accessCode
- 授权URL:
https://auth.ebay.com/oauth2/authorize
- 作用域:
测试
要运行测试,请使用
composer install vendor/bin/phpunit
作者
关于此包的说明
本PHP包是由OpenAPI Generator项目自动生成的
- API版本:
1.16.1
- 包版本:
1.0
- 包版本:
- 构建包:
org.openapitools.codegen.languages.PhpClientCodegen