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.
23072 23073 23074 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23072 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
23070 23071 23072 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23070 def value @value end |
Class Method Details
.ALL ⇒ Object
23092 23093 23094 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23092 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
23077 23078 23079 23080 23081 23082 23083 23084 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23077 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
23096 23097 23098 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23096 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
23087 23088 23089 23090 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23087 def OrderMerchantOfRecord.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) OrderMerchantOfRecord.ALL.find { |v| v.value == value } end |
.mixed ⇒ Object
23104 23105 23106 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23104 def OrderMerchantOfRecord.mixed @@_mixed ||= OrderMerchantOfRecord.new('mixed') end |
.organization ⇒ Object
23100 23101 23102 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23100 def OrderMerchantOfRecord.organization @@_organization ||= OrderMerchantOfRecord.new('organization') end |
Instance Method Details
#to_hash ⇒ Object
23108 23109 23110 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23108 def to_hash value end |