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.



13670
13671
13672
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13670

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



13668
13669
13670
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13668

def value
  @value
end

Class Method Details

.ALLObject



13690
13691
13692
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13690

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



13675
13676
13677
13678
13679
13680
13681
13682
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13675

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



13694
13695
13696
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13694

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



13685
13686
13687
13688
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13685

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

.mixedObject



13702
13703
13704
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13702

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

.organizationObject



13698
13699
13700
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13698

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

Instance Method Details

#to_hashObject



13706
13707
13708
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13706

def to_hash
  value
end