# Sylius\LocaleApi

Resource &#39;Locale&#39; operations.

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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**syliusApiAdminLocaleDelete()**](LocaleApi.md#syliusApiAdminLocaleDelete) | **DELETE** /api/v2/admin/locales/{code} | Removes the Locale resource. |
| [**syliusApiAdminLocaleGet()**](LocaleApi.md#syliusApiAdminLocaleGet) | **GET** /api/v2/admin/locales/{code} | Retrieves a Locale resource. |
| [**syliusApiAdminLocaleGetCollection()**](LocaleApi.md#syliusApiAdminLocaleGetCollection) | **GET** /api/v2/admin/locales | Retrieves the collection of Locale resources. |
| [**syliusApiAdminLocalePost()**](LocaleApi.md#syliusApiAdminLocalePost) | **POST** /api/v2/admin/locales | Creates a Locale resource. |
| [**syliusApiShopLocaleGet()**](LocaleApi.md#syliusApiShopLocaleGet) | **GET** /api/v2/shop/locales/{code} | Retrieves a Locale resource. |
| [**syliusApiShopLocaleGetCollection()**](LocaleApi.md#syliusApiShopLocaleGetCollection) | **GET** /api/v2/shop/locales | Retrieves the collection of Locale resources. |


## `syliusApiAdminLocaleDelete()`

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

Removes the Locale resource.

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

### Parameters

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

## `syliusApiAdminLocaleGet()`

```php
syliusApiAdminLocaleGet($code, $accept_language): \Sylius\Model\LocaleJsonldSyliusAdminLocaleShow
```

Retrieves a Locale resource.

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

### Parameters

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

## `syliusApiAdminLocaleGetCollection()`

```php
syliusApiAdminLocaleGetCollection($page, $items_per_page, $code, $accept_language): \Sylius\Model\SyliusApiAdminLocaleGetCollection200Response
```

Retrieves the collection of Locale resources.

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

## `syliusApiAdminLocalePost()`

```php
syliusApiAdminLocalePost($locale_sylius_admin_locale_create, $accept_language): \Sylius\Model\LocaleJsonldSyliusAdminLocaleShow
```

Creates a Locale resource.

Creates a Locale 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\LocaleApi(
    // 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
);
$locale_sylius_admin_locale_create = new \Sylius\Model\LocaleSyliusAdminLocaleCreate(); // \Sylius\Model\LocaleSyliusAdminLocaleCreate | The new Locale 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->syliusApiAdminLocalePost($locale_sylius_admin_locale_create, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LocaleApi->syliusApiAdminLocalePost: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **locale_sylius_admin_locale_create** | [**\Sylius\Model\LocaleSyliusAdminLocaleCreate**](../Model/LocaleSyliusAdminLocaleCreate.md)| The new Locale 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\LocaleJsonldSyliusAdminLocaleShow**](../Model/LocaleJsonldSyliusAdminLocaleShow.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)

## `syliusApiShopLocaleGet()`

```php
syliusApiShopLocaleGet($code, $accept_language): \Sylius\Model\LocaleJsonldSyliusShopLocaleShow
```

Retrieves a Locale resource.

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

### Parameters

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

## `syliusApiShopLocaleGetCollection()`

```php
syliusApiShopLocaleGetCollection($accept_language): \Sylius\Model\SyliusApiShopLocaleGetCollection200Response
```

Retrieves the collection of Locale resources.

Retrieves the collection of Locale 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\LocaleApi(
    // 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
);
$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->syliusApiShopLocaleGetCollection($accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LocaleApi->syliusApiShopLocaleGetCollection: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

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