zvps/ebay-sell-metadata-php-client

元数据API提供了检索不同eBay市场配置详情的操作。除了市场信息外,API还提供了帮助卖家在eBay上列出商品的信息操作。

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

This package is auto-updated.

Last update: 2024-09-29 06:03:05 UTC


README

元数据API提供了检索不同eBay市场配置详情的操作。除了市场信息外,API还提供了帮助卖家在eBay上列出商品的信息操作。

安装与使用

要求

PHP 7.2及以后版本。

Composer

要使用Composer安装绑定,请在composer.json中添加以下内容

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


$apiInstance = new Ebay\Sell\Metadata\Api\CountryApi(
    // 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
);
$country_code = 'country_code_example'; // string | This path parameter specifies the two-letter ISO 3166 country code for the country whose jurisdictions you want to retrieve. eBay provides sales tax jurisdiction information for Canada and the United States.Valid values for this path parameter are CA and US.

try {
    $result = $apiInstance->getSalesTaxJurisdictions($country_code);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CountryApi->getSalesTaxJurisdictions: ', $e->getMessage(), PHP_EOL;
}

API端点

所有URI均相对于https://api.ebay.com/sell/metadata/v1

模型

授权

授权代码

客户端凭据

测试

要运行测试,请使用

composer install
vendor/bin/phpunit

作者

关于此包

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

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