brandon14/ebay-sdk-php

View on GitHub
src/Sell/Account/V2/docs/Api/RateTableApi.md

Summary

Maintainability
Test Coverage
# TNT\Ebay\Sell\Account\V2\RateTableApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**getRateTable()**](RateTableApi.md#getRateTable) | **GET** /rate_table/{rate_table_id} | 
[**updateShippingCost()**](RateTableApi.md#updateShippingCost) | **POST** /rate_table/{rate_table_id}/update_shipping_cost | 


## `getRateTable()`

```php
getRateTable($rate_table_id): \TNT\Ebay\Sell\Account\V2\Model\RateTableDetails
```



This method retrieves an existing rate table identified by the <b>rate_table_id</b> path parameter.<br><br><b>getRateTable</b> currently supports the retrieval of rate tables for the following eBay marketplace IDs:<ul><li><code>EBAY_AU</code></li><li><code>EBAY_CA</code></li><li><code>EBAY_DE</code></li><li><code>EBAY_ES</code></li><li><code>EBAY_FR</code></li><li><code>EBAY_GB</code></li><li><code>EBAY_IT</code></li><li><code>EBAY_US</code></li></ul><span class=\"tablenote\"><b>Note:</b> To retrieve a list of all <b>rateTableId</b> values, issue a <a href=\"/api-docs/sell/account/resources/rate_table/methods/getRateTables \" target=\"_blank\">getRateTables</a> call (part of <a href=\"/api-docs/sell/account/static/overview.html \" target=\"_blank\">Account API V1</a>,) with no <b>countryCode</b> query parameter specifed. This will return a list of all shipping rate tables defined for each marketplace and their corresponding <b>rateTableId</b> values.</span><br/><br/> A successful call returns detailed information for the specified shipping rate table.

### Example

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


// Configure OAuth2 access token for authorization: api_auth
$config = TNT\Ebay\Sell\Account\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new TNT\Ebay\Sell\Account\V2\Api\RateTableApi(
    // 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
);
$rate_table_id = 'rate_table_id_example'; // string | The unique identifier for the shipping rate table. This identifier is generated by eBay when a shipping rate table is first created.<br/><br/><span class=\"tablenote\"><strong>Note:</strong> To retrieve a list of all <b>rateTableId</b> values, issue a <a href=\"/api-docs/sell/account/resources/rate_table/methods/getRateTables\" target=\"_blank\">getRateTables</a> call (part of <a href=\"/api-docs/sell/account/static/overview.html \" target=\"_blank\">Account API V1</a>,) with no <b>countryCode</b> query parameter specifed. This will return a list of all shipping rate tables defined for each marketplace and their corresponding <b>rateTableId</b> values.</span>

try {
    $result = $apiInstance->getRateTable($rate_table_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RateTableApi->getRateTable: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **rate_table_id** | **string**| The unique identifier for the shipping rate table. This identifier is generated by eBay when a shipping rate table is first created.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; To retrieve a list of all &lt;b&gt;rateTableId&lt;/b&gt; values, issue a &lt;a href&#x3D;\&quot;/api-docs/sell/account/resources/rate_table/methods/getRateTables\&quot; target&#x3D;\&quot;_blank\&quot;&gt;getRateTables&lt;/a&gt; call (part of &lt;a href&#x3D;\&quot;/api-docs/sell/account/static/overview.html \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Account API V1&lt;/a&gt;,) with no &lt;b&gt;countryCode&lt;/b&gt; query parameter specifed. This will return a list of all shipping rate tables defined for each marketplace and their corresponding &lt;b&gt;rateTableId&lt;/b&gt; values.&lt;/span&gt; |

### Return type

[**\TNT\Ebay\Sell\Account\V2\Model\RateTableDetails**](../Model/RateTableDetails.md)

### Authorization

[api_auth](../../README.md#api_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `updateShippingCost()`

```php
updateShippingCost($rate_table_id, $rate_table_update)
```



This method allows sellers to update <b>shippingCost</b> and/or <b>additionalCost</b> information for an existing shipping rate table identified by the <b>rate_table_id</b> path parameter.<br/><br/><span class=\"tablenote\"><b>Note:</b> To retrieve a list of all <b>rateTableId</b> values, issue a <a href=\"/api-docs/sell/account/resources/rate_table/methods/getRateTables \" target=\"_blank\">getRateTables</a> call (part of <a href=\"/api-docs/sell/account/static/overview.html \" target=\"_blank\">Account API V1</a>,) with no <b>countryCode</b> query parameter specifed. This will return a list of all shipping rate tables and corresponding <b>rateTableId</b> values.</span><br/><br/>A successful call returns an HTTP status code of <b>204 No Content</b>.

### Example

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


// Configure OAuth2 access token for authorization: api_auth
$config = TNT\Ebay\Sell\Account\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new TNT\Ebay\Sell\Account\V2\Api\RateTableApi(
    // 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
);
$rate_table_id = 'rate_table_id_example'; // string | The unique identifier for the shipping rate table. This identifier is generated by eBay when a shipping rate table is first created.<br/><br/><span class=\"tablenote\"><strong>Note:</strong> To retrieve a list of all <b>rateTableId</b> values, issue a <a href=\"/api-docs/sell/account/resources/rate_table/methods/getRateTables\" target=\"_blank\">getRateTables</a> call (part of <a href=\"/api-docs/sell/account/static/overview.html \" target=\"_blank\">Account API V1</a>,) with no <b>countryCode</b> query parameter specifed. This will return a list of all shipping rate tables defined for each marketplace and their corresponding <b>rateTableId</b> values.
$rate_table_update = new \TNT\Ebay\Sell\Account\V2\Model\RateTableUpdate(); // \TNT\Ebay\Sell\Account\V2\Model\RateTableUpdate | Request to update the shipping costs for the identified shipping rate table.

try {
    $apiInstance->updateShippingCost($rate_table_id, $rate_table_update);
} catch (Exception $e) {
    echo 'Exception when calling RateTableApi->updateShippingCost: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **rate_table_id** | **string**| The unique identifier for the shipping rate table. This identifier is generated by eBay when a shipping rate table is first created.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; To retrieve a list of all &lt;b&gt;rateTableId&lt;/b&gt; values, issue a &lt;a href&#x3D;\&quot;/api-docs/sell/account/resources/rate_table/methods/getRateTables\&quot; target&#x3D;\&quot;_blank\&quot;&gt;getRateTables&lt;/a&gt; call (part of &lt;a href&#x3D;\&quot;/api-docs/sell/account/static/overview.html \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Account API V1&lt;/a&gt;,) with no &lt;b&gt;countryCode&lt;/b&gt; query parameter specifed. This will return a list of all shipping rate tables defined for each marketplace and their corresponding &lt;b&gt;rateTableId&lt;/b&gt; values. |
 **rate_table_update** | [**\TNT\Ebay\Sell\Account\V2\Model\RateTableUpdate**](../Model/RateTableUpdate.md)| Request to update the shipping costs for the identified shipping rate table. | [optional]

### Return type

void (empty response body)

### Authorization

[api_auth](../../README.md#api_auth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)