From c8122b2be67e35d401b05b79873cb485c44fdaf8 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Wed, 16 Jun 2021 12:56:04 +0100 Subject: [PATCH] add currency conversion examples (#164) --- currency/examples.json | 53 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 currency/examples.json diff --git a/currency/examples.json b/currency/examples.json new file mode 100644 index 0000000..65e27aa --- /dev/null +++ b/currency/examples.json @@ -0,0 +1,53 @@ + +{ + "rates": [{ + "title": "Get rates for USD", + "description": "Returns the rates for USD (sample response)", + "request": { + "code": "USD" + }, + "response": { + "code": "usd", + "rates": { + "AED": 3.6725, + "AFN": 79.0514, + "ALL": 101.6054, + "AMD": 515.68, + "ANG": 1.79, + "AOA": 646.8737, + "ARS": 95.3433, + "AUD": 1.2998, + "AWG": 1.79, + "AZN": 1.7013 + } + } + }], + "convert": [{ + "title": "Convert USD to GBP", + "description": "Convert from USD to GBP", + "request": { + "from": "USD", + "to": "GBP" + }, + "response": { + "from": "USD", + "to": "GBP", + "rate": 0.7104 + } + }, + { + "title": "Convert $10 USD to GBP", + "description": "Convert $10 from USD to GBP", + "request": { + "from": "USD", + "to": "GBP", + "amount": 10.0 + }, + "response": { + "from": "USD", + "to": "GBP", + "rate": 0.7104, + "amount": 7.104 + } + }] +}