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.



23072
23073
23074
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23072

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



23070
23071
23072
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23070

def value
  @value
end

Class Method Details

.ALLObject



23092
23093
23094
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23092

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



23077
23078
23079
23080
23081
23082
23083
23084
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23077

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



23096
23097
23098
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23096

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



23087
23088
23089
23090
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23087

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

.mixedObject



23104
23105
23106
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23104

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

.organizationObject



23100
23101
23102
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23100

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

Instance Method Details

#to_hashObject



23108
23109
23110
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23108

def to_hash
  value
end