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.
17053 17054 17055 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17053 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
17051 17052 17053 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17051 def value @value end |
Class Method Details
.ALL ⇒ Object
17073 17074 17075 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17073 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
17058 17059 17060 17061 17062 17063 17064 17065 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17058 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
17077 17078 17079 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17077 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
17068 17069 17070 17071 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17068 def MerchantOfRecord.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) MerchantOfRecord.ALL.find { |v| v.value == value } end |
.organization ⇒ Object
17081 17082 17083 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17081 def MerchantOfRecord.organization @@_organization ||= MerchantOfRecord.new('organization') end |
Instance Method Details
#to_hash ⇒ Object
17085 17086 17087 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17085 def to_hash value end |