Class: Io::Flow::V0::Models::ChannelCurrencyCapability
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ChannelCurrencyCapability
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of ChannelCurrencyCapability for this value, creating a new instance for an unknown value.
-
.from_string(value) ⇒ Object
Returns the instance of ChannelCurrencyCapability for this value, or nil if not found.
- .payment_authorizations ⇒ Object
- .settlement_currency ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ ChannelCurrencyCapability
constructor
A new instance of ChannelCurrencyCapability.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ ChannelCurrencyCapability
Returns a new instance of ChannelCurrencyCapability.
17891 17892 17893 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17891 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
17889 17890 17891 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17889 def value @value end |
Class Method Details
.ALL ⇒ Object
17911 17912 17913 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17911 def ChannelCurrencyCapability.ALL @@all ||= [ChannelCurrencyCapability., ChannelCurrencyCapability.settlement_currency] end |
.apply(value) ⇒ Object
Returns the instance of ChannelCurrencyCapability for this value, creating a new instance for an unknown value
17896 17897 17898 17899 17900 17901 17902 17903 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17896 def ChannelCurrencyCapability.apply(value) if value.instance_of?(ChannelCurrencyCapability) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || ChannelCurrencyCapability.new(value)) end end |
.from_string(value) ⇒ Object
Returns the instance of ChannelCurrencyCapability for this value, or nil if not found
17906 17907 17908 17909 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17906 def ChannelCurrencyCapability.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ChannelCurrencyCapability.ALL.find { |v| v.value == value } end |
.payment_authorizations ⇒ Object
17915 17916 17917 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17915 def ChannelCurrencyCapability. @@_payment_authorizations ||= ChannelCurrencyCapability.new('payment_authorizations') end |
.settlement_currency ⇒ Object
17919 17920 17921 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17919 def ChannelCurrencyCapability.settlement_currency @@_settlement_currency ||= ChannelCurrencyCapability.new('settlement_currency') end |
Instance Method Details
#to_hash ⇒ Object
17923 17924 17925 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17923 def to_hash value end |