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.



18171
18172
18173
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18171

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



18169
18170
18171
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18169

def value
  @value
end

Class Method Details

.ALLObject



18191
18192
18193
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18191

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



18176
18177
18178
18179
18180
18181
18182
18183
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18176

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



18195
18196
18197
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18195

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



18186
18187
18188
18189
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18186

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

.mixedObject



18203
18204
18205
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18203

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

.organizationObject



18199
18200
18201
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18199

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

Instance Method Details

#to_hashObject



18207
18208
18209
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18207

def to_hash
  value
end