cdma-numiscorner/ebay-account-api

<b>账户API</b> 允许卖家配置他们的eBay卖家账户,包括卖家的政策(履约政策、支付政策、退货政策)、选择加入或退出eBay卖家计划、配置销售税表以及获取账户信息。<br><br>详细信息

1.0 2020-12-30 10:11 UTC

This package is auto-updated.

Last update: 2024-09-29 05:22:34 UTC


README

<b>账户API</b> 允许卖家配置他们的eBay卖家账户,包括卖家的政策(履约政策、支付政策、退货政策)、选择加入或退出eBay卖家计划、配置销售税表以及获取账户信息。

有关此API中方法可用性的详细信息,请参阅 <a href="/api-docs/sell/account/overview.html#requirements">账户API要求与限制</a>。

安装与使用

要求

PHP 7.2 及更高版本。

Composer

要通过Composer安装绑定,请将以下内容添加到 composer.json

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/cdma-numiscorner/EbayAccountApi.git"
    }
  ],
  "require": {
    "cdma-numiscorner/EbayAccountApi": "*@dev"
  }
}

然后运行 composer install

手动安装

下载文件并包含 autoload.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\EbayAccountClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\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
);
$fulfillment_policy_request = new \OpenAPI\EbayAccountClient\Model\FulfillmentPolicyRequest(); // \OpenAPI\EbayAccountClient\Model\FulfillmentPolicyRequest | Request to create a seller account fulfillment policy.

try {
    $result = $apiInstance->createFulfillmentPolicy($fulfillment_policy_request);
    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

模型

授权

api_auth

测试

要运行测试,请使用

composer install
vendor/bin/phpunit

作者

关于此包

此PHP包是由 OpenAPI Generator 项目自动生成的

  • API版本: v1.6.0
    • 包版本: 1.0
  • 构建包: org.openapitools.codegen.languages.PhpClientCodegen