minotaurlogistics/ebay-account-api

1.0 2020-11-24 08:22 UTC

This package is auto-updated.

Last update: 2024-09-24 17:04:29 UTC


README

Build Status

Ebay Account Api

The Account API gives sellers the ability to configure their eBay seller accounts, including the seller's policies (the Fulfillment Policy, Payment Policy, and Return Policy), opt in and out of eBay seller programs, configure sales tax tables, and get account information. For details on the availability of the methods in this API, see Account API requirements and restrictions.

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: v1.6.0
  • Package version: 1.0
  • Build package: io.swagger.codegen.languages.PhpClientCodegen

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/minotaurlogistics/ebay-account-api.git"
    }
  ],
  "require": {
    "minotaurlogistics/ebay-account-api": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/SwaggerClient-php/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Regenerate Client

docker run --rm -v ${PWD}:/codegen/SwaggerClient-php swaggerapi/swagger-codegen-cli generate \
-i https://developer.ebay.com/api-docs/master/sell/account/openapi/2/sell_account_v1_oas2.json \ 
-o /codegen \
-l php \
--git-user-id minotaurlogistics --git-repo-id ebay-account-api \
--invoker-package 'Swagger\EbayAccountClient' \
--artifact-version 1.0 \
--api-package 'GeneratedApi'

Getting Started

Please follow the installation procedure and then run the following:

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

// Configure OAuth2 access token for authorization: Authorization Code
$config = Swagger\EbayAccountClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\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
);
$body = new \Swagger\EbayAccountClient\Model\FulfillmentPolicyRequest(); // \Swagger\EbayAccountClient\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;
}

?>

Documentation for API Endpoints

All URIs are relative to https://api.ebay.com/sell/account/v1

Documentation For Models

Documentation For Authorization

Authorization Code

Author