zvps/ebay-sell-metadata-php-client

The Metadata API has operations that retrieve configuration details pertaining to the different eBay marketplaces. In addition to marketplace information, the API also has operations that get information that helps sellers list items on eBay.

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

This package is auto-updated.

Last update: 2024-04-29 04:34:23 UTC


README

The Metadata API has operations that retrieve configuration details pertaining to the different eBay marketplaces. In addition to marketplace information, the API also has operations that get information that helps sellers list items on eBay.

Installation & Usage

Requirements

PHP 7.2 and later.

Composer

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

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github/zvps/ebay-sell-metadata-php-client.git"
    }
  ],
  "require": {
    "zvps/ebay-sell-metadata-php-client": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

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: 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 Endpoints

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

Class Method HTTP request Description
CountryApi getSalesTaxJurisdictions GET /country/{countryCode}/sales_tax_jurisdiction
MarketplaceApi getAutomotivePartsCompatibilityPolicies GET /marketplace/{marketplace_id}/get_automotive_parts_compatibility_policies
MarketplaceApi getItemConditionPolicies GET /marketplace/{marketplace_id}/get_item_condition_policies
MarketplaceApi getListingStructurePolicies GET /marketplace/{marketplace_id}/get_listing_structure_policies
MarketplaceApi getNegotiatedPricePolicies GET /marketplace/{marketplace_id}/get_negotiated_price_policies
MarketplaceApi getProductAdoptionPolicies GET /marketplace/{marketplace_id}/get_product_adoption_policies
MarketplaceApi getReturnPolicies GET /marketplace/{marketplace_id}/get_return_policies

Models

Authorization

Authorization Code

Client Credentials

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: v1.4.1
    • Package version: 5.0.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen