Sign inSign up

swarnadeepghosh/currency-conversion

By swarnadeepghosh

•Updated about 3 years ago
Archived

Image
0

56

swarnadeepghosh/currency-conversion repository overview

⁠Currency Conversion Microservice

Currency Conversion Service is used to convert a bucket of currencies. If you want to find the value of 10 USD, Currency Conversion Service returns 600.

  • STEP 1 : Currency Conversion Service calls the Currency Exchange Service for the value of 1 USD. It gets a response back saying 60.
  • STEP 2 : The Currency Conversion Service then multiplies 10 by 60, and returns 600 back.

GET : http://localhost:8100/currency-conversion/from/EUR/to/INR/quantity/10⁠

{
  "id": 10002,
  "from": "EUR",
  "to": "INR",
  "conversionMultiple": 75.00,
  "quantity": 10,
  "totalCalculatedAmount": 750.00,
  "exchangeEnvironmentInfo": "37f1ad927c6e v1 27c6e",
  "conversionEnvironmentInfo": "fb6316b5713d v1 5713d"
}

How does Currency Conversion know the location of Currency Exchange?

  • You don’t want to HARDCODE
  • Configure an Environment Variable - CURRENCY_EXCHANGE_SERVICE_HOST
  • --env CURRENCY_EXCHANGE_SERVICE_HOST=http://currency-exchange (Syntax –> http://<microservice name>)

Tag summary

Content type

Image

Digest

sha256:ad3d13318…

Size

115.9 MB

Last updated

about 3 years ago

docker pull swarnadeepghosh/currency-conversion:0.0.1-RELEASE