# Sylius\ExchangeRateApi

Resource &#39;ExchangeRate&#39; operations.

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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**syliusApiAdminExchangeRateDelete()**](ExchangeRateApi.md#syliusApiAdminExchangeRateDelete) | **DELETE** /api/v2/admin/exchange-rates/{id} | Removes the ExchangeRate resource. |
| [**syliusApiAdminExchangeRateGet()**](ExchangeRateApi.md#syliusApiAdminExchangeRateGet) | **GET** /api/v2/admin/exchange-rates/{id} | Retrieves a ExchangeRate resource. |
| [**syliusApiAdminExchangeRateGetCollection()**](ExchangeRateApi.md#syliusApiAdminExchangeRateGetCollection) | **GET** /api/v2/admin/exchange-rates | Retrieves the collection of ExchangeRate resources. |
| [**syliusApiAdminExchangeRatePost()**](ExchangeRateApi.md#syliusApiAdminExchangeRatePost) | **POST** /api/v2/admin/exchange-rates | Creates a ExchangeRate resource. |
| [**syliusApiAdminExchangeRatePut()**](ExchangeRateApi.md#syliusApiAdminExchangeRatePut) | **PUT** /api/v2/admin/exchange-rates/{id} | Replaces the ExchangeRate resource. |
| [**syliusApiShopExchangeRateGet()**](ExchangeRateApi.md#syliusApiShopExchangeRateGet) | **GET** /api/v2/shop/exchange-rates/{id} | Retrieves a ExchangeRate resource. |
| [**syliusApiShopExchangeRateGetCollection()**](ExchangeRateApi.md#syliusApiShopExchangeRateGetCollection) | **GET** /api/v2/shop/exchange-rates | Retrieves the collection of ExchangeRate resources. |


## `syliusApiAdminExchangeRateDelete()`

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

Removes the ExchangeRate resource.

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

### Parameters

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

## `syliusApiAdminExchangeRateGet()`

```php
syliusApiAdminExchangeRateGet($id, $accept_language): \Sylius\Model\ExchangeRateJsonldSyliusAdminExchangeRateShow
```

Retrieves a ExchangeRate resource.

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

### Parameters

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

## `syliusApiAdminExchangeRateGetCollection()`

```php
syliusApiAdminExchangeRateGetCollection($page, $items_per_page, $currency_code, $accept_language): \Sylius\Model\SyliusApiAdminExchangeRateGetCollection200Response
```

Retrieves the collection of ExchangeRate resources.

Retrieves the collection of ExchangeRate 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\ExchangeRateApi(
    // 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
$currency_code = 'currency_code_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->syliusApiAdminExchangeRateGetCollection($page, $items_per_page, $currency_code, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExchangeRateApi->syliusApiAdminExchangeRateGetCollection: ', $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] |
| **currency_code** | **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] |

### Return type

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

## `syliusApiAdminExchangeRatePost()`

```php
syliusApiAdminExchangeRatePost($exchange_rate_sylius_admin_exchange_rate_create, $accept_language): \Sylius\Model\ExchangeRateJsonldSyliusAdminExchangeRateShow
```

Creates a ExchangeRate resource.

Creates a ExchangeRate 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\ExchangeRateApi(
    // 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
);
$exchange_rate_sylius_admin_exchange_rate_create = new \Sylius\Model\ExchangeRateSyliusAdminExchangeRateCreate(); // \Sylius\Model\ExchangeRateSyliusAdminExchangeRateCreate | The new ExchangeRate 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->syliusApiAdminExchangeRatePost($exchange_rate_sylius_admin_exchange_rate_create, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExchangeRateApi->syliusApiAdminExchangeRatePost: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **exchange_rate_sylius_admin_exchange_rate_create** | [**\Sylius\Model\ExchangeRateSyliusAdminExchangeRateCreate**](../Model/ExchangeRateSyliusAdminExchangeRateCreate.md)| The new ExchangeRate 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\ExchangeRateJsonldSyliusAdminExchangeRateShow**](../Model/ExchangeRateJsonldSyliusAdminExchangeRateShow.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)

## `syliusApiAdminExchangeRatePut()`

```php
syliusApiAdminExchangeRatePut($id, $exchange_rate_sylius_admin_exchange_rate_update, $accept_language): \Sylius\Model\ExchangeRateJsonldSyliusAdminExchangeRateShow
```

Replaces the ExchangeRate resource.

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

### Parameters

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

## `syliusApiShopExchangeRateGet()`

```php
syliusApiShopExchangeRateGet($id, $accept_language): \Sylius\Model\ExchangeRateJsonldSyliusShopExchangeRateShow
```

Retrieves a ExchangeRate resource.

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

### Parameters

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

## `syliusApiShopExchangeRateGetCollection()`

```php
syliusApiShopExchangeRateGetCollection($page, $items_per_page, $accept_language): \Sylius\Model\SyliusApiShopExchangeRateGetCollection200Response
```

Retrieves the collection of ExchangeRate resources.

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