# Sylius\PaymentApi

Resource &#39;Payment&#39; operations.

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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**syliusApiAdminOrderPaymentGetCollection()**](PaymentApi.md#syliusApiAdminOrderPaymentGetCollection) | **GET** /api/v2/admin/orders/{tokenValue}/payments | Retrieves the collection of Payment resources. |
| [**syliusApiAdminPaymentGet()**](PaymentApi.md#syliusApiAdminPaymentGet) | **GET** /api/v2/admin/payments/{id} | Retrieves a Payment resource. |
| [**syliusApiAdminPaymentGetCollection()**](PaymentApi.md#syliusApiAdminPaymentGetCollection) | **GET** /api/v2/admin/payments | Retrieves the collection of Payment resources. |
| [**syliusApiAdminPaymentPatchComplete()**](PaymentApi.md#syliusApiAdminPaymentPatchComplete) | **PATCH** /api/v2/admin/payments/{id}/complete | Updates the Payment resource. |
| [**syliusApiAdminPaymentPatchRefund()**](PaymentApi.md#syliusApiAdminPaymentPatchRefund) | **PATCH** /api/v2/admin/payments/{id}/refund | Updates the Payment resource. |
| [**syliusApiShopOrderPaymentGet()**](PaymentApi.md#syliusApiShopOrderPaymentGet) | **GET** /api/v2/shop/orders/{tokenValue}/payments/{paymentId} | Retrieves a Payment resource. |


## `syliusApiAdminOrderPaymentGetCollection()`

```php
syliusApiAdminOrderPaymentGetCollection($token_value, $page, $items_per_page, $accept_language): \Sylius\Model\SyliusApiAdminOrderPaymentGetCollection200Response
```

Retrieves the collection of Payment resources.

Retrieves the collection of Payment 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\PaymentApi(
    // 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 | Payment identifier
$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->syliusApiAdminOrderPaymentGetCollection($token_value, $page, $items_per_page, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentApi->syliusApiAdminOrderPaymentGetCollection: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **token_value** | **string**| Payment 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] |
| **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\SyliusApiAdminOrderPaymentGetCollection200Response**](../Model/SyliusApiAdminOrderPaymentGetCollection200Response.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)

## `syliusApiAdminPaymentGet()`

```php
syliusApiAdminPaymentGet($id, $accept_language): \Sylius\Model\PaymentJsonldSyliusAdminPaymentShow
```

Retrieves a Payment resource.

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

### Parameters

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

## `syliusApiAdminPaymentGetCollection()`

```php
syliusApiAdminPaymentGetCollection($page, $items_per_page, $state, $state2, $order_channel_code, $order_channel_code2, $order_created_at, $accept_language): \Sylius\Model\SyliusApiAdminOrderPaymentGetCollection200Response
```

Retrieves the collection of Payment resources.

Retrieves the collection of Payment 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\PaymentApi(
    // 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
$state = 'state_example'; // string | 
$state2 = array('state_example'); // string[] | 
$order_channel_code = 'order_channel_code_example'; // string | 
$order_channel_code2 = array('order_channel_code_example'); // string[] | 
$order_created_at = ''; // 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->syliusApiAdminPaymentGetCollection($page, $items_per_page, $state, $state2, $order_channel_code, $order_channel_code2, $order_created_at, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentApi->syliusApiAdminPaymentGetCollection: ', $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] |
| **state** | **string**|  | [optional] |
| **state2** | [**string[]**](../Model/string.md)|  | [optional] |
| **order_channel_code** | **string**|  | [optional] |
| **order_channel_code2** | [**string[]**](../Model/string.md)|  | [optional] |
| **order_created_at** | **string**|  | [optional] [default to &#39;&#39;] |
| **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\SyliusApiAdminOrderPaymentGetCollection200Response**](../Model/SyliusApiAdminOrderPaymentGetCollection200Response.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)

## `syliusApiAdminPaymentPatchComplete()`

```php
syliusApiAdminPaymentPatchComplete($id, $accept_language): \Sylius\Model\PaymentJsonldSyliusAdminPaymentShow
```

Updates the Payment resource.

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

### Parameters

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

## `syliusApiAdminPaymentPatchRefund()`

```php
syliusApiAdminPaymentPatchRefund($id, $accept_language): \Sylius\Model\PaymentJsonldSyliusAdminPaymentShow
```

Updates the Payment resource.

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

### Parameters

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

## `syliusApiShopOrderPaymentGet()`

```php
syliusApiShopOrderPaymentGet($token_value, $payment_id, $accept_language): \Sylius\Model\PaymentJsonldSyliusShopPaymentShow
```

Retrieves a Payment resource.

Retrieves a Payment 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\PaymentApi(
    // 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 | Payment identifier
$payment_id = 'payment_id_example'; // string | Payment 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->syliusApiShopOrderPaymentGet($token_value, $payment_id, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentApi->syliusApiShopOrderPaymentGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **token_value** | **string**| Payment identifier | |
| **payment_id** | **string**| Payment 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\PaymentJsonldSyliusShopPaymentShow**](../Model/PaymentJsonldSyliusShopPaymentShow.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)
