All URIs are relative to http://localhost, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
createCurrenciesResource() | POST /3/currencies | Create a currency |
getCurrenciesResource() | GET /3/currencies/{Code} | Retrieve a single currency |
listCurrenciesResource() | GET /3/currencies | Retrieve a list of currencies |
removeCurrenciesResource() | DELETE /3/currencies/{Code} | Remove a currency |
updateCurrenciesResource() | PUT /3/currencies/{Code} | Update a currency |
createCurrenciesResource($currency): \FortnoxApi\Model\CurrencyWrap
Create a currency
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new FortnoxApi\Api\CurrenciesResourceApi(
// 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()
);
$currency = new \FortnoxApi\Model\CurrencyWrap(); // \FortnoxApi\Model\CurrencyWrap | currency to create
try {
$result = $apiInstance->createCurrenciesResource($currency);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CurrenciesResourceApi->createCurrenciesResource: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
currency | \FortnoxApi\Model\CurrencyWrap | currency to create | [optional] |
\FortnoxApi\Model\CurrencyWrap
No authorization required
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getCurrenciesResource($code): \FortnoxApi\Model\CurrencyWrap
Retrieve a single currency
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new FortnoxApi\Api\CurrenciesResourceApi(
// 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()
);
$code = 'code_example'; // string | identifies currency
try {
$result = $apiInstance->getCurrenciesResource($code);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CurrenciesResourceApi->getCurrenciesResource: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
code | string | identifies currency |
\FortnoxApi\Model\CurrencyWrap
No authorization required
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listCurrenciesResource(): \FortnoxApi\Model\CurrencyList
Retrieve a list of currencies
The currency register can return a list of records or a single record. By specifying a Code in the URL, a single record will be returned. Not specifying a Code will return a list of records.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new FortnoxApi\Api\CurrenciesResourceApi(
// 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()
);
try {
$result = $apiInstance->listCurrenciesResource();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CurrenciesResourceApi->listCurrenciesResource: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
\FortnoxApi\Model\CurrencyList
No authorization required
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
removeCurrenciesResource($code)
Remove a currency
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new FortnoxApi\Api\CurrenciesResourceApi(
// 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()
);
$code = 'code_example'; // string | identifies the currency
try {
$apiInstance->removeCurrenciesResource($code);
} catch (Exception $e) {
echo 'Exception when calling CurrenciesResourceApi->removeCurrenciesResource: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
code | string | identifies the currency |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateCurrenciesResource($code, $currency): \FortnoxApi\Model\CurrencyWrap
Update a currency
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new FortnoxApi\Api\CurrenciesResourceApi(
// 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()
);
$code = 'code_example'; // string | identifies the currency
$currency = new \FortnoxApi\Model\CurrencyWrap(); // \FortnoxApi\Model\CurrencyWrap | to update
try {
$result = $apiInstance->updateCurrenciesResource($code, $currency);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CurrenciesResourceApi->updateCurrenciesResource: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
code | string | identifies the currency | |
currency | \FortnoxApi\Model\CurrencyWrap | to update | [optional] |
\FortnoxApi\Model\CurrencyWrap
No authorization required
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]