class Io::Flow::V0::Models::OrderChangeSource

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 22916
def OrderChangeSource.ALL
  @@all ||= [OrderChangeSource.consumer, OrderChangeSource.retailer, OrderChangeSource.fulfillment, OrderChangeSource.flow, OrderChangeSource.carrier]
end
apply(value) click to toggle source

Returns the instance of OrderChangeSource for this value, creating a new instance for an unknown value

# File lib/flow_commerce/flow_api_v0_client.rb, line 22901
def OrderChangeSource.apply(value)
  if value.instance_of?(OrderChangeSource)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || OrderChangeSource.new(value))
  end
end
carrier() click to toggle source

A party providing carriage for an order

# File lib/flow_commerce/flow_api_v0_client.rb, line 22941
def OrderChangeSource.carrier
  @@_carrier ||= OrderChangeSource.new('carrier')
end
consumer() click to toggle source

The party that placed an order

# File lib/flow_commerce/flow_api_v0_client.rb, line 22921
def OrderChangeSource.consumer
  @@_consumer ||= OrderChangeSource.new('consumer')
end
flow() click to toggle source

Flow may provide anti-fraud or payment services for an order

# File lib/flow_commerce/flow_api_v0_client.rb, line 22936
def OrderChangeSource.flow
  @@_flow ||= OrderChangeSource.new('flow')
end
from_string(value) click to toggle source

Returns the instance of OrderChangeSource for this value, or nil if not found

# File lib/flow_commerce/flow_api_v0_client.rb, line 22911
def OrderChangeSource.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  OrderChangeSource.ALL.find { |v| v.value == value }
end
fulfillment() click to toggle source

A party providing fulfillment for an order

# File lib/flow_commerce/flow_api_v0_client.rb, line 22931
def OrderChangeSource.fulfillment
  @@_fulfillment ||= OrderChangeSource.new('fulfillment')
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 22896
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end
retailer() click to toggle source

The party that owns the processing of the order

# File lib/flow_commerce/flow_api_v0_client.rb, line 22926
def OrderChangeSource.retailer
  @@_retailer ||= OrderChangeSource.new('retailer')
end

Public Instance Methods

to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 22945
def to_hash
  value
end