class Io::Flow::V0::Models::CardType
Attributes
value[R]
Public Class Methods
ALL()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17741 def CardType.ALL @@all ||= [CardType.american_express, CardType.cartes_bancaires, CardType.china_union_pay, CardType.dankort, CardType.diners_club, CardType.discover, CardType.jcb, CardType.maestro, CardType.mastercard, CardType.visa] end
american_express()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17745 def CardType.american_express @@_american_express ||= CardType.new('american_express') end
apply(value)
click to toggle source
Returns the instance of CardType
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 17726 def CardType.apply(value) if value.instance_of?(CardType) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || CardType.new(value)) end end
cartes_bancaires()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17749 def CardType.cartes_bancaires @@_cartes_bancaires ||= CardType.new('cartes_bancaires') end
china_union_pay()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17753 def CardType.china_union_pay @@_china_union_pay ||= CardType.new('china_union_pay') end
dankort()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17757 def CardType.dankort @@_dankort ||= CardType.new('dankort') end
diners_club()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17761 def CardType.diners_club @@_diners_club ||= CardType.new('diners_club') end
discover()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17765 def CardType.discover @@_discover ||= CardType.new('discover') end
from_string(value)
click to toggle source
Returns the instance of CardType
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 17736 def CardType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) CardType.ALL.find { |v| v.value == value } end
jcb()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17769 def CardType.jcb @@_jcb ||= CardType.new('jcb') end
maestro()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17773 def CardType.maestro @@_maestro ||= CardType.new('maestro') end
mastercard()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17777 def CardType.mastercard @@_mastercard ||= CardType.new('mastercard') end
new(value)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17721 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end
visa()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17781 def CardType.visa @@_visa ||= CardType.new('visa') end
Public Instance Methods
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17785 def to_hash value end