zvps / ebay-sell-finances-php-client

此API用于检索卖家的付款和与这些付款相关的货币交易详情。

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

This package is auto-updated.

Last update: 2024-09-29 05:56:46 UTC


README

此API用于检索卖家的付款和与这些付款相关的货币交易详情。

安装和用法

需求

PHP 7.2及更高版本。

Composer

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

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github/zvps/ebay-sell-finances-php-client.git"
    }
  ],
  "require": {
    "zvps/ebay-sell-finances-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\Finances\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Ebay\Sell\Finances\Api\PayoutApi(
    // 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
);
$payout_id = 'payout_id_example'; // string | The unique identfier of the payout is passed in as a path parameter at the end of the call URI. The getPayouts method can be used to retrieve the unique identifier of a payout, or the user can check Seller Hub to get the payout ID.

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

API端点

所有URI均相对于 https://apiz.ebay.com/sell/finances/v1

模型

授权

授权码

  • 类型: OAuth
  • 流程: accessCode
  • 授权URL: https://auth.ebay.com/oauth2/authorize
  • 作用域:

测试

要运行测试,请使用

composer install
vendor/bin/phpunit

作者

关于此包

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

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