Class: Io::Flow::V0::Models::MerchantOfRecord
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::MerchantOfRecord
- 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 MerchantOfRecord for this value, creating a new instance for an unknown value.
- .flow ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of MerchantOfRecord for this value, or nil if not found.
- .organization ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ MerchantOfRecord
constructor
A new instance of MerchantOfRecord.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ MerchantOfRecord
Returns a new instance of MerchantOfRecord.
16831 16832 16833 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16831 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
16829 16830 16831 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16829 def value @value end |
Class Method Details
.ALL ⇒ Object
16851 16852 16853 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16851 def MerchantOfRecord.ALL @@all ||= [MerchantOfRecord.flow, MerchantOfRecord.organization] end |
.apply(value) ⇒ Object
Returns the instance of MerchantOfRecord for this value, creating a new instance for an unknown value
16836 16837 16838 16839 16840 16841 16842 16843 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16836 def MerchantOfRecord.apply(value) if value.instance_of?(MerchantOfRecord) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || MerchantOfRecord.new(value)) end end |
.flow ⇒ Object
16855 16856 16857 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16855 def MerchantOfRecord.flow @@_flow ||= MerchantOfRecord.new('flow') end |
.from_string(value) ⇒ Object
Returns the instance of MerchantOfRecord for this value, or nil if not found
16846 16847 16848 16849 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16846 def MerchantOfRecord.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) MerchantOfRecord.ALL.find { |v| v.value == value } end |
.organization ⇒ Object
16859 16860 16861 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16859 def MerchantOfRecord.organization @@_organization ||= MerchantOfRecord.new('organization') end |
Instance Method Details
#to_hash ⇒ Object
16863 16864 16865 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16863 def to_hash value end |