zvps/ebay-sell-account-php-client

账户API允许卖家配置其eBay卖家账户,包括卖家的政策(履行政策、支付政策、退货政策)、选择加入或退出eBay卖家计划、配置销售税表以及获取账户信息。有关此API中方法可用性的详细信息,请参阅账户API要求和限制。

dev-main 2021-07-30 16:32 UTC

This package is auto-updated.

Last update: 2024-09-29 05:49:10 UTC


README

账户API允许卖家配置其eBay卖家账户,包括卖家的政策(履行政策、支付政策、退货政策)、选择加入或退出eBay卖家计划、配置销售税表以及获取账户信息。有关此API中方法可用性的详细信息,请参阅账户API要求和限制。

安装与使用

要求

PHP 7.2及更高版本。

Composer

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

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github/zvps/ebay-sell-account-php-client.git"
    }
  ],
  "require": {
    "zvps/ebay-sell-account-php-client": "*@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: Authorization Code
$config = Ebay\Sell\Account\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Ebay\Sell\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
);
$body = new \Ebay\Sell\Account\Model\FulfillmentPolicyRequest(); // \Ebay\Sell\Account\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

模型

授权

授权码

测试

要运行测试,请使用

composer install
vendor/bin/phpunit

作者

关于此包

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

  • API版本: v1.6.3
    • 包版本: 5.0.0
  • 构建包: org.openapitools.codegen.languages.PhpClientCodegen