# Sylius\ProductReviewApi

Resource &#39;ProductReview&#39; operations.

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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**syliusApiAdminProductReviewDelete()**](ProductReviewApi.md#syliusApiAdminProductReviewDelete) | **DELETE** /api/v2/admin/product-reviews/{id} | Removes the ProductReview resource. |
| [**syliusApiAdminProductReviewGet()**](ProductReviewApi.md#syliusApiAdminProductReviewGet) | **GET** /api/v2/admin/product-reviews/{id} | Retrieves a ProductReview resource. |
| [**syliusApiAdminProductReviewGetCollection()**](ProductReviewApi.md#syliusApiAdminProductReviewGetCollection) | **GET** /api/v2/admin/product-reviews | Retrieves the collection of ProductReview resources. |
| [**syliusApiAdminProductReviewPatchAccept()**](ProductReviewApi.md#syliusApiAdminProductReviewPatchAccept) | **PATCH** /api/v2/admin/product-reviews/{id}/accept | Updates the ProductReview resource. |
| [**syliusApiAdminProductReviewPatchReject()**](ProductReviewApi.md#syliusApiAdminProductReviewPatchReject) | **PATCH** /api/v2/admin/product-reviews/{id}/reject | Updates the ProductReview resource. |
| [**syliusApiAdminProductReviewPut()**](ProductReviewApi.md#syliusApiAdminProductReviewPut) | **PUT** /api/v2/admin/product-reviews/{id} | Replaces the ProductReview resource. |
| [**syliusApiShopProductReviewGet()**](ProductReviewApi.md#syliusApiShopProductReviewGet) | **GET** /api/v2/shop/product-reviews/{id} | Retrieves a ProductReview resource. |
| [**syliusApiShopProductReviewGetCollection()**](ProductReviewApi.md#syliusApiShopProductReviewGetCollection) | **GET** /api/v2/shop/product-reviews | Retrieves the collection of ProductReview resources. |
| [**syliusApiShopProductReviewPost()**](ProductReviewApi.md#syliusApiShopProductReviewPost) | **POST** /api/v2/shop/product-reviews | Creates a ProductReview resource. |


## `syliusApiAdminProductReviewDelete()`

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

Removes the ProductReview resource.

Removes the ProductReview 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\ProductReviewApi(
    // 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 | ProductReview 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->syliusApiAdminProductReviewDelete($id, $accept_language);
} catch (Exception $e) {
    echo 'Exception when calling ProductReviewApi->syliusApiAdminProductReviewDelete: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

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

## `syliusApiAdminProductReviewGet()`

```php
syliusApiAdminProductReviewGet($id, $accept_language): \Sylius\Model\ProductReviewJsonldSyliusAdminProductReviewShow
```

Retrieves a ProductReview resource.

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

### Parameters

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

## `syliusApiAdminProductReviewGetCollection()`

```php
syliusApiAdminProductReviewGetCollection($page, $items_per_page, $order_created_at, $order_title, $order_rating, $order_status, $review_subject, $review_subject2, $title, $accept_language, $status): \Sylius\Model\SyliusApiAdminProductReviewGetCollection200Response
```

Retrieves the collection of ProductReview resources.

Retrieves the collection of ProductReview 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\ProductReviewApi(
    // 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
$order_created_at = ''; // string | 
$order_title = ''; // string | 
$order_rating = ''; // string | 
$order_status = ''; // string | 
$review_subject = 'review_subject_example'; // string | 
$review_subject2 = array('review_subject_example'); // string[] | 
$title = 'title_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.
$status = 'null'; // string | Status of product reviews you want to get

try {
    $result = $apiInstance->syliusApiAdminProductReviewGetCollection($page, $items_per_page, $order_created_at, $order_title, $order_rating, $order_status, $review_subject, $review_subject2, $title, $accept_language, $status);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductReviewApi->syliusApiAdminProductReviewGetCollection: ', $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] |
| **order_created_at** | **string**|  | [optional] [default to &#39;&#39;] |
| **order_title** | **string**|  | [optional] [default to &#39;&#39;] |
| **order_rating** | **string**|  | [optional] [default to &#39;&#39;] |
| **order_status** | **string**|  | [optional] [default to &#39;&#39;] |
| **review_subject** | **string**|  | [optional] |
| **review_subject2** | [**string[]**](../Model/string.md)|  | [optional] |
| **title** | **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] |
| **status** | **string**| Status of product reviews you want to get | [optional] [default to &#39;null&#39;] |

### Return type

[**\Sylius\Model\SyliusApiAdminProductReviewGetCollection200Response**](../Model/SyliusApiAdminProductReviewGetCollection200Response.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)

## `syliusApiAdminProductReviewPatchAccept()`

```php
syliusApiAdminProductReviewPatchAccept($id, $accept_language): \Sylius\Model\ProductReviewJsonldSyliusAdminProductReviewShow
```

Updates the ProductReview resource.

Updates the ProductReview 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\ProductReviewApi(
    // 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 | ProductReview 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->syliusApiAdminProductReviewPatchAccept($id, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductReviewApi->syliusApiAdminProductReviewPatchAccept: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

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

## `syliusApiAdminProductReviewPatchReject()`

```php
syliusApiAdminProductReviewPatchReject($id, $accept_language): \Sylius\Model\ProductReviewJsonldSyliusAdminProductReviewShow
```

Updates the ProductReview resource.

Updates the ProductReview 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\ProductReviewApi(
    // 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 | ProductReview 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->syliusApiAdminProductReviewPatchReject($id, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductReviewApi->syliusApiAdminProductReviewPatchReject: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

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

## `syliusApiAdminProductReviewPut()`

```php
syliusApiAdminProductReviewPut($id, $product_review_sylius_admin_product_review_update, $accept_language): \Sylius\Model\ProductReviewJsonldSyliusAdminProductReviewShow
```

Replaces the ProductReview resource.

Replaces the ProductReview 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\ProductReviewApi(
    // 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 | ProductReview identifier
$product_review_sylius_admin_product_review_update = new \Sylius\Model\ProductReviewSyliusAdminProductReviewUpdate(); // \Sylius\Model\ProductReviewSyliusAdminProductReviewUpdate | The updated ProductReview 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->syliusApiAdminProductReviewPut($id, $product_review_sylius_admin_product_review_update, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductReviewApi->syliusApiAdminProductReviewPut: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

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

## `syliusApiShopProductReviewGet()`

```php
syliusApiShopProductReviewGet($id, $accept_language): \Sylius\Model\ProductReviewJsonldSyliusShopProductReviewShow
```

Retrieves a ProductReview resource.

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

### Parameters

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

## `syliusApiShopProductReviewGetCollection()`

```php
syliusApiShopProductReviewGetCollection($page, $items_per_page, $order_created_at, $review_subject, $review_subject2, $accept_language): \Sylius\Model\SyliusApiShopProductReviewGetCollection200Response
```

Retrieves the collection of ProductReview resources.

Retrieves the collection of ProductReview 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\ProductReviewApi(
    // 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
$order_created_at = ''; // string | 
$review_subject = 'review_subject_example'; // string | 
$review_subject2 = array('review_subject_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->syliusApiShopProductReviewGetCollection($page, $items_per_page, $order_created_at, $review_subject, $review_subject2, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductReviewApi->syliusApiShopProductReviewGetCollection: ', $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] |
| **order_created_at** | **string**|  | [optional] [default to &#39;&#39;] |
| **review_subject** | **string**|  | [optional] |
| **review_subject2** | [**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\SyliusApiShopProductReviewGetCollection200Response**](../Model/SyliusApiShopProductReviewGetCollection200Response.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)

## `syliusApiShopProductReviewPost()`

```php
syliusApiShopProductReviewPost($product_review_add_product_review_sylius_shop_product_review_create, $accept_language): \Sylius\Model\ProductReviewJsonldSyliusShopProductReviewShow
```

Creates a ProductReview resource.

Creates a ProductReview 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\ProductReviewApi(
    // 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_review_add_product_review_sylius_shop_product_review_create = new \Sylius\Model\ProductReviewAddProductReviewSyliusShopProductReviewCreate(); // \Sylius\Model\ProductReviewAddProductReviewSyliusShopProductReviewCreate | The new ProductReview 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->syliusApiShopProductReviewPost($product_review_add_product_review_sylius_shop_product_review_create, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductReviewApi->syliusApiShopProductReviewPost: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **product_review_add_product_review_sylius_shop_product_review_create** | [**\Sylius\Model\ProductReviewAddProductReviewSyliusShopProductReviewCreate**](../Model/ProductReviewAddProductReviewSyliusShopProductReviewCreate.md)| The new ProductReview 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\ProductReviewJsonldSyliusShopProductReviewShow**](../Model/ProductReviewJsonldSyliusShopProductReviewShow.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)
