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.
18171 18172 18173 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18171 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
18169 18170 18171 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18169 def value @value end |
Class Method Details
.ALL ⇒ Object
18191 18192 18193 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18191 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
18176 18177 18178 18179 18180 18181 18182 18183 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18176 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
18195 18196 18197 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18195 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
18186 18187 18188 18189 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18186 def OrderMerchantOfRecord.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) OrderMerchantOfRecord.ALL.find { |v| v.value == value } end |
.mixed ⇒ Object
18203 18204 18205 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18203 def OrderMerchantOfRecord.mixed @@_mixed ||= OrderMerchantOfRecord.new('mixed') end |
.organization ⇒ Object
18199 18200 18201 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18199 def OrderMerchantOfRecord.organization @@_organization ||= OrderMerchantOfRecord.new('organization') end |
Instance Method Details
#to_hash ⇒ Object
18207 18208 18209 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18207 def to_hash value end |