UNPKG

@eastsideco/escshopify

Version:

WIP JS library for Shopify, containing a variety of useful functionality.

28 lines (25 loc) 801 B
/** * Provides information about available currencies. * This is an abstract class which resolvers should extend from. * @public */ export default class CurrencyResolver { /** * List the available currencies. * @return {String[]} * @throws {Error} - CurrencyResolver should implement listCurrencyCodes */ async listCurrencyCodes() { throw Error('CurrencyResolver should implement listCurrencyCodes'); } /** * Get conversion rate for a specific currency pair. * @param {String} from * @param {String} to * @return {Number} * @throws {Error} - CurrencyResolver should implement getConversionRate */ async getConversionRate(from, to) { throw Error('CurrencyResolver should implement getConversionRate'); } }