# Sylius\ChannelApi

Resource &#39;Channel&#39; operations.

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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**syliusApiAdminChannelDelete()**](ChannelApi.md#syliusApiAdminChannelDelete) | **DELETE** /api/v2/admin/channels/{code} | Removes the Channel resource. |
| [**syliusApiAdminChannelGet()**](ChannelApi.md#syliusApiAdminChannelGet) | **GET** /api/v2/admin/channels/{code} | Retrieves a Channel resource. |
| [**syliusApiAdminChannelGetCollection()**](ChannelApi.md#syliusApiAdminChannelGetCollection) | **GET** /api/v2/admin/channels | Retrieves the collection of Channel resources. |
| [**syliusApiAdminChannelPost()**](ChannelApi.md#syliusApiAdminChannelPost) | **POST** /api/v2/admin/channels | Creates a Channel resource. |
| [**syliusApiAdminChannelPut()**](ChannelApi.md#syliusApiAdminChannelPut) | **PUT** /api/v2/admin/channels/{code} | Replaces the Channel resource. |
| [**syliusApiShopChannelGet()**](ChannelApi.md#syliusApiShopChannelGet) | **GET** /api/v2/shop/channels/{code} | Retrieves a Channel resource. |
| [**syliusApiShopChannelGetCollection()**](ChannelApi.md#syliusApiShopChannelGetCollection) | **GET** /api/v2/shop/channels | Retrieves the collection of Channel resources. |


## `syliusApiAdminChannelDelete()`

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

Removes the Channel resource.

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

### Parameters

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

## `syliusApiAdminChannelGet()`

```php
syliusApiAdminChannelGet($code, $accept_language): \Sylius\Model\ChannelJsonldSyliusAdminChannelShow
```

Retrieves a Channel resource.

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

### Parameters

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

## `syliusApiAdminChannelGetCollection()`

```php
syliusApiAdminChannelGetCollection($page, $items_per_page, $accept_language): \Sylius\Model\SyliusApiAdminChannelGetCollection200Response
```

Retrieves the collection of Channel resources.

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

## `syliusApiAdminChannelPost()`

```php
syliusApiAdminChannelPost($channel_sylius_admin_channel_create, $accept_language): \Sylius\Model\ChannelJsonldSyliusAdminChannelShow
```

Creates a Channel resource.

Creates a Channel 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\ChannelApi(
    // 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
);
$channel_sylius_admin_channel_create = new \Sylius\Model\ChannelSyliusAdminChannelCreate(); // \Sylius\Model\ChannelSyliusAdminChannelCreate | The new Channel 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->syliusApiAdminChannelPost($channel_sylius_admin_channel_create, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ChannelApi->syliusApiAdminChannelPost: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **channel_sylius_admin_channel_create** | [**\Sylius\Model\ChannelSyliusAdminChannelCreate**](../Model/ChannelSyliusAdminChannelCreate.md)| The new Channel 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\ChannelJsonldSyliusAdminChannelShow**](../Model/ChannelJsonldSyliusAdminChannelShow.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)

## `syliusApiAdminChannelPut()`

```php
syliusApiAdminChannelPut($code, $channel_sylius_admin_channel_update, $accept_language): \Sylius\Model\ChannelJsonldSyliusAdminChannelShow
```

Replaces the Channel resource.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| Channel identifier | |
| **channel_sylius_admin_channel_update** | [**\Sylius\Model\ChannelSyliusAdminChannelUpdate**](../Model/ChannelSyliusAdminChannelUpdate.md)| The updated Channel 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\ChannelJsonldSyliusAdminChannelShow**](../Model/ChannelJsonldSyliusAdminChannelShow.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)

## `syliusApiShopChannelGet()`

```php
syliusApiShopChannelGet($code, $accept_language): \Sylius\Model\ChannelJsonldSyliusShopChannelShow
```

Retrieves a Channel resource.

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

### Parameters

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

## `syliusApiShopChannelGetCollection()`

```php
syliusApiShopChannelGetCollection($page, $items_per_page, $accept_language): \Sylius\Model\SyliusApiShopChannelGetCollection200Response
```

Retrieves the collection of Channel resources.

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