# Sylius\PaymentRequestApi

Resource &#39;PaymentRequest&#39; operations.

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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**syliusApiAdminPaymentPaymentRequestGetCollection()**](PaymentRequestApi.md#syliusApiAdminPaymentPaymentRequestGetCollection) | **GET** /api/v2/admin/payments/{paymentId}/payment-requests | Retrieves the collection of PaymentRequest resources. |
| [**syliusApiAdminPaymentRequestGet()**](PaymentRequestApi.md#syliusApiAdminPaymentRequestGet) | **GET** /api/v2/admin/payment-requests/{hash} | Retrieves a PaymentRequest resource. |
| [**syliusApiShopPaymentRequestGet()**](PaymentRequestApi.md#syliusApiShopPaymentRequestGet) | **GET** /api/v2/shop/payment-requests/{hash} | Retrieves a PaymentRequest resource. |
| [**syliusApiShopPaymentRequestPost()**](PaymentRequestApi.md#syliusApiShopPaymentRequestPost) | **POST** /api/v2/shop/orders/{tokenValue}/payment-requests | Creates a PaymentRequest resource. |
| [**syliusApiShopPaymentRequestPut()**](PaymentRequestApi.md#syliusApiShopPaymentRequestPut) | **PUT** /api/v2/shop/payment-requests/{hash} | Replaces the PaymentRequest resource. |


## `syliusApiAdminPaymentPaymentRequestGetCollection()`

```php
syliusApiAdminPaymentPaymentRequestGetCollection($payment_id, $page, $items_per_page, $action, $action2, $method_code, $method_code2, $state, $state2, $accept_language): \Sylius\Model\SyliusApiAdminPaymentPaymentRequestGetCollection200Response
```

Retrieves the collection of PaymentRequest resources.

Retrieves the collection of PaymentRequest 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\PaymentRequestApi(
    // 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
);
$payment_id = 'payment_id_example'; // string | PaymentRequest identifier
$page = 1; // int | The collection page number
$items_per_page = 30; // int | The number of items per page
$action = 'action_example'; // string | 
$action2 = array('action_example'); // string[] | 
$method_code = 'method_code_example'; // string | 
$method_code2 = array('method_code_example'); // string[] | 
$state = 'state_example'; // string | 
$state2 = array('state_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->syliusApiAdminPaymentPaymentRequestGetCollection($payment_id, $page, $items_per_page, $action, $action2, $method_code, $method_code2, $state, $state2, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentRequestApi->syliusApiAdminPaymentPaymentRequestGetCollection: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **payment_id** | **string**| PaymentRequest 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] |
| **action** | **string**|  | [optional] |
| **action2** | [**string[]**](../Model/string.md)|  | [optional] |
| **method_code** | **string**|  | [optional] |
| **method_code2** | [**string[]**](../Model/string.md)|  | [optional] |
| **state** | **string**|  | [optional] |
| **state2** | [**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\SyliusApiAdminPaymentPaymentRequestGetCollection200Response**](../Model/SyliusApiAdminPaymentPaymentRequestGetCollection200Response.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)

## `syliusApiAdminPaymentRequestGet()`

```php
syliusApiAdminPaymentRequestGet($hash, $accept_language): \Sylius\Model\PaymentRequestJsonldSyliusAdminPaymentRequestShow
```

Retrieves a PaymentRequest resource.

Retrieves a PaymentRequest 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\PaymentRequestApi(
    // 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
);
$hash = 'hash_example'; // string | PaymentRequest 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->syliusApiAdminPaymentRequestGet($hash, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentRequestApi->syliusApiAdminPaymentRequestGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **hash** | **string**| PaymentRequest 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\PaymentRequestJsonldSyliusAdminPaymentRequestShow**](../Model/PaymentRequestJsonldSyliusAdminPaymentRequestShow.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)

## `syliusApiShopPaymentRequestGet()`

```php
syliusApiShopPaymentRequestGet($hash, $accept_language): \Sylius\Model\PaymentRequestJsonldSyliusShopPaymentRequestShow
```

Retrieves a PaymentRequest resource.

Retrieves a PaymentRequest 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\PaymentRequestApi(
    // 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
);
$hash = 'hash_example'; // string | PaymentRequest 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->syliusApiShopPaymentRequestGet($hash, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentRequestApi->syliusApiShopPaymentRequestGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **hash** | **string**| PaymentRequest 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\PaymentRequestJsonldSyliusShopPaymentRequestShow**](../Model/PaymentRequestJsonldSyliusShopPaymentRequestShow.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)

## `syliusApiShopPaymentRequestPost()`

```php
syliusApiShopPaymentRequestPost($token_value, $payment_request_add_payment_request_sylius_shop_payment_request_create, $accept_language): \Sylius\Model\PaymentRequestJsonldSyliusShopPaymentRequestShow
```

Creates a PaymentRequest resource.

Creates a PaymentRequest 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\PaymentRequestApi(
    // 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
);
$token_value = 'token_value_example'; // string | PaymentRequest identifier
$payment_request_add_payment_request_sylius_shop_payment_request_create = new \Sylius\Model\PaymentRequestAddPaymentRequestSyliusShopPaymentRequestCreate(); // \Sylius\Model\PaymentRequestAddPaymentRequestSyliusShopPaymentRequestCreate | The new PaymentRequest 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->syliusApiShopPaymentRequestPost($token_value, $payment_request_add_payment_request_sylius_shop_payment_request_create, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentRequestApi->syliusApiShopPaymentRequestPost: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **token_value** | **string**| PaymentRequest identifier | |
| **payment_request_add_payment_request_sylius_shop_payment_request_create** | [**\Sylius\Model\PaymentRequestAddPaymentRequestSyliusShopPaymentRequestCreate**](../Model/PaymentRequestAddPaymentRequestSyliusShopPaymentRequestCreate.md)| The new PaymentRequest 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\PaymentRequestJsonldSyliusShopPaymentRequestShow**](../Model/PaymentRequestJsonldSyliusShopPaymentRequestShow.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)

## `syliusApiShopPaymentRequestPut()`

```php
syliusApiShopPaymentRequestPut($hash, $payment_request_update_payment_request_sylius_shop_payment_request_update, $accept_language): \Sylius\Model\PaymentRequestJsonldSyliusShopPaymentRequestShow
```

Replaces the PaymentRequest resource.

Replaces the PaymentRequest 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\PaymentRequestApi(
    // 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
);
$hash = 'hash_example'; // string | PaymentRequest identifier
$payment_request_update_payment_request_sylius_shop_payment_request_update = new \Sylius\Model\PaymentRequestUpdatePaymentRequestSyliusShopPaymentRequestUpdate(); // \Sylius\Model\PaymentRequestUpdatePaymentRequestSyliusShopPaymentRequestUpdate | The updated PaymentRequest 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->syliusApiShopPaymentRequestPut($hash, $payment_request_update_payment_request_sylius_shop_payment_request_update, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentRequestApi->syliusApiShopPaymentRequestPut: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **hash** | **string**| PaymentRequest identifier | |
| **payment_request_update_payment_request_sylius_shop_payment_request_update** | [**\Sylius\Model\PaymentRequestUpdatePaymentRequestSyliusShopPaymentRequestUpdate**](../Model/PaymentRequestUpdatePaymentRequestSyliusShopPaymentRequestUpdate.md)| The updated PaymentRequest 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\PaymentRequestJsonldSyliusShopPaymentRequestShow**](../Model/PaymentRequestJsonldSyliusShopPaymentRequestShow.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)
