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.



17328
17329
17330
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17328

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



17326
17327
17328
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17326

def value
  @value
end

Class Method Details

.ALLObject



17348
17349
17350
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17348

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



17333
17334
17335
17336
17337
17338
17339
17340
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17333

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



17352
17353
17354
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17352

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



17343
17344
17345
17346
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17343

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

.mixedObject



17360
17361
17362
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17360

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

.organizationObject



17356
17357
17358
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17356

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

Instance Method Details

#to_hashObject



17364
17365
17366
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17364

def to_hash
  value
end