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.
17133 17134 17135 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17133 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
17131 17132 17133 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17131 def value @value end |
Class Method Details
.ALL ⇒ Object
17153 17154 17155 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17153 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
17138 17139 17140 17141 17142 17143 17144 17145 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17138 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
17157 17158 17159 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17157 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
17148 17149 17150 17151 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17148 def OrderMerchantOfRecord.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) OrderMerchantOfRecord.ALL.find { |v| v.value == value } end |
.mixed ⇒ Object
17165 17166 17167 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17165 def OrderMerchantOfRecord.mixed @@_mixed ||= OrderMerchantOfRecord.new('mixed') end |
.organization ⇒ Object
17161 17162 17163 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17161 def OrderMerchantOfRecord.organization @@_organization ||= OrderMerchantOfRecord.new('organization') end |
Instance Method Details
#to_hash ⇒ Object
17169 17170 17171 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17169 def to_hash value end |