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.



12768
12769
12770
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12768

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



12766
12767
12768
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12766

def value
  @value
end

Class Method Details

.ALLObject



12788
12789
12790
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12788

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



12773
12774
12775
12776
12777
12778
12779
12780
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12773

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



12792
12793
12794
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12792

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



12783
12784
12785
12786
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12783

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

.mixedObject



12800
12801
12802
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12800

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

.organizationObject



12796
12797
12798
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12796

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

Instance Method Details

#to_hashObject



12804
12805
12806
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12804

def to_hash
  value
end