christian71-stack / ebay-account-api
dev-master
2023-12-23 12:26 UTC
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
This package is not auto-updated.
Last update: 2024-09-29 14:28:13 UTC
README
账户API 允许卖家配置他们的eBay卖家账户,包括卖家的政策(eBay商业政策和卖家定义的定制政策)、选择加入或退出eBay卖家计划、配置销售税表以及获取账户信息。
有关此API中方法可用性的详细信息,请参阅 <a href="/api-docs/sell/account/overview.html#requirements">账户API要求和限制。
此PHP包由 Swagger Codegen 项目自动生成
- API版本:v1.9.1
- 构建包:io.swagger.codegen.v3.generators.php.PhpClientCodegen
要求
PHP 5.5 及以上
安装与使用
Composer
要通过 Composer 安装绑定,请将以下内容添加到 composer.json
{
"repositories": [
{
"type": "git",
"url": "https://github.com/christian71-stack/ebay-account-api.git"
}
],
"require": {
"christian71-stack/ebay-account-api": "*@dev"
}
}
然后运行 composer install
手动安装
下载文件并包含 autoload.php
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门
请按照 安装过程 操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: api_auth $config = Ebay\Sell\Account\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Ebay\Sell\Account\Api\AdvertisingEligibilityApi( // 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 ); $x_ebay_c_marketplace_id = "x_ebay_c_marketplace_id_example"; // string | The unique identifier of the eBay marketplace for which the seller eligibility status shall be checked. This header is required or the call will fail.<br><br>See the <a href=\"/api-docs/sell/account/types/ba:MarketplaceIdEnum \" target=\"_blank \">MarketplaceIdEnum</a> type for the supported marketplace ID values. $program_types = "program_types_example"; // string | A comma-separated list of eBay advertising programs for which eligibility status will be returned.<br><br> See the <a href=\"/api-docs/sell/account/types/plser:AdvertisingProgramEnum\" target=\"_blank\"> AdvertisingProgramEnum</a> type for a list of supported values.<br><br>If no programs are specified, the results will be returned for all programs. try { $result = $apiInstance->getAdvertisingEligibility($x_ebay_c_marketplace_id, $program_types); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdvertisingEligibilityApi->getAdvertisingEligibility: ', $e->getMessage(), PHP_EOL; } ?>
API端点文档
所有URI都是相对于 https://api.ebay.com{basePath}
模型文档
- 金额
- 类别类型
- 紧凑型自定义策略响应
- 自定义策略
- 自定义策略创建请求
- 自定义策略请求
- 自定义策略响应
- 押金
- 错误
- 错误参数
- 履行策略
- 履行策略请求
- 履行策略响应
- 国际退货覆盖类型
- 身份验证检查
- 身份验证响应
- 支付方式
- 支付策略
- 支付策略请求
- 支付策略响应
- 支付计划加入响应
- 支付计划加入步骤
- 支付计划响应
- 计划
- 计划
- 费率表
- 费率表响应
- 收款人账户引用
- 地区
- 地区集
- 退货政策
- 退货政策请求
- 退货政策响应
- 销售税
- 销售税基数
- 销售税
- 卖家资格多计划响应
- 卖家资格响应
- 销售限制
- 销售权限
- 设置履行策略响应
- 设置支付策略响应
- 设置退货策略响应
- 运输选项
- 运输服务
- 订阅
- 订阅响应
- 时间持续
授权文档
api_auth
- 类型: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:查看和管理您的账户设置