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.



21271
21272
21273
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21271

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



21269
21270
21271
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21269

def value
  @value
end

Class Method Details

.ALLObject



21291
21292
21293
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21291

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



21276
21277
21278
21279
21280
21281
21282
21283
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21276

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



21295
21296
21297
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21295

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



21286
21287
21288
21289
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21286

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

.mixedObject



21303
21304
21305
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21303

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

.organizationObject



21299
21300
21301
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21299

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

Instance Method Details

#to_hashObject



21307
21308
21309
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21307

def to_hash
  value
end