Sha256: c3887ea2b3e155e13dc5ea458284317e001fe017a80f995184bbdcb05ce07070
Contents?: true
Size: 1.43 KB
Versions: 1
Compression:
Stored size: 1.43 KB
Contents
# ----------------------------------------------------------------------- # Copyright © 2012 ShepHertz Technologies Pvt Ltd. All rights reserved. # ----------------------------------------------------------------------- require 'App42_Ruby_API/App42Response' # # An enum that contains 3 types of the Payment Status either DECLINED or # AUTHORIZED or PENDING. # # module App42 module Shopping class PaymentStatus < App42Response unless (const_defined?(:DECLINED)) DECLINED = "DECLINED" end unless (const_defined?(:AUTHORIZED)) AUTHORIZED = "AUTHORIZED" end unless (const_defined?(:PENDING)) PENDING = "PENDING" end # # Sets the value of the PaymentStatus. DECLINED or AUTHORIZED or PENDING. # # @param string # - the string of PaymentStatus either DECLINED or AUTHORIZED or # PENDING. # # def enum(string) return PaymentStatus.const_get(string) end # # Returns the value of the PaymentStatus. DECLINED or AUTHORIZED or # PENDING. # # @return the value of PaymentStatus. # # def isAvailable(string) if(string == "DECLINED") return "DECLINED" elsif(string == "AUTHORIZED") return "AUTHORIZED" elsif(string == "PENDING") return "PENDING"; else return nil end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
App42_Ruby_API-0.8.4 | lib/shopping/PaymentStatus.rb |