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.



13191
13192
13193
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13191

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



13189
13190
13191
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13189

def value
  @value
end

Class Method Details

.ALLObject



13211
13212
13213
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13211

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



13196
13197
13198
13199
13200
13201
13202
13203
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13196

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



13215
13216
13217
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13215

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



13206
13207
13208
13209
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13206

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

.mixedObject



13223
13224
13225
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13223

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

.organizationObject



13219
13220
13221
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13219

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

Instance Method Details

#to_hashObject



13227
13228
13229
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13227

def to_hash
  value
end