# Sylius\CurrencyApi

Resource &#39;Currency&#39; operations.

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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**syliusApiAdminCurrencyGet()**](CurrencyApi.md#syliusApiAdminCurrencyGet) | **GET** /api/v2/admin/currencies/{code} | Retrieves a Currency resource. |
| [**syliusApiAdminCurrencyGetCollection()**](CurrencyApi.md#syliusApiAdminCurrencyGetCollection) | **GET** /api/v2/admin/currencies | Retrieves the collection of Currency resources. |
| [**syliusApiAdminCurrencyPost()**](CurrencyApi.md#syliusApiAdminCurrencyPost) | **POST** /api/v2/admin/currencies | Creates a Currency resource. |
| [**syliusApiShopCurrencyGet()**](CurrencyApi.md#syliusApiShopCurrencyGet) | **GET** /api/v2/shop/currencies/{code} | Retrieves a Currency resource. |
| [**syliusApiShopCurrencyGetCollection()**](CurrencyApi.md#syliusApiShopCurrencyGetCollection) | **GET** /api/v2/shop/currencies | Retrieves the collection of Currency resources. |


## `syliusApiAdminCurrencyGet()`

```php
syliusApiAdminCurrencyGet($code, $accept_language): \Sylius\Model\CurrencyJsonldSyliusAdminCurrencyShow
```

Retrieves a Currency resource.

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

### Parameters

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

## `syliusApiAdminCurrencyGetCollection()`

```php
syliusApiAdminCurrencyGetCollection($page, $items_per_page, $accept_language): \Sylius\Model\SyliusApiAdminCurrencyGetCollection200Response
```

Retrieves the collection of Currency resources.

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

## `syliusApiAdminCurrencyPost()`

```php
syliusApiAdminCurrencyPost($currency_sylius_admin_currency_create, $accept_language): \Sylius\Model\CurrencyJsonldSyliusAdminCurrencyShow
```

Creates a Currency resource.

Creates a Currency 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\CurrencyApi(
    // 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
);
$currency_sylius_admin_currency_create = new \Sylius\Model\CurrencySyliusAdminCurrencyCreate(); // \Sylius\Model\CurrencySyliusAdminCurrencyCreate | The new Currency 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->syliusApiAdminCurrencyPost($currency_sylius_admin_currency_create, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CurrencyApi->syliusApiAdminCurrencyPost: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **currency_sylius_admin_currency_create** | [**\Sylius\Model\CurrencySyliusAdminCurrencyCreate**](../Model/CurrencySyliusAdminCurrencyCreate.md)| The new Currency 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\CurrencyJsonldSyliusAdminCurrencyShow**](../Model/CurrencyJsonldSyliusAdminCurrencyShow.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)

## `syliusApiShopCurrencyGet()`

```php
syliusApiShopCurrencyGet($code, $accept_language): \Sylius\Model\CurrencyJsonldSyliusShopCurrencyShow
```

Retrieves a Currency resource.

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

### Parameters

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

## `syliusApiShopCurrencyGetCollection()`

```php
syliusApiShopCurrencyGetCollection($page, $items_per_page, $accept_language): \Sylius\Model\SyliusApiShopCurrencyGetCollection200Response
```

Retrieves the collection of Currency resources.

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