Requests an fxRate creation.
The fxRate create request.
A promise that resolves to the created fxRate.
If the HTTP request fails.
// Example usage:
currencyExchangeService.createQuote(request)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error creating fxRate`);
});
Retrieves an fxRate.
The id of the fxRate.
A promise that resolves to the created fxRate.
If the HTTP request fails.
// Example usage:
currencyExchangeService.getQuote(quoteId)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(`Error fetching fxRate`);
});
Static
getRetrieves the singleton instance of the CurrencyExchangeService class.
The singleton instance of the CurrencyExchangeService class.
// Usage:
const currencyExchangeService = CurrencyExchangeService.getInstance();
Service class for managing currency exchange related operations.