# Sylius\PaymentMethodApi

Resource &#39;PaymentMethod&#39; operations.

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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**syliusApiAdminPaymentMethodDelete()**](PaymentMethodApi.md#syliusApiAdminPaymentMethodDelete) | **DELETE** /api/v2/admin/payment-methods/{code} | Removes the PaymentMethod resource. |
| [**syliusApiAdminPaymentMethodGet()**](PaymentMethodApi.md#syliusApiAdminPaymentMethodGet) | **GET** /api/v2/admin/payment-methods/{code} | Retrieves a PaymentMethod resource. |
| [**syliusApiAdminPaymentMethodGetCollection()**](PaymentMethodApi.md#syliusApiAdminPaymentMethodGetCollection) | **GET** /api/v2/admin/payment-methods | Retrieves the collection of PaymentMethod resources. |
| [**syliusApiAdminPaymentMethodPost()**](PaymentMethodApi.md#syliusApiAdminPaymentMethodPost) | **POST** /api/v2/admin/payment-methods | Creates a PaymentMethod resource. |
| [**syliusApiAdminPaymentMethodPut()**](PaymentMethodApi.md#syliusApiAdminPaymentMethodPut) | **PUT** /api/v2/admin/payment-methods/{code} | Replaces the PaymentMethod resource. |
| [**syliusApiShopOrderPaymentPaymentMethodGetCollection()**](PaymentMethodApi.md#syliusApiShopOrderPaymentPaymentMethodGetCollection) | **GET** /api/v2/shop/orders/{tokenValue}/payments/{paymentId}/methods | Retrieves the collection of PaymentMethod resources. |
| [**syliusApiShopPaymentMethodGet()**](PaymentMethodApi.md#syliusApiShopPaymentMethodGet) | **GET** /api/v2/shop/payment-methods/{code} | Retrieves a PaymentMethod resource. |
| [**syliusApiShopPaymentMethodGetCollection()**](PaymentMethodApi.md#syliusApiShopPaymentMethodGetCollection) | **GET** /api/v2/shop/payment-methods | Retrieves the collection of PaymentMethod resources. |


## `syliusApiAdminPaymentMethodDelete()`

```php
syliusApiAdminPaymentMethodDelete($code, $accept_language)
```

Removes the PaymentMethod resource.

Removes the PaymentMethod 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\PaymentMethodApi(
    // 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
);
$code = 'code_example'; // string | PaymentMethod 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->syliusApiAdminPaymentMethodDelete($code, $accept_language);
} catch (Exception $e) {
    echo 'Exception when calling PaymentMethodApi->syliusApiAdminPaymentMethodDelete: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| PaymentMethod 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)

## `syliusApiAdminPaymentMethodGet()`

```php
syliusApiAdminPaymentMethodGet($code, $accept_language): \Sylius\Model\PaymentMethodJsonldSyliusAdminPaymentMethodShow
```

Retrieves a PaymentMethod resource.

Retrieves a PaymentMethod 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\PaymentMethodApi(
    // 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
);
$code = 'code_example'; // string | PaymentMethod 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->syliusApiAdminPaymentMethodGet($code, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentMethodApi->syliusApiAdminPaymentMethodGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| PaymentMethod 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\PaymentMethodJsonldSyliusAdminPaymentMethodShow**](../Model/PaymentMethodJsonldSyliusAdminPaymentMethodShow.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)

## `syliusApiAdminPaymentMethodGetCollection()`

```php
syliusApiAdminPaymentMethodGetCollection($page, $items_per_page, $order_code, $order_translation_name, $locale_code_for_order_translation_name, $translations_name, $code, $enabled, $accept_language): \Sylius\Model\SyliusApiAdminPaymentMethodGetCollection200Response
```

Retrieves the collection of PaymentMethod resources.

Retrieves the collection of PaymentMethod 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\PaymentMethodApi(
    // 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_code = ''; // string | 
$order_translation_name = 'order_translation_name_example'; // string | 
$locale_code_for_order_translation_name = 'locale_code_for_order_translation_name_example'; // string | 
$translations_name = 'translations_name_example'; // string | 
$code = 'code_example'; // string | 
$enabled = True; // bool | 
$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->syliusApiAdminPaymentMethodGetCollection($page, $items_per_page, $order_code, $order_translation_name, $locale_code_for_order_translation_name, $translations_name, $code, $enabled, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentMethodApi->syliusApiAdminPaymentMethodGetCollection: ', $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_code** | **string**|  | [optional] [default to &#39;&#39;] |
| **order_translation_name** | **string**|  | [optional] |
| **locale_code_for_order_translation_name** | **string**|  | [optional] |
| **translations_name** | **string**|  | [optional] |
| **code** | **string**|  | [optional] |
| **enabled** | **bool**|  | [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\SyliusApiAdminPaymentMethodGetCollection200Response**](../Model/SyliusApiAdminPaymentMethodGetCollection200Response.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)

## `syliusApiAdminPaymentMethodPost()`

```php
syliusApiAdminPaymentMethodPost($payment_method_sylius_admin_payment_method_create, $accept_language): \Sylius\Model\PaymentMethodJsonldSyliusAdminPaymentMethodShow
```

Creates a PaymentMethod resource.

Creates a PaymentMethod 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\PaymentMethodApi(
    // 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_method_sylius_admin_payment_method_create = new \Sylius\Model\PaymentMethodSyliusAdminPaymentMethodCreate(); // \Sylius\Model\PaymentMethodSyliusAdminPaymentMethodCreate | The new PaymentMethod 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->syliusApiAdminPaymentMethodPost($payment_method_sylius_admin_payment_method_create, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentMethodApi->syliusApiAdminPaymentMethodPost: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **payment_method_sylius_admin_payment_method_create** | [**\Sylius\Model\PaymentMethodSyliusAdminPaymentMethodCreate**](../Model/PaymentMethodSyliusAdminPaymentMethodCreate.md)| The new PaymentMethod 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\PaymentMethodJsonldSyliusAdminPaymentMethodShow**](../Model/PaymentMethodJsonldSyliusAdminPaymentMethodShow.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)

## `syliusApiAdminPaymentMethodPut()`

```php
syliusApiAdminPaymentMethodPut($code, $payment_method_sylius_admin_payment_method_update, $accept_language): \Sylius\Model\PaymentMethodJsonldSyliusAdminPaymentMethodShow
```

Replaces the PaymentMethod resource.

Replaces the PaymentMethod 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\PaymentMethodApi(
    // 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
);
$code = 'code_example'; // string | PaymentMethod identifier
$payment_method_sylius_admin_payment_method_update = new \Sylius\Model\PaymentMethodSyliusAdminPaymentMethodUpdate(); // \Sylius\Model\PaymentMethodSyliusAdminPaymentMethodUpdate | The updated PaymentMethod 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->syliusApiAdminPaymentMethodPut($code, $payment_method_sylius_admin_payment_method_update, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentMethodApi->syliusApiAdminPaymentMethodPut: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| PaymentMethod identifier | |
| **payment_method_sylius_admin_payment_method_update** | [**\Sylius\Model\PaymentMethodSyliusAdminPaymentMethodUpdate**](../Model/PaymentMethodSyliusAdminPaymentMethodUpdate.md)| The updated PaymentMethod 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\PaymentMethodJsonldSyliusAdminPaymentMethodShow**](../Model/PaymentMethodJsonldSyliusAdminPaymentMethodShow.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)

## `syliusApiShopOrderPaymentPaymentMethodGetCollection()`

```php
syliusApiShopOrderPaymentPaymentMethodGetCollection($token_value, $payment_id, $page, $items_per_page, $accept_language): \Sylius\Model\SyliusApiShopOrderPaymentPaymentMethodGetCollection200Response
```

Retrieves the collection of PaymentMethod resources.

Retrieves the collection of PaymentMethod 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\PaymentMethodApi(
    // 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 | PaymentMethod identifier
$payment_id = 'payment_id_example'; // string | PaymentMethod 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->syliusApiShopOrderPaymentPaymentMethodGetCollection($token_value, $payment_id, $page, $items_per_page, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentMethodApi->syliusApiShopOrderPaymentPaymentMethodGetCollection: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

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

## `syliusApiShopPaymentMethodGet()`

```php
syliusApiShopPaymentMethodGet($code, $accept_language): \Sylius\Model\PaymentMethodJsonldSyliusShopPaymentMethodShow
```

Retrieves a PaymentMethod resource.

Retrieves a PaymentMethod 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\PaymentMethodApi(
    // 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
);
$code = 'code_example'; // string | PaymentMethod 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->syliusApiShopPaymentMethodGet($code, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentMethodApi->syliusApiShopPaymentMethodGet: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| PaymentMethod 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\PaymentMethodJsonldSyliusShopPaymentMethodShow**](../Model/PaymentMethodJsonldSyliusShopPaymentMethodShow.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)

## `syliusApiShopPaymentMethodGetCollection()`

```php
syliusApiShopPaymentMethodGetCollection($accept_language): \Sylius\Model\SyliusApiShopPaymentMethodGetCollection200Response
```

Retrieves the collection of PaymentMethod resources.

Retrieves the collection of PaymentMethod 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\PaymentMethodApi(
    // 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
);
$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->syliusApiShopPaymentMethodGetCollection($accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentMethodApi->syliusApiShopPaymentMethodGetCollection: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

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