macropage/sdk-ebay-rest-account

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

dev-master 2019-03-04 00:27 UTC

This package is auto-updated.

Last update: 2024-09-23 03:07:01 UTC


README

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

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

此PHP软件包由 OpenAPI Generator 项目自动生成

  • API版本:v1.3.0
  • 软件包版本:2.3.2
  • 构建软件包:org.openapitools.codegen.languages.PhpClientCodegen

需求

PHP 5.5 及更高版本

安装和用法

Composer

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

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/macropage/sdk-ebay-rest-account.git"
    }
  ],
  "require": {
    "macropage/sdk-ebay-rest-account": "*@dev"
  }
}

然后运行 composer install

手动安装

下载文件并包含 autoload.php

    require_once('/path/to/sdk-ebay-rest-account/vendor/autoload.php');

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门指南

请遵循 安装和用法过程,然后运行以下命令

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: api_auth
$config = macropage\SDKs\ebay\rest\account\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new macropage\SDKs\ebay\rest\account\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
);
$fulfillmentPolicyRequest = new \macropage\SDKs\ebay\rest\account\Model\FulfillmentPolicyRequest(); // \macropage\SDKs\ebay\rest\account\Model\FulfillmentPolicyRequest | Request to create a seller account fulfillment policy.

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

作者