class Io::Flow::Reference::V0::Models::PaymentMethodType
Attributes
value[R]
Public Class Methods
ALL()
click to toggle source
# File lib/flow_reference_v0_client.rb, line 297 def PaymentMethodType.ALL @@all ||= [PaymentMethodType.card, PaymentMethodType.online, PaymentMethodType.offline] end
apply(value)
click to toggle source
Returns the instance of PaymentMethodType
for this value, creating a new instance for an unknown value
# File lib/flow_reference_v0_client.rb, line 282 def PaymentMethodType.apply(value) if value.instance_of?(PaymentMethodType) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || PaymentMethodType.new(value)) end end
card()
click to toggle source
Represents all form of card payment (e.g. credit, debit, etc.)
# File lib/flow_reference_v0_client.rb, line 302 def PaymentMethodType.card @@_card ||= PaymentMethodType.new('card') end
from_string(value)
click to toggle source
Returns the instance of PaymentMethodType
for this value, or nil if not found
# File lib/flow_reference_v0_client.rb, line 292 def PaymentMethodType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) PaymentMethodType.ALL.find { |v| v.value == value } end
new(value)
click to toggle source
# File lib/flow_reference_v0_client.rb, line 277 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end
offline()
click to toggle source
Offline payment method types represent payments like Cash On Delivery which require offline collection
# File lib/flow_reference_v0_client.rb, line 314 def PaymentMethodType.offline @@_offline ||= PaymentMethodType.new('offline') end
online()
click to toggle source
Represents the most common form of alternative payment methods which require some degree of integration online (e.g. a redirect) to complete payment.
# File lib/flow_reference_v0_client.rb, line 308 def PaymentMethodType.online @@_online ||= PaymentMethodType.new('online') end
Public Instance Methods
to_hash()
click to toggle source
# File lib/flow_reference_v0_client.rb, line 318 def to_hash value end