# Sylius\ProductBundleApi

Resource &#39;ProductBundle&#39; operations.

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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**adminDeleteProductBundle()**](ProductBundleApi.md#adminDeleteProductBundle) | **DELETE** /api/v2/admin/product-bundles/{id} | Removes the ProductBundle resource. |
| [**adminGetProductBundle()**](ProductBundleApi.md#adminGetProductBundle) | **GET** /api/v2/admin/product-bundles/{id} | Retrieves a ProductBundle resource. |
| [**adminGetProductBundles()**](ProductBundleApi.md#adminGetProductBundles) | **GET** /api/v2/admin/product-bundles | Retrieves the collection of ProductBundle resources. |
| [**adminPostProductBundle()**](ProductBundleApi.md#adminPostProductBundle) | **POST** /api/v2/admin/product-bundles | Creates a ProductBundle resource. |
| [**adminPutProductBundle()**](ProductBundleApi.md#adminPutProductBundle) | **PUT** /api/v2/admin/product-bundles/{id} | Replaces the ProductBundle resource. |
| [**shopAddToCart()**](ProductBundleApi.md#shopAddToCart) | **PATCH** /api/v2/shop/product-bundles/{id}/add-to-cart | Updates the ProductBundle resource. |
| [**shopGetProductBundle()**](ProductBundleApi.md#shopGetProductBundle) | **GET** /api/v2/shop/product-bundles/{id} | Retrieves a ProductBundle resource. |


## `adminDeleteProductBundle()`

```php
adminDeleteProductBundle($id, $accept_language)
```

Removes the ProductBundle resource.

Removes the ProductBundle 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\ProductBundleApi(
    // 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
);
$id = 'id_example'; // string | ProductBundle 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->adminDeleteProductBundle($id, $accept_language);
} catch (Exception $e) {
    echo 'Exception when calling ProductBundleApi->adminDeleteProductBundle: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| ProductBundle 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)

## `adminGetProductBundle()`

```php
adminGetProductBundle($id, $accept_language): \Sylius\Model\ProductBundleJsonldAdminProductBundleRead
```

Retrieves a ProductBundle resource.

Retrieves a ProductBundle 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\ProductBundleApi(
    // 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
);
$id = 'id_example'; // string | ProductBundle 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->adminGetProductBundle($id, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductBundleApi->adminGetProductBundle: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

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

## `adminGetProductBundles()`

```php
adminGetProductBundles($page, $items_per_page, $accept_language): \Sylius\Model\AdminGetProductBundles200Response
```

Retrieves the collection of ProductBundle resources.

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

## `adminPostProductBundle()`

```php
adminPostProductBundle($product_bundle_admin_product_bundle_create, $accept_language): \Sylius\Model\ProductBundleJsonld
```

Creates a ProductBundle resource.

Creates a ProductBundle 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\ProductBundleApi(
    // 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_bundle_admin_product_bundle_create = new \Sylius\Model\ProductBundleAdminProductBundleCreate(); // \Sylius\Model\ProductBundleAdminProductBundleCreate | The new ProductBundle 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->adminPostProductBundle($product_bundle_admin_product_bundle_create, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductBundleApi->adminPostProductBundle: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_bundle_admin_product_bundle_create** | [**\Sylius\Model\ProductBundleAdminProductBundleCreate**](../Model/ProductBundleAdminProductBundleCreate.md)| The new ProductBundle 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\ProductBundleJsonld**](../Model/ProductBundleJsonld.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)

## `adminPutProductBundle()`

```php
adminPutProductBundle($id, $product_bundle_admin_product_bundle_update, $accept_language): \Sylius\Model\ProductBundleJsonldAdminProductBundleRead
```

Replaces the ProductBundle resource.

Replaces the ProductBundle 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\ProductBundleApi(
    // 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
);
$id = 'id_example'; // string | ProductBundle identifier
$product_bundle_admin_product_bundle_update = new \Sylius\Model\ProductBundleAdminProductBundleUpdate(); // \Sylius\Model\ProductBundleAdminProductBundleUpdate | The updated ProductBundle 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->adminPutProductBundle($id, $product_bundle_admin_product_bundle_update, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductBundleApi->adminPutProductBundle: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| ProductBundle identifier | |
| **product_bundle_admin_product_bundle_update** | [**\Sylius\Model\ProductBundleAdminProductBundleUpdate**](../Model/ProductBundleAdminProductBundleUpdate.md)| The updated ProductBundle 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\ProductBundleJsonldAdminProductBundleRead**](../Model/ProductBundleJsonldAdminProductBundleRead.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)

## `shopAddToCart()`

```php
shopAddToCart($id, $product_bundle_add_product_bundle_to_cart_command_shop_product_bundle_add_to_cart_json_merge_patch, $accept_language)
```

Updates the ProductBundle resource.

Updates the ProductBundle 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\ProductBundleApi(
    // 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
);
$id = 'id_example'; // string | ProductBundle identifier
$product_bundle_add_product_bundle_to_cart_command_shop_product_bundle_add_to_cart_json_merge_patch = new \Sylius\Model\ProductBundleAddProductBundleToCartCommandShopProductBundleAddToCartJsonMergePatch(); // \Sylius\Model\ProductBundleAddProductBundleToCartCommandShopProductBundleAddToCartJsonMergePatch | The updated ProductBundle 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 {
    $apiInstance->shopAddToCart($id, $product_bundle_add_product_bundle_to_cart_command_shop_product_bundle_add_to_cart_json_merge_patch, $accept_language);
} catch (Exception $e) {
    echo 'Exception when calling ProductBundleApi->shopAddToCart: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| ProductBundle identifier | |
| **product_bundle_add_product_bundle_to_cart_command_shop_product_bundle_add_to_cart_json_merge_patch** | [**\Sylius\Model\ProductBundleAddProductBundleToCartCommandShopProductBundleAddToCartJsonMergePatch**](../Model/ProductBundleAddProductBundleToCartCommandShopProductBundleAddToCartJsonMergePatch.md)| The updated ProductBundle 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

void (empty response body)

### Authorization

[JWT](../../README.md#JWT)

### HTTP request headers

- **Content-Type**: `application/merge-patch+json`
- **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)

## `shopGetProductBundle()`

```php
shopGetProductBundle($id, $accept_language): \Sylius\Model\ProductBundleJsonldShopProductBundleRead
```

Retrieves a ProductBundle resource.

Retrieves a ProductBundle 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\ProductBundleApi(
    // 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
);
$id = 'id_example'; // string | ProductBundle 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->shopGetProductBundle($id, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductBundleApi->shopGetProductBundle: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

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