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.



16954
16955
16956
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16954

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



16952
16953
16954
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16952

def value
  @value
end

Class Method Details

.ALLObject



16974
16975
16976
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16974

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



16959
16960
16961
16962
16963
16964
16965
16966
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16959

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



16978
16979
16980
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16978

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



16969
16970
16971
16972
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16969

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

.mixedObject



16986
16987
16988
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16986

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

.organizationObject



16982
16983
16984
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16982

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

Instance Method Details

#to_hashObject



16990
16991
16992
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16990

def to_hash
  value
end