# Sylius\PromotionCouponApi

Resource &#39;PromotionCoupon&#39; operations.

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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**syliusApiAdminPromotionPromotionCouponDelete()**](PromotionCouponApi.md#syliusApiAdminPromotionPromotionCouponDelete) | **DELETE** /api/v2/admin/promotions/{promotionCode}/coupons/{couponCode} | Removes the PromotionCoupon resource. |
| [**syliusApiAdminPromotionPromotionCouponGet()**](PromotionCouponApi.md#syliusApiAdminPromotionPromotionCouponGet) | **GET** /api/v2/admin/promotions/{promotionCode}/coupons/{couponCode} | Retrieves a PromotionCoupon resource. |
| [**syliusApiAdminPromotionPromotionCouponGetCollection()**](PromotionCouponApi.md#syliusApiAdminPromotionPromotionCouponGetCollection) | **GET** /api/v2/admin/promotions/{promotionCode}/coupons | Retrieves the collection of PromotionCoupon resources. |
| [**syliusApiAdminPromotionPromotionCouponPost()**](PromotionCouponApi.md#syliusApiAdminPromotionPromotionCouponPost) | **POST** /api/v2/admin/promotions/{promotionCode}/coupons | Creates a PromotionCoupon resource. |
| [**syliusApiAdminPromotionPromotionCouponPostGenerate()**](PromotionCouponApi.md#syliusApiAdminPromotionPromotionCouponPostGenerate) | **POST** /api/v2/admin/promotions/{promotionCode}/coupons/generate | Creates a PromotionCoupon resource. |
| [**syliusApiAdminPromotionPromotionCouponPut()**](PromotionCouponApi.md#syliusApiAdminPromotionPromotionCouponPut) | **PUT** /api/v2/admin/promotions/{promotionCode}/coupons/{couponCode} | Replaces the PromotionCoupon resource. |


## `syliusApiAdminPromotionPromotionCouponDelete()`

```php
syliusApiAdminPromotionPromotionCouponDelete($promotion_code, $coupon_code, $accept_language)
```

Removes the PromotionCoupon resource.

Removes the PromotionCoupon 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\PromotionCouponApi(
    // 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
);
$promotion_code = 'promotion_code_example'; // string | PromotionCoupon identifier
$coupon_code = 'coupon_code_example'; // string | PromotionCoupon 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->syliusApiAdminPromotionPromotionCouponDelete($promotion_code, $coupon_code, $accept_language);
} catch (Exception $e) {
    echo 'Exception when calling PromotionCouponApi->syliusApiAdminPromotionPromotionCouponDelete: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **promotion_code** | **string**| PromotionCoupon identifier | |
| **coupon_code** | **string**| PromotionCoupon 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)

## `syliusApiAdminPromotionPromotionCouponGet()`

```php
syliusApiAdminPromotionPromotionCouponGet($promotion_code, $coupon_code, $accept_language): \Sylius\Model\PromotionCouponJsonldSyliusAdminPromotionCouponShow
```

Retrieves a PromotionCoupon resource.

Retrieves a PromotionCoupon 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\PromotionCouponApi(
    // 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
);
$promotion_code = 'promotion_code_example'; // string | PromotionCoupon identifier
$coupon_code = 'coupon_code_example'; // string | PromotionCoupon 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->syliusApiAdminPromotionPromotionCouponGet($promotion_code, $coupon_code, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PromotionCouponApi->syliusApiAdminPromotionPromotionCouponGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **promotion_code** | **string**| PromotionCoupon identifier | |
| **coupon_code** | **string**| PromotionCoupon 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\PromotionCouponJsonldSyliusAdminPromotionCouponShow**](../Model/PromotionCouponJsonldSyliusAdminPromotionCouponShow.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)

## `syliusApiAdminPromotionPromotionCouponGetCollection()`

```php
syliusApiAdminPromotionPromotionCouponGetCollection($promotion_code, $page, $items_per_page, $order_code, $order_expires_at, $order_usage_limit, $order_per_customer_usage_limit, $order_used, $code, $code2, $promotion_code2, $promotion_code3, $accept_language): \Sylius\Model\SyliusApiAdminPromotionPromotionCouponGetCollection200Response
```

Retrieves the collection of PromotionCoupon resources.

Retrieves the collection of PromotionCoupon 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\PromotionCouponApi(
    // 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
);
$promotion_code = 'promotion_code_example'; // string | PromotionCoupon identifier
$page = 1; // int | The collection page number
$items_per_page = 30; // int | The number of items per page
$order_code = ''; // string | 
$order_expires_at = ''; // string | 
$order_usage_limit = ''; // string | 
$order_per_customer_usage_limit = ''; // string | 
$order_used = ''; // string | 
$code = 'code_example'; // string | 
$code2 = array('code_example'); // string[] | 
$promotion_code2 = 'promotion_code_example'; // string | 
$promotion_code3 = array('promotion_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->syliusApiAdminPromotionPromotionCouponGetCollection($promotion_code, $page, $items_per_page, $order_code, $order_expires_at, $order_usage_limit, $order_per_customer_usage_limit, $order_used, $code, $code2, $promotion_code2, $promotion_code3, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PromotionCouponApi->syliusApiAdminPromotionPromotionCouponGetCollection: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **promotion_code** | **string**| PromotionCoupon identifier | |
| **page** | **int**| The collection page number | [optional] [default to 1] |
| **items_per_page** | **int**| The number of items per page | [optional] [default to 30] |
| **order_code** | **string**|  | [optional] [default to &#39;&#39;] |
| **order_expires_at** | **string**|  | [optional] [default to &#39;&#39;] |
| **order_usage_limit** | **string**|  | [optional] [default to &#39;&#39;] |
| **order_per_customer_usage_limit** | **string**|  | [optional] [default to &#39;&#39;] |
| **order_used** | **string**|  | [optional] [default to &#39;&#39;] |
| **code** | **string**|  | [optional] |
| **code2** | [**string[]**](../Model/string.md)|  | [optional] |
| **promotion_code2** | **string**|  | [optional] |
| **promotion_code3** | [**string[]**](../Model/string.md)|  | [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\SyliusApiAdminPromotionPromotionCouponGetCollection200Response**](../Model/SyliusApiAdminPromotionPromotionCouponGetCollection200Response.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)

## `syliusApiAdminPromotionPromotionCouponPost()`

```php
syliusApiAdminPromotionPromotionCouponPost($promotion_code, $promotion_coupon_sylius_admin_promotion_coupon_create, $accept_language): \Sylius\Model\PromotionCouponJsonldSyliusAdminPromotionCouponShow
```

Creates a PromotionCoupon resource.

Creates a PromotionCoupon 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\PromotionCouponApi(
    // 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
);
$promotion_code = 'promotion_code_example'; // string | PromotionCoupon identifier
$promotion_coupon_sylius_admin_promotion_coupon_create = new \Sylius\Model\PromotionCouponSyliusAdminPromotionCouponCreate(); // \Sylius\Model\PromotionCouponSyliusAdminPromotionCouponCreate | The new PromotionCoupon 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->syliusApiAdminPromotionPromotionCouponPost($promotion_code, $promotion_coupon_sylius_admin_promotion_coupon_create, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PromotionCouponApi->syliusApiAdminPromotionPromotionCouponPost: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **promotion_code** | **string**| PromotionCoupon identifier | |
| **promotion_coupon_sylius_admin_promotion_coupon_create** | [**\Sylius\Model\PromotionCouponSyliusAdminPromotionCouponCreate**](../Model/PromotionCouponSyliusAdminPromotionCouponCreate.md)| The new PromotionCoupon 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\PromotionCouponJsonldSyliusAdminPromotionCouponShow**](../Model/PromotionCouponJsonldSyliusAdminPromotionCouponShow.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)

## `syliusApiAdminPromotionPromotionCouponPostGenerate()`

```php
syliusApiAdminPromotionPromotionCouponPostGenerate($promotion_code, $promotion_coupon_generate_promotion_coupon_sylius_admin_promotion_coupon_generate, $accept_language): \Sylius\Model\PromotionCouponJsonldSyliusAdminPromotionCouponIndex
```

Creates a PromotionCoupon resource.

Creates a PromotionCoupon 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\PromotionCouponApi(
    // 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
);
$promotion_code = 'promotion_code_example'; // string | PromotionCoupon identifier
$promotion_coupon_generate_promotion_coupon_sylius_admin_promotion_coupon_generate = new \Sylius\Model\PromotionCouponGeneratePromotionCouponSyliusAdminPromotionCouponGenerate(); // \Sylius\Model\PromotionCouponGeneratePromotionCouponSyliusAdminPromotionCouponGenerate | The new PromotionCoupon 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->syliusApiAdminPromotionPromotionCouponPostGenerate($promotion_code, $promotion_coupon_generate_promotion_coupon_sylius_admin_promotion_coupon_generate, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PromotionCouponApi->syliusApiAdminPromotionPromotionCouponPostGenerate: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **promotion_code** | **string**| PromotionCoupon identifier | |
| **promotion_coupon_generate_promotion_coupon_sylius_admin_promotion_coupon_generate** | [**\Sylius\Model\PromotionCouponGeneratePromotionCouponSyliusAdminPromotionCouponGenerate**](../Model/PromotionCouponGeneratePromotionCouponSyliusAdminPromotionCouponGenerate.md)| The new PromotionCoupon 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\PromotionCouponJsonldSyliusAdminPromotionCouponIndex**](../Model/PromotionCouponJsonldSyliusAdminPromotionCouponIndex.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)

## `syliusApiAdminPromotionPromotionCouponPut()`

```php
syliusApiAdminPromotionPromotionCouponPut($promotion_code, $coupon_code, $promotion_coupon_sylius_admin_promotion_coupon_update, $accept_language): \Sylius\Model\PromotionCouponJsonldSyliusAdminPromotionCouponShow
```

Replaces the PromotionCoupon resource.

Replaces the PromotionCoupon 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\PromotionCouponApi(
    // 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
);
$promotion_code = 'promotion_code_example'; // string | PromotionCoupon identifier
$coupon_code = 'coupon_code_example'; // string | PromotionCoupon identifier
$promotion_coupon_sylius_admin_promotion_coupon_update = new \Sylius\Model\PromotionCouponSyliusAdminPromotionCouponUpdate(); // \Sylius\Model\PromotionCouponSyliusAdminPromotionCouponUpdate | The updated PromotionCoupon 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->syliusApiAdminPromotionPromotionCouponPut($promotion_code, $coupon_code, $promotion_coupon_sylius_admin_promotion_coupon_update, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PromotionCouponApi->syliusApiAdminPromotionPromotionCouponPut: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **promotion_code** | **string**| PromotionCoupon identifier | |
| **coupon_code** | **string**| PromotionCoupon identifier | |
| **promotion_coupon_sylius_admin_promotion_coupon_update** | [**\Sylius\Model\PromotionCouponSyliusAdminPromotionCouponUpdate**](../Model/PromotionCouponSyliusAdminPromotionCouponUpdate.md)| The updated PromotionCoupon 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\PromotionCouponJsonldSyliusAdminPromotionCouponShow**](../Model/PromotionCouponJsonldSyliusAdminPromotionCouponShow.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)
