class Io::Flow::V0::Models::PaymentMethodCapability
Attributes
value[R]
Public Class Methods
ALL()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24323 def PaymentMethodCapability.ALL @@all ||= [PaymentMethodCapability.credit, PaymentMethodCapability.debit] end
apply(value)
click to toggle source
Returns the instance of PaymentMethodCapability
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 24308 def PaymentMethodCapability.apply(value) if value.instance_of?(PaymentMethodCapability) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || PaymentMethodCapability.new(value)) end end
credit()
click to toggle source
Credit cards provide access to a line of debt issued by a bank.
# File lib/flow_commerce/flow_api_v0_client.rb, line 24328 def PaymentMethodCapability.credit @@_credit ||= PaymentMethodCapability.new('credit') end
debit()
click to toggle source
Debit cards deduct money directly from a bank account.
# File lib/flow_commerce/flow_api_v0_client.rb, line 24333 def PaymentMethodCapability.debit @@_debit ||= PaymentMethodCapability.new('debit') end
from_string(value)
click to toggle source
Returns the instance of PaymentMethodCapability
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 24318 def PaymentMethodCapability.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) PaymentMethodCapability.ALL.find { |v| v.value == value } end
new(value)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24303 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end
Public Instance Methods
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 24337 def to_hash value end