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.



14271
14272
14273
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14271

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



14269
14270
14271
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14269

def value
  @value
end

Class Method Details

.ALLObject



14291
14292
14293
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14291

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



14276
14277
14278
14279
14280
14281
14282
14283
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14276

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



14295
14296
14297
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14295

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



14286
14287
14288
14289
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14286

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

.mixedObject



14303
14304
14305
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14303

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

.organizationObject



14299
14300
14301
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14299

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

Instance Method Details

#to_hashObject



14307
14308
14309
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14307

def to_hash
  value
end