# Sylius\ProductOptionApi

Resource &#39;ProductOption&#39; operations.

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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**syliusApiAdminProductOptionDelete()**](ProductOptionApi.md#syliusApiAdminProductOptionDelete) | **DELETE** /api/v2/admin/product-options/{code} | Removes the ProductOption resource. |
| [**syliusApiAdminProductOptionGet()**](ProductOptionApi.md#syliusApiAdminProductOptionGet) | **GET** /api/v2/admin/product-options/{code} | Retrieves a ProductOption resource. |
| [**syliusApiAdminProductOptionGetCollection()**](ProductOptionApi.md#syliusApiAdminProductOptionGetCollection) | **GET** /api/v2/admin/product-options | Retrieves the collection of ProductOption resources. |
| [**syliusApiAdminProductOptionPost()**](ProductOptionApi.md#syliusApiAdminProductOptionPost) | **POST** /api/v2/admin/product-options | Creates a ProductOption resource. |
| [**syliusApiAdminProductOptionPut()**](ProductOptionApi.md#syliusApiAdminProductOptionPut) | **PUT** /api/v2/admin/product-options/{code} | Replaces the ProductOption resource. |
| [**syliusApiShopProductOptionCollectionGet()**](ProductOptionApi.md#syliusApiShopProductOptionCollectionGet) | **GET** /api/v2/shop/product-options | Retrieves the collection of ProductOption resources. |
| [**syliusApiShopProductOptionGet()**](ProductOptionApi.md#syliusApiShopProductOptionGet) | **GET** /api/v2/shop/product-options/{code} | Retrieves a ProductOption resource. |


## `syliusApiAdminProductOptionDelete()`

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

Removes the ProductOption resource.

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

### Parameters

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

## `syliusApiAdminProductOptionGet()`

```php
syliusApiAdminProductOptionGet($code, $accept_language): \Sylius\Model\ProductOptionJsonldSyliusAdminProductOptionShow
```

Retrieves a ProductOption resource.

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

### Parameters

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

## `syliusApiAdminProductOptionGetCollection()`

```php
syliusApiAdminProductOptionGetCollection($page, $items_per_page, $code, $translations_name, $accept_language): \Sylius\Model\SyliusApiAdminProductOptionGetCollection200Response
```

Retrieves the collection of ProductOption resources.

Retrieves the collection of ProductOption 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\ProductOptionApi(
    // 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 | 
$translations_name = 'translations_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->syliusApiAdminProductOptionGetCollection($page, $items_per_page, $code, $translations_name, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductOptionApi->syliusApiAdminProductOptionGetCollection: ', $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] |
| **translations_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\SyliusApiAdminProductOptionGetCollection200Response**](../Model/SyliusApiAdminProductOptionGetCollection200Response.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)

## `syliusApiAdminProductOptionPost()`

```php
syliusApiAdminProductOptionPost($product_option_sylius_admin_product_option_create, $accept_language): \Sylius\Model\ProductOptionJsonldSyliusAdminProductOptionShow
```

Creates a ProductOption resource.

Creates a ProductOption 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\ProductOptionApi(
    // 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
);
$product_option_sylius_admin_product_option_create = new \Sylius\Model\ProductOptionSyliusAdminProductOptionCreate(); // \Sylius\Model\ProductOptionSyliusAdminProductOptionCreate | The new ProductOption 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->syliusApiAdminProductOptionPost($product_option_sylius_admin_product_option_create, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductOptionApi->syliusApiAdminProductOptionPost: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_option_sylius_admin_product_option_create** | [**\Sylius\Model\ProductOptionSyliusAdminProductOptionCreate**](../Model/ProductOptionSyliusAdminProductOptionCreate.md)| The new ProductOption 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\ProductOptionJsonldSyliusAdminProductOptionShow**](../Model/ProductOptionJsonldSyliusAdminProductOptionShow.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)

## `syliusApiAdminProductOptionPut()`

```php
syliusApiAdminProductOptionPut($code, $product_option_sylius_admin_product_option_update, $accept_language): \Sylius\Model\ProductOptionJsonldSyliusAdminProductOptionShow
```

Replaces the ProductOption resource.

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| ProductOption identifier | |
| **product_option_sylius_admin_product_option_update** | [**\Sylius\Model\ProductOptionSyliusAdminProductOptionUpdate**](../Model/ProductOptionSyliusAdminProductOptionUpdate.md)| The updated ProductOption 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\ProductOptionJsonldSyliusAdminProductOptionShow**](../Model/ProductOptionJsonldSyliusAdminProductOptionShow.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)

## `syliusApiShopProductOptionCollectionGet()`

```php
syliusApiShopProductOptionCollectionGet($page, $items_per_page, $product_code, $accept_language): \Sylius\Model\SyliusApiShopProductOptionCollectionGet200Response
```

Retrieves the collection of ProductOption resources.

Retrieves the collection of ProductOption 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\ProductOptionApi(
    // 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
$product_code = 'product_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->syliusApiShopProductOptionCollectionGet($page, $items_per_page, $product_code, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductOptionApi->syliusApiShopProductOptionCollectionGet: ', $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] |
| **product_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\SyliusApiShopProductOptionCollectionGet200Response**](../Model/SyliusApiShopProductOptionCollectionGet200Response.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)

## `syliusApiShopProductOptionGet()`

```php
syliusApiShopProductOptionGet($code, $accept_language): \Sylius\Model\ProductOptionJsonldSyliusShopProductOptionShow
```

Retrieves a ProductOption resource.

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

### Parameters

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