# Sylius\TaxRateApi

Resource &#39;TaxRate&#39; operations.

All URIs are relative to http://localhost, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**syliusApiAdminTaxRateDelete()**](TaxRateApi.md#syliusApiAdminTaxRateDelete) | **DELETE** /api/v2/admin/tax-rates/{code} | Removes the TaxRate resource. |
| [**syliusApiAdminTaxRateGet()**](TaxRateApi.md#syliusApiAdminTaxRateGet) | **GET** /api/v2/admin/tax-rates/{code} | Retrieves a TaxRate resource. |
| [**syliusApiAdminTaxRateGetCollection()**](TaxRateApi.md#syliusApiAdminTaxRateGetCollection) | **GET** /api/v2/admin/tax-rates | Retrieves the collection of TaxRate resources. |
| [**syliusApiAdminTaxRatePost()**](TaxRateApi.md#syliusApiAdminTaxRatePost) | **POST** /api/v2/admin/tax-rates | Creates a TaxRate resource. |
| [**syliusApiAdminTaxRatePut()**](TaxRateApi.md#syliusApiAdminTaxRatePut) | **PUT** /api/v2/admin/tax-rates/{code} | Replaces the TaxRate resource. |


## `syliusApiAdminTaxRateDelete()`

```php
syliusApiAdminTaxRateDelete($code, $accept_language)
```

Removes the TaxRate resource.

Removes the TaxRate resource.

### Example

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


// Configure Bearer (JWT) authorization: JWT
$config = Sylius\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Sylius\Api\TaxRateApi(
    // 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
);
$code = 'code_example'; // string | TaxRate identifier
$accept_language = 'accept_language_example'; // string | Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop.

try {
    $apiInstance->syliusApiAdminTaxRateDelete($code, $accept_language);
} catch (Exception $e) {
    echo 'Exception when calling TaxRateApi->syliusApiAdminTaxRateDelete: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| TaxRate identifier | |
| **accept_language** | **string**| Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop. | [optional] |

### Return type

void (empty response body)

### Authorization

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

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/ld+json`, `application/problem+json`, `application/json`

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

## `syliusApiAdminTaxRateGet()`

```php
syliusApiAdminTaxRateGet($code, $accept_language): \Sylius\Model\TaxRateJsonldSyliusAdminTaxRateShow
```

Retrieves a TaxRate resource.

Retrieves a TaxRate resource.

### Example

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


// Configure Bearer (JWT) authorization: JWT
$config = Sylius\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Sylius\Api\TaxRateApi(
    // 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
);
$code = 'code_example'; // string | TaxRate identifier
$accept_language = 'accept_language_example'; // string | Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop.

try {
    $result = $apiInstance->syliusApiAdminTaxRateGet($code, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TaxRateApi->syliusApiAdminTaxRateGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| TaxRate identifier | |
| **accept_language** | **string**| Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop. | [optional] |

### Return type

[**\Sylius\Model\TaxRateJsonldSyliusAdminTaxRateShow**](../Model/TaxRateJsonldSyliusAdminTaxRateShow.md)

### Authorization

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

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/ld+json`, `application/json`, `application/problem+json`

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

## `syliusApiAdminTaxRateGetCollection()`

```php
syliusApiAdminTaxRateGetCollection($page, $items_per_page, $start_date_before, $start_date_strictly_before, $start_date_after, $start_date_strictly_after, $end_date_before, $end_date_strictly_before, $end_date_after, $end_date_strictly_after, $accept_language): \Sylius\Model\SyliusApiAdminTaxRateGetCollection200Response
```

Retrieves the collection of TaxRate resources.

Retrieves the collection of TaxRate resources.

### Example

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


// Configure Bearer (JWT) authorization: JWT
$config = Sylius\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Sylius\Api\TaxRateApi(
    // 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
);
$page = 1; // int | The collection page number
$items_per_page = 30; // int | The number of items per page
$start_date_before = 'start_date_before_example'; // string | 
$start_date_strictly_before = 'start_date_strictly_before_example'; // string | 
$start_date_after = 'start_date_after_example'; // string | 
$start_date_strictly_after = 'start_date_strictly_after_example'; // string | 
$end_date_before = 'end_date_before_example'; // string | 
$end_date_strictly_before = 'end_date_strictly_before_example'; // string | 
$end_date_after = 'end_date_after_example'; // string | 
$end_date_strictly_after = 'end_date_strictly_after_example'; // string | 
$accept_language = 'accept_language_example'; // string | Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop.

try {
    $result = $apiInstance->syliusApiAdminTaxRateGetCollection($page, $items_per_page, $start_date_before, $start_date_strictly_before, $start_date_after, $start_date_strictly_after, $end_date_before, $end_date_strictly_before, $end_date_after, $end_date_strictly_after, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TaxRateApi->syliusApiAdminTaxRateGetCollection: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **page** | **int**| The collection page number | [optional] [default to 1] |
| **items_per_page** | **int**| The number of items per page | [optional] [default to 30] |
| **start_date_before** | **string**|  | [optional] |
| **start_date_strictly_before** | **string**|  | [optional] |
| **start_date_after** | **string**|  | [optional] |
| **start_date_strictly_after** | **string**|  | [optional] |
| **end_date_before** | **string**|  | [optional] |
| **end_date_strictly_before** | **string**|  | [optional] |
| **end_date_after** | **string**|  | [optional] |
| **end_date_strictly_after** | **string**|  | [optional] |
| **accept_language** | **string**| Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop. | [optional] |

### Return type

[**\Sylius\Model\SyliusApiAdminTaxRateGetCollection200Response**](../Model/SyliusApiAdminTaxRateGetCollection200Response.md)

### Authorization

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

### HTTP request headers

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

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

## `syliusApiAdminTaxRatePost()`

```php
syliusApiAdminTaxRatePost($tax_rate_sylius_admin_tax_rate_create, $accept_language): \Sylius\Model\TaxRateJsonldSyliusAdminTaxRateShow
```

Creates a TaxRate resource.

Creates a TaxRate resource.

### Example

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


// Configure Bearer (JWT) authorization: JWT
$config = Sylius\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Sylius\Api\TaxRateApi(
    // 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
);
$tax_rate_sylius_admin_tax_rate_create = new \Sylius\Model\TaxRateSyliusAdminTaxRateCreate(); // \Sylius\Model\TaxRateSyliusAdminTaxRateCreate | The new TaxRate resource
$accept_language = 'accept_language_example'; // string | Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop.

try {
    $result = $apiInstance->syliusApiAdminTaxRatePost($tax_rate_sylius_admin_tax_rate_create, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TaxRateApi->syliusApiAdminTaxRatePost: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **tax_rate_sylius_admin_tax_rate_create** | [**\Sylius\Model\TaxRateSyliusAdminTaxRateCreate**](../Model/TaxRateSyliusAdminTaxRateCreate.md)| The new TaxRate resource | |
| **accept_language** | **string**| Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop. | [optional] |

### Return type

[**\Sylius\Model\TaxRateJsonldSyliusAdminTaxRateShow**](../Model/TaxRateJsonldSyliusAdminTaxRateShow.md)

### Authorization

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

### HTTP request headers

- **Content-Type**: `application/ld+json`, `application/json`
- **Accept**: `application/ld+json`, `application/json`, `application/problem+json`

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

## `syliusApiAdminTaxRatePut()`

```php
syliusApiAdminTaxRatePut($code, $tax_rate_sylius_admin_tax_rate_update, $accept_language): \Sylius\Model\TaxRateJsonldSyliusAdminTaxRateShow
```

Replaces the TaxRate resource.

Replaces the TaxRate resource.

### Example

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


// Configure Bearer (JWT) authorization: JWT
$config = Sylius\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Sylius\Api\TaxRateApi(
    // 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
);
$code = 'code_example'; // string | TaxRate identifier
$tax_rate_sylius_admin_tax_rate_update = new \Sylius\Model\TaxRateSyliusAdminTaxRateUpdate(); // \Sylius\Model\TaxRateSyliusAdminTaxRateUpdate | The updated TaxRate resource
$accept_language = 'accept_language_example'; // string | Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop.

try {
    $result = $apiInstance->syliusApiAdminTaxRatePut($code, $tax_rate_sylius_admin_tax_rate_update, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TaxRateApi->syliusApiAdminTaxRatePut: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| TaxRate identifier | |
| **tax_rate_sylius_admin_tax_rate_update** | [**\Sylius\Model\TaxRateSyliusAdminTaxRateUpdate**](../Model/TaxRateSyliusAdminTaxRateUpdate.md)| The updated TaxRate resource | |
| **accept_language** | **string**| Locales in this enum are all locales defined in the shop and only enabled ones will work in the given channel in the shop. | [optional] |

### Return type

[**\Sylius\Model\TaxRateJsonldSyliusAdminTaxRateShow**](../Model/TaxRateJsonldSyliusAdminTaxRateShow.md)

### Authorization

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

### HTTP request headers

- **Content-Type**: `application/ld+json`, `application/json`
- **Accept**: `application/ld+json`, `application/json`, `application/problem+json`

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