require 'App42Response.rb' module App42 module AppTab # # An enum that contains the Currency Unit to be mentioned in the Bill. # class Currency < App42Response unless (const_defined?(:USD)) USD = "USD" end unless (const_defined?(:EUR)) EUR = "EUR" end unless (const_defined?(:INR)) INR = "INR" end unless (const_defined?(:YEN)) YEN = "YEN" end unless (const_defined?(:GBP)) GBP = "GBP" end unless (const_defined?(:ASD)) ASD = "ASD" end unless (const_defined?(:CAD)) CAD = "CAD" end unless (const_defined?(:NZD)) NZD = "NZD" end unless (const_defined?(:CNY)) CNY = "CNY" end # # Sets the value of the CurrencyUnit. # # @param value # - the value of CurrencyUnit # def enum(string) return Currency.const_get(string) end # # Returns the value of the CurrencyUnit. # # @return the value of CurrencyUnit. # def isAvailable(string) if(string == "USD") return "USD" elsif(string == "EUR") return "EUR" elsif(string == "INR") return "INR" elsif(string == "YEN") return "YEN" elsif(string == "GBP") return "GBP" elsif(string == "ASD") return "ASD" elsif(string == "CAD") return "CAD" elsif(string == "NZD") return "NZD" elsif(string == "CNY") return "CNY"; else return nil end end end end end