Skip to content

Latest commit

 

History

History
68 lines (44 loc) · 2.75 KB

CountryApi.md

File metadata and controls

68 lines (44 loc) · 2.75 KB

Ebay\Sell\Metadata\CountryApi

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

Method HTTP request Description
getSalesTaxJurisdictions() GET /country/{countryCode}/sales_tax_jurisdiction

getSalesTaxJurisdictions()

getSalesTaxJurisdictions($country_code): \Ebay\Sell\Metadata\Model\SalesTaxJurisdictions

This method retrieves all the sales tax jurisdictions for the country that you specify in the countryCode path parameter. Countries with valid sales tax jurisdictions are Canada and the US. The response from this call tells you the jurisdictions for which a seller can configure tax tables. Although setting up tax tables is optional, you can use the createOrReplaceSalesTax in the Account API call to configure the tax tables for the jurisdictions you sell to.

Example

<?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;
}

Parameters

Name Type Description Notes
country_code 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.

Return type

\Ebay\Sell\Metadata\Model\SalesTaxJurisdictions

Authorization

[Client Credentials](../../README.md#Client Credentials)

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]