# Sylius\TaxCategoryApi

Resource &#39;TaxCategory&#39; operations.

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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**syliusApiAdminTaxCategoryDelete()**](TaxCategoryApi.md#syliusApiAdminTaxCategoryDelete) | **DELETE** /api/v2/admin/tax-categories/{code} | Removes the TaxCategory resource. |
| [**syliusApiAdminTaxCategoryGet()**](TaxCategoryApi.md#syliusApiAdminTaxCategoryGet) | **GET** /api/v2/admin/tax-categories/{code} | Retrieves a TaxCategory resource. |
| [**syliusApiAdminTaxCategoryGetCollection()**](TaxCategoryApi.md#syliusApiAdminTaxCategoryGetCollection) | **GET** /api/v2/admin/tax-categories | Retrieves the collection of TaxCategory resources. |
| [**syliusApiAdminTaxCategoryPost()**](TaxCategoryApi.md#syliusApiAdminTaxCategoryPost) | **POST** /api/v2/admin/tax-categories | Creates a TaxCategory resource. |
| [**syliusApiAdminTaxCategoryPut()**](TaxCategoryApi.md#syliusApiAdminTaxCategoryPut) | **PUT** /api/v2/admin/tax-categories/{code} | Replaces the TaxCategory resource. |


## `syliusApiAdminTaxCategoryDelete()`

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

Removes the TaxCategory resource.

Removes the TaxCategory 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\TaxCategoryApi(
    // 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 | TaxCategory 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->syliusApiAdminTaxCategoryDelete($code, $accept_language);
} catch (Exception $e) {
    echo 'Exception when calling TaxCategoryApi->syliusApiAdminTaxCategoryDelete: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| TaxCategory 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)

## `syliusApiAdminTaxCategoryGet()`

```php
syliusApiAdminTaxCategoryGet($code, $accept_language): \Sylius\Model\TaxCategoryJsonldSyliusAdminTaxCategoryShow
```

Retrieves a TaxCategory resource.

Retrieves a TaxCategory 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\TaxCategoryApi(
    // 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 | TaxCategory 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->syliusApiAdminTaxCategoryGet($code, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TaxCategoryApi->syliusApiAdminTaxCategoryGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| TaxCategory 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\TaxCategoryJsonldSyliusAdminTaxCategoryShow**](../Model/TaxCategoryJsonldSyliusAdminTaxCategoryShow.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)

## `syliusApiAdminTaxCategoryGetCollection()`

```php
syliusApiAdminTaxCategoryGetCollection($page, $items_per_page, $code, $name, $accept_language): \Sylius\Model\SyliusApiAdminTaxCategoryGetCollection200Response
```

Retrieves the collection of TaxCategory resources.

Retrieves the collection of TaxCategory 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\TaxCategoryApi(
    // 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
$code = 'code_example'; // string | 
$name = 'name_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->syliusApiAdminTaxCategoryGetCollection($page, $items_per_page, $code, $name, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TaxCategoryApi->syliusApiAdminTaxCategoryGetCollection: ', $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] |
| **code** | **string**|  | [optional] |
| **name** | **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\SyliusApiAdminTaxCategoryGetCollection200Response**](../Model/SyliusApiAdminTaxCategoryGetCollection200Response.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)

## `syliusApiAdminTaxCategoryPost()`

```php
syliusApiAdminTaxCategoryPost($tax_category_sylius_admin_tax_category_create, $accept_language): \Sylius\Model\TaxCategoryJsonldSyliusAdminTaxCategoryShow
```

Creates a TaxCategory resource.

Creates a TaxCategory 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\TaxCategoryApi(
    // 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_category_sylius_admin_tax_category_create = new \Sylius\Model\TaxCategorySyliusAdminTaxCategoryCreate(); // \Sylius\Model\TaxCategorySyliusAdminTaxCategoryCreate | The new TaxCategory 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->syliusApiAdminTaxCategoryPost($tax_category_sylius_admin_tax_category_create, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TaxCategoryApi->syliusApiAdminTaxCategoryPost: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **tax_category_sylius_admin_tax_category_create** | [**\Sylius\Model\TaxCategorySyliusAdminTaxCategoryCreate**](../Model/TaxCategorySyliusAdminTaxCategoryCreate.md)| The new TaxCategory 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\TaxCategoryJsonldSyliusAdminTaxCategoryShow**](../Model/TaxCategoryJsonldSyliusAdminTaxCategoryShow.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)

## `syliusApiAdminTaxCategoryPut()`

```php
syliusApiAdminTaxCategoryPut($code, $tax_category_sylius_admin_tax_category_update, $accept_language): \Sylius\Model\TaxCategoryJsonldSyliusAdminTaxCategoryShow
```

Replaces the TaxCategory resource.

Replaces the TaxCategory 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\TaxCategoryApi(
    // 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 | TaxCategory identifier
$tax_category_sylius_admin_tax_category_update = new \Sylius\Model\TaxCategorySyliusAdminTaxCategoryUpdate(); // \Sylius\Model\TaxCategorySyliusAdminTaxCategoryUpdate | The updated TaxCategory 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->syliusApiAdminTaxCategoryPut($code, $tax_category_sylius_admin_tax_category_update, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TaxCategoryApi->syliusApiAdminTaxCategoryPut: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| TaxCategory identifier | |
| **tax_category_sylius_admin_tax_category_update** | [**\Sylius\Model\TaxCategorySyliusAdminTaxCategoryUpdate**](../Model/TaxCategorySyliusAdminTaxCategoryUpdate.md)| The updated TaxCategory 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\TaxCategoryJsonldSyliusAdminTaxCategoryShow**](../Model/TaxCategoryJsonldSyliusAdminTaxCategoryShow.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)
