Class: Io::Flow::V0::Models::OrderChangeSource
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderChangeSource
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of OrderChangeSource for this value, creating a new instance for an unknown value.
-
.carrier ⇒ Object
A party providing carriage for an order.
-
.consumer ⇒ Object
The party that placed an order.
-
.flow ⇒ Object
Flow may provide anti-fraud or payment services for an order.
-
.from_string(value) ⇒ Object
Returns the instance of OrderChangeSource for this value, or nil if not found.
-
.fulfillment ⇒ Object
A party providing fulfillment for an order.
-
.retailer ⇒ Object
The party that owns the processing of the order.
Instance Method Summary collapse
-
#initialize(value) ⇒ OrderChangeSource
constructor
A new instance of OrderChangeSource.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ OrderChangeSource
Returns a new instance of OrderChangeSource.
10841 10842 10843 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10841 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
10839 10840 10841 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10839 def value @value end |
Class Method Details
.ALL ⇒ Object
10861 10862 10863 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10861 def OrderChangeSource.ALL @@all ||= [OrderChangeSource.consumer, OrderChangeSource.retailer, OrderChangeSource.fulfillment, OrderChangeSource.flow, OrderChangeSource.carrier] end |
.apply(value) ⇒ Object
Returns the instance of OrderChangeSource for this value, creating a new instance for an unknown value
10846 10847 10848 10849 10850 10851 10852 10853 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10846 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 ⇒ Object
A party providing carriage for an order
10886 10887 10888 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10886 def OrderChangeSource.carrier @@_carrier ||= OrderChangeSource.new('carrier') end |
.consumer ⇒ Object
The party that placed an order
10866 10867 10868 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10866 def OrderChangeSource.consumer @@_consumer ||= OrderChangeSource.new('consumer') end |
.flow ⇒ Object
Flow may provide anti-fraud or payment services for an order
10881 10882 10883 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10881 def OrderChangeSource.flow @@_flow ||= OrderChangeSource.new('flow') end |
.from_string(value) ⇒ Object
Returns the instance of OrderChangeSource for this value, or nil if not found
10856 10857 10858 10859 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10856 def OrderChangeSource.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) OrderChangeSource.ALL.find { |v| v.value == value } end |
.fulfillment ⇒ Object
A party providing fulfillment for an order
10876 10877 10878 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10876 def OrderChangeSource.fulfillment @@_fulfillment ||= OrderChangeSource.new('fulfillment') end |
.retailer ⇒ Object
The party that owns the processing of the order
10871 10872 10873 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10871 def OrderChangeSource.retailer @@_retailer ||= OrderChangeSource.new('retailer') end |
Instance Method Details
#to_hash ⇒ Object
10890 10891 10892 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10890 def to_hash value end |