Class: Io::Flow::V0::Models::OrderMerchantOfRecord

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ OrderMerchantOfRecord

Returns a new instance of OrderMerchantOfRecord.



20268
20269
20270
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20268

def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



20266
20267
20268
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20266

def value
  @value
end

Class Method Details

.ALLObject



20288
20289
20290
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20288

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



20273
20274
20275
20276
20277
20278
20279
20280
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20273

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

.flowObject



20292
20293
20294
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20292

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



20283
20284
20285
20286
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20283

def OrderMerchantOfRecord.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  OrderMerchantOfRecord.ALL.find { |v| v.value == value }
end

.mixedObject



20300
20301
20302
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20300

def OrderMerchantOfRecord.mixed
  @@_mixed ||= OrderMerchantOfRecord.new('mixed')
end

.organizationObject



20296
20297
20298
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20296

def OrderMerchantOfRecord.organization
  @@_organization ||= OrderMerchantOfRecord.new('organization')
end

Instance Method Details

#to_hashObject



20304
20305
20306
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20304

def to_hash
  value
end