minotaurlogistics / ebay-account-api
1.0
2020-11-24 08:22 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-09-24 17:04:29 UTC
README
EBay账户API
账户API为卖家提供了配置其eBay卖家账户的能力,包括卖家的政策(履行政策、支付政策和退货政策)、选择加入或退出eBay卖家计划、配置销售税表以及获取账户信息。有关此API中方法可用性的详细信息,请参阅账户API的要求和限制。
此PHP软件包由Swagger Codegen项目自动生成
- API版本:v1.6.0
- 软件包版本:1.0
- 构建软件包:io.swagger.codegen.languages.PhpClientCodegen
要求
PHP 5.5及以后版本
安装与使用
Composer
要通过Composer安装绑定,请将以下内容添加到composer.json
{
"repositories": [
{
"type": "git",
"url": "https://github.com/minotaurlogistics/ebay-account-api.git"
}
],
"require": {
"minotaurlogistics/ebay-account-api": "*@dev"
}
}
然后运行composer install
手动安装
下载文件并包含autoload.php
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
重新生成客户端
docker run --rm -v ${PWD}:/codegen/SwaggerClient-php swaggerapi/swagger-codegen-cli generate \
-i https://developer.ebay.com/api-docs/master/sell/account/openapi/2/sell_account_v1_oas2.json \
-o /codegen \
-l php \
--git-user-id minotaurlogistics --git-repo-id ebay-account-api \
--invoker-package 'Swagger\EbayAccountClient' \
--artifact-version 1.0 \
--api-package 'GeneratedApi'
入门
请按照安装程序进行操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: Authorization Code $config = Swagger\EbayAccountClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Swagger\EbayAccountClient\Api\FulfillmentPolicyApi( // 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 ); $body = new \Swagger\EbayAccountClient\Model\FulfillmentPolicyRequest(); // \Swagger\EbayAccountClient\Model\FulfillmentPolicyRequest | Request to create a seller account fulfillment policy. try { $result = $apiInstance->createFulfillmentPolicy($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling FulfillmentPolicyApi->createFulfillmentPolicy: ', $e->getMessage(), PHP_EOL; } ?>
API端点文档
所有URI都是相对于https://api.ebay.com/sell/account/v1
模型文档
- 金额
- 类别类型
- 存款
- 错误
- 错误参数
- 履行政策
- 履行政策请求
- 履行政策响应
- 国际退货覆盖类型
- KYC检查
- KYC响应
- 支付方式
- 支付政策
- 支付政策请求
- 支付政策响应
- 支付计划上线响应
- 支付计划上线步骤
- 支付计划响应
- 计划
- 计划
- 费率表
- 费率表响应
- 收款账户引用
- 地区
- 地区集
- 退货政策
- 退货政策请求
- 退货政策响应
- 销售税
- 销售税基础
- 销售税
- 销售限制
- 销售权限
- 设置履行政策响应
- 设置支付政策响应
- 设置退货政策响应
- 配送选项
- 配送服务
- 时间长度
授权文档
授权码
- 类型: OAuth
- 流程: accessCode
- 授权URL: https://auth.ebay.com/oauth2/authorize
- 作用域:
- https://api.ebay.com/oauth/api_scope/sell.account.readonly: 查看您的账户设置
- https://api.ebay.com/oauth/api_scope/sell.account: 查看和管理您的账户设置