UNPKG

paytm-pg-node-sdk

Version:
51 lines (50 loc) 1.14 kB
"use strict"; /** * Copyright (C) 2019 Paytm. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.EnumCurrency = void 0; /** * This Enum represents the total list of currencies supported by the system * */ /* class: EnumCurrency */ class EnumCurrency { /** * @return string */ getCurrency() { return this.currency; } /** * EnumCurrency constructor. * @param string currency */ constructor(currency) { this.currency = currency; } /** * @return array */ static getEnumCurrencyOptions() { return [ EnumCurrency.INR, ]; } /** * @param currency * @return int * @throws Exception */ static getEnumByCurrency(currency) { var enumOptions = this.getEnumCurrencyOptions(); for (var x in enumOptions) { if (currency == enumOptions[x]) { return x; } } throw new Error("FacadeInvalidParameterException : Given value of Currency is not supported"); } } exports.EnumCurrency = EnumCurrency; EnumCurrency.INR = "INR";