# Sylius\ZoneApi

Resource &#39;Zone&#39; operations.

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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**syliusApiAdminZoneDelete()**](ZoneApi.md#syliusApiAdminZoneDelete) | **DELETE** /api/v2/admin/zones/{code} | Removes the Zone resource. |
| [**syliusApiAdminZoneGet()**](ZoneApi.md#syliusApiAdminZoneGet) | **GET** /api/v2/admin/zones/{code} | Retrieves a Zone resource. |
| [**syliusApiAdminZoneGetCollection()**](ZoneApi.md#syliusApiAdminZoneGetCollection) | **GET** /api/v2/admin/zones | Retrieves the collection of Zone resources. |
| [**syliusApiAdminZonePost()**](ZoneApi.md#syliusApiAdminZonePost) | **POST** /api/v2/admin/zones | Creates a Zone resource. |
| [**syliusApiAdminZonePut()**](ZoneApi.md#syliusApiAdminZonePut) | **PUT** /api/v2/admin/zones/{code} | Replaces the Zone resource. |


## `syliusApiAdminZoneDelete()`

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

Removes the Zone resource.

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

### Parameters

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

## `syliusApiAdminZoneGet()`

```php
syliusApiAdminZoneGet($code, $accept_language): \Sylius\Model\ZoneJsonldSyliusAdminZoneShow
```

Retrieves a Zone resource.

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

### Parameters

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

## `syliusApiAdminZoneGetCollection()`

```php
syliusApiAdminZoneGetCollection($page, $items_per_page, $accept_language): \Sylius\Model\SyliusApiAdminZoneGetCollection200Response
```

Retrieves the collection of Zone resources.

Retrieves the collection of Zone 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\ZoneApi(
    // 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
$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->syliusApiAdminZoneGetCollection($page, $items_per_page, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ZoneApi->syliusApiAdminZoneGetCollection: ', $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] |
| **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\SyliusApiAdminZoneGetCollection200Response**](../Model/SyliusApiAdminZoneGetCollection200Response.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)

## `syliusApiAdminZonePost()`

```php
syliusApiAdminZonePost($zone_sylius_admin_zone_create, $accept_language): \Sylius\Model\ZoneJsonldSyliusAdminZoneShow
```

Creates a Zone resource.

Creates a Zone 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\ZoneApi(
    // 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
);
$zone_sylius_admin_zone_create = new \Sylius\Model\ZoneSyliusAdminZoneCreate(); // \Sylius\Model\ZoneSyliusAdminZoneCreate | The new Zone 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->syliusApiAdminZonePost($zone_sylius_admin_zone_create, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ZoneApi->syliusApiAdminZonePost: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone_sylius_admin_zone_create** | [**\Sylius\Model\ZoneSyliusAdminZoneCreate**](../Model/ZoneSyliusAdminZoneCreate.md)| The new Zone 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\ZoneJsonldSyliusAdminZoneShow**](../Model/ZoneJsonldSyliusAdminZoneShow.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)

## `syliusApiAdminZonePut()`

```php
syliusApiAdminZonePut($code, $zone_sylius_admin_zone_update, $accept_language): \Sylius\Model\ZoneJsonldSyliusAdminZoneShow
```

Replaces the Zone resource.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| Zone identifier | |
| **zone_sylius_admin_zone_update** | [**\Sylius\Model\ZoneSyliusAdminZoneUpdate**](../Model/ZoneSyliusAdminZoneUpdate.md)| The updated Zone 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\ZoneJsonldSyliusAdminZoneShow**](../Model/ZoneJsonldSyliusAdminZoneShow.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)
