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.
20773 20774 20775 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20773 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
20771 20772 20773 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20771 def value @value end |
Class Method Details
.ALL ⇒ Object
20793 20794 20795 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20793 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
20778 20779 20780 20781 20782 20783 20784 20785 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20778 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
20797 20798 20799 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20797 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
20788 20789 20790 20791 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20788 def MerchantOfRecord.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) MerchantOfRecord.ALL.find { |v| v.value == value } end |
.organization ⇒ Object
20801 20802 20803 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20801 def MerchantOfRecord.organization @@_organization ||= MerchantOfRecord.new('organization') end |
Instance Method Details
#to_hash ⇒ Object
20805 20806 20807 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20805 def to_hash value end |