Class: Io::Flow::V0::Models::OrderMerchantOfRecord
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderMerchantOfRecord
- 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 OrderMerchantOfRecord for this value, creating a new instance for an unknown value.
- .flow ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of OrderMerchantOfRecord for this value, or nil if not found.
- .mixed ⇒ Object
- .organization ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ OrderMerchantOfRecord
constructor
A new instance of OrderMerchantOfRecord.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ OrderMerchantOfRecord
Returns a new instance of OrderMerchantOfRecord.
13191 13192 13193 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13191 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
13189 13190 13191 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13189 def value @value end |
Class Method Details
.ALL ⇒ Object
13211 13212 13213 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13211 def OrderMerchantOfRecord.ALL @@all ||= [OrderMerchantOfRecord.flow, OrderMerchantOfRecord.organization, OrderMerchantOfRecord.mixed] end |
.apply(value) ⇒ Object
Returns the instance of OrderMerchantOfRecord for this value, creating a new instance for an unknown value
13196 13197 13198 13199 13200 13201 13202 13203 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13196 def OrderMerchantOfRecord.apply(value) if value.instance_of?(OrderMerchantOfRecord) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || OrderMerchantOfRecord.new(value)) end end |
.flow ⇒ Object
13215 13216 13217 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13215 def OrderMerchantOfRecord.flow @@_flow ||= OrderMerchantOfRecord.new('flow') end |
.from_string(value) ⇒ Object
Returns the instance of OrderMerchantOfRecord for this value, or nil if not found
13206 13207 13208 13209 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13206 def OrderMerchantOfRecord.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) OrderMerchantOfRecord.ALL.find { |v| v.value == value } end |
.mixed ⇒ Object
13223 13224 13225 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13223 def OrderMerchantOfRecord.mixed @@_mixed ||= OrderMerchantOfRecord.new('mixed') end |
.organization ⇒ Object
13219 13220 13221 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13219 def OrderMerchantOfRecord.organization @@_organization ||= OrderMerchantOfRecord.new('organization') end |
Instance Method Details
#to_hash ⇒ Object
13227 13228 13229 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13227 def to_hash value end |