-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
324 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
/exchange-rates: | ||
get: | ||
summary: List all exchange rates. | ||
description: List exchange rates. | ||
operationId: listCurrencyExchangeRates | ||
tags: | ||
- currency_exchange_rates | ||
parameters: | ||
!correlationParameter,3 | ||
!limitParameter,3 | ||
!pageParameter,3 | ||
responses: | ||
"200": | ||
description: A list of all available currency exchange rates. | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
$ref: '#/components/schemas/CurrencyExchangeRateArray' | ||
!unauthenticatedResponse,3 | ||
!notFoundResponse,3 | ||
!badRequestResponse,3 | ||
!internalExceptionResponse,3 | ||
/exchange-rates/{id}: | ||
get: | ||
summary: List a single specific exchange rate. | ||
description: List a single specific exchange rate | ||
operationId: listSpecificCurrencyExchangeRate | ||
tags: | ||
- currency_exchange_rates | ||
parameters: | ||
!correlationParameter,3 | ||
!limitParameter,3 | ||
!pageParameter,3 | ||
- in: path | ||
name: id | ||
required: true | ||
schema: | ||
type: string | ||
example: "123" | ||
description: The ID of the requested currency exchange rate. | ||
responses: | ||
"200": | ||
description: A list of currency exchange rates. | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
$ref: '#/components/schemas/CurrencyExchangeRateSingle' | ||
!unauthenticatedResponse,3 | ||
!notFoundResponse,3 | ||
!badRequestResponse,3 | ||
!internalExceptionResponse,3 | ||
delete: | ||
operationId: deleteSpecificCurrencyExchangeRate | ||
description: "Delete a specific currency exchange rate." | ||
summary: "Delete a specific currency exchange rate." | ||
tags: | ||
- currency_exchange_rates | ||
parameters: | ||
!correlationParameter,3 | ||
- in: path | ||
name: id | ||
required: true | ||
schema: | ||
type: string | ||
example: "123" | ||
description: The ID of the requested currency exchange rate. | ||
responses: | ||
"204": | ||
description: "Currency exchange rate deleted." | ||
!unauthenticatedResponse,3 | ||
!notFoundResponse,3 | ||
!badRequestResponse,3 | ||
!internalExceptionResponse,3 | ||
put: | ||
summary: Update existing currency exchange rate. | ||
description: | | ||
Used to update a single currency exchange rate | ||
operationId: updateCurrencyExchangeRate | ||
parameters: | ||
!correlationParameter,3 | ||
- in: path | ||
name: id | ||
required: true | ||
schema: | ||
type: string | ||
example: "123" | ||
description: The ID of the currency exchange rate. | ||
tags: | ||
- links | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/CurrencyExchangeRateUpdate' | ||
application/x-www-form-urlencoded: | ||
schema: | ||
$ref: '#/components/schemas/CurrencyExchangeRateUpdate' | ||
description: JSON array or formdata with updated exchange rate information. See the model for the exact specifications. | ||
required: true | ||
responses: | ||
"200": | ||
description: 'Updated exchange rate stored, result in response' | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
$ref: '#/components/schemas/CurrencyExchangeRateSingle' | ||
!validationErrorResponse,3 | ||
!unauthenticatedResponse,3 | ||
!notFoundResponse,3 | ||
!badRequestResponse,3 | ||
|
||
/exchange-rates/rates/{from}/{to}: | ||
get: | ||
summary: List all exchange rate from/to the mentioned currencies. | ||
description: List all exchange rate from/to the mentioned currencies. | ||
operationId: listSpecificCurrencyExchangeRates | ||
tags: | ||
- currency_exchange_rates | ||
parameters: | ||
!correlationParameter,3 | ||
!limitParameter,3 | ||
!pageParameter,3 | ||
- in: path | ||
name: from | ||
required: true | ||
schema: | ||
type: string | ||
example: "EUR" | ||
description: "The currency code of the 'from' currency." | ||
- in: path | ||
name: from | ||
required: true | ||
schema: | ||
type: string | ||
example: "USD" | ||
description: "The currency code of the 'to' currency." | ||
responses: | ||
"200": | ||
description: A list of currency exchange rates. | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
$ref: '#/components/schemas/CurrencyExchangeRateArray' | ||
!unauthenticatedResponse,3 | ||
!notFoundResponse,3 | ||
!badRequestResponse,3 | ||
!internalExceptionResponse,3 | ||
delete: | ||
operationId: deleteSpecificCurrencyExchangeRates | ||
description: "Delete all currency exchange rates from 'from' to 'to' on a specific date or today." | ||
summary: "Delete all currency exchange rates from 'from' to 'to'." | ||
tags: | ||
- currency_exchange_rates | ||
parameters: | ||
!correlationParameter,3 | ||
- in: path | ||
name: from | ||
required: true | ||
schema: | ||
type: string | ||
example: "EUR" | ||
description: "The currency code of the 'from' currency." | ||
- in: path | ||
name: from | ||
required: true | ||
schema: | ||
type: string | ||
example: "USD" | ||
description: "The currency code of the 'to' currency." | ||
- in: query | ||
name: date | ||
description: | | ||
A date formatted YYYY-MM-DD. Defaults to today. | ||
required: false | ||
schema: | ||
type: string | ||
format: date | ||
example: "2018-09-17" | ||
responses: | ||
"204": | ||
description: "Currency exchange rate(s) deleted." | ||
!unauthenticatedResponse,3 | ||
!notFoundResponse,3 | ||
!badRequestResponse,3 | ||
!internalExceptionResponse,3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
CurrencyExchangeRateArray: | ||
type: object | ||
required: | ||
- data | ||
- meta | ||
- links | ||
properties: | ||
data: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/CurrencyExchangeRateRead' | ||
meta: | ||
$ref: '#/components/schemas/Meta' | ||
links: | ||
$ref: '#/components/schemas/PageLink' |
21 changes: 21 additions & 0 deletions
21
yaml/v1/schemas/models/CurrencyExchangeRate/CurrencyExchangeRateRead.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
CurrencyExchangeRateRead: | ||
type: object | ||
required: | ||
- type | ||
- id | ||
- attributes | ||
- links | ||
properties: | ||
type: | ||
type: string | ||
format: string | ||
example: "currency_exchange_rates" | ||
description: "Immutable value" | ||
id: | ||
type: string | ||
format: string | ||
example: "2" | ||
attributes: | ||
$ref: '#/components/schemas/CurrencyExchangeRateReadAttributes' | ||
links: | ||
$ref: '#/components/schemas/ObjectLink' |
73 changes: 73 additions & 0 deletions
73
yaml/v1/schemas/models/CurrencyExchangeRate/CurrencyExchangeRateReadAttributes.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
CurrencyExchangeRateReadAttributes: | ||
type: object | ||
properties: | ||
created_at: | ||
type: string | ||
format: date-time | ||
example: "2018-09-17T12:46:47+01:00" | ||
readOnly: true | ||
updated_at: | ||
type: string | ||
format: date-time | ||
example: "2018-09-17T12:46:47+01:00" | ||
readOnly: true | ||
from_currency_id: | ||
type: string | ||
format: string | ||
example: "12" | ||
readOnly: true | ||
description: "Base currency ID for this exchange rate entry." | ||
from_currency_code: | ||
type: string | ||
format: string | ||
example: "EUR" | ||
readOnly: true | ||
description: "Base currency code for this exchange rate entry." | ||
from_currency_symbol: | ||
type: string | ||
format: string | ||
example: "$" | ||
readOnly: true | ||
description: "Base currency symbol for this exchange rate entry." | ||
from_currency_decimal_places: | ||
type: integer | ||
format: int32 | ||
example: 2 | ||
readOnly: true | ||
description: "Base currency decimal places for this exchange rate entry." | ||
to_currency_id: | ||
type: string | ||
format: string | ||
example: "12" | ||
readOnly: true | ||
description: "Destination currency ID for this exchange rate entry." | ||
to_currency_code: | ||
type: string | ||
format: string | ||
example: "EUR" | ||
readOnly: true | ||
description: "Destination currency code for this exchange rate entry." | ||
to_currency_symbol: | ||
type: string | ||
format: string | ||
example: "$" | ||
readOnly: true | ||
description: "Destination currency symbol for this exchange rate entry." | ||
to_currency_decimal_places: | ||
type: integer | ||
format: int32 | ||
example: 2 | ||
readOnly: true | ||
description: "Destination currency decimal places for this exchange rate entry." | ||
rate: | ||
type: string | ||
format: string | ||
example: "1.10340" | ||
readOnly: true | ||
description: "The actual exchange rate. How many 'to' currency will you get for 1 'from' currency?" | ||
date: | ||
type: string | ||
format: date-time | ||
readOnly: true | ||
example: "2018-09-17T12:46:47+01:00" | ||
description: "Date and time of the exchange rate." |
7 changes: 7 additions & 0 deletions
7
yaml/v1/schemas/models/CurrencyExchangeRate/CurrencyExchangeRateSingle.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CurrencyExchangeRateSingle: | ||
type: object | ||
required: | ||
- data | ||
properties: | ||
data: | ||
$ref: '#/components/schemas/CurrencyExchangeRateRead' |
18 changes: 18 additions & 0 deletions
18
yaml/v1/schemas/models/CurrencyExchangeRate/CurrencyExchangeRateUpdate.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
CurrencyExchangeRateUpdate: | ||
type: object | ||
required: | ||
- date | ||
- rate | ||
properties: | ||
date: | ||
type: string | ||
format: date | ||
example: "2018-09-17" | ||
description: The date to which the exchange rate is applicable. | ||
nullable: false | ||
rate: | ||
type: string | ||
format: string | ||
nullable: false | ||
example: "2.3456" | ||
description: "The exchange rate from the base currency to the destination currency." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters