Class: Io::Flow::V0::Models::FulfillmentRouting
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::FulfillmentRouting
- 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 FulfillmentRouting for this value, creating a new instance for an unknown value.
-
.from_string(value) ⇒ Object
Returns the instance of FulfillmentRouting for this value, or nil if not found.
-
.fulfilled_from_center ⇒ Object
Fulfillment should occur from the center listed in the delivery.
-
.fulfillment_service ⇒ Object
Fulfillment is going to be performed by a service with multiple fulfillment locations.
Instance Method Summary collapse
-
#initialize(value) ⇒ FulfillmentRouting
constructor
A new instance of FulfillmentRouting.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ FulfillmentRouting
Returns a new instance of FulfillmentRouting.
21036 21037 21038 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21036 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
21034 21035 21036 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21034 def value @value end |
Class Method Details
.ALL ⇒ Object
21056 21057 21058 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21056 def FulfillmentRouting.ALL @@all ||= [FulfillmentRouting.fulfilled_from_center, FulfillmentRouting.fulfillment_service] end |
.apply(value) ⇒ Object
Returns the instance of FulfillmentRouting for this value, creating a new instance for an unknown value
21041 21042 21043 21044 21045 21046 21047 21048 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21041 def FulfillmentRouting.apply(value) if value.instance_of?(FulfillmentRouting) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || FulfillmentRouting.new(value)) end end |
.from_string(value) ⇒ Object
Returns the instance of FulfillmentRouting for this value, or nil if not found
21051 21052 21053 21054 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21051 def FulfillmentRouting.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) FulfillmentRouting.ALL.find { |v| v.value == value } end |
.fulfilled_from_center ⇒ Object
Fulfillment should occur from the center listed in the delivery.
21061 21062 21063 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21061 def FulfillmentRouting.fulfilled_from_center @@_fulfilled_from_center ||= FulfillmentRouting.new('fulfilled_from_center') end |
.fulfillment_service ⇒ Object
Fulfillment is going to be performed by a service with multiple fulfillment locations. It is not guaranteed that the center identified with this delivery will be used.
21068 21069 21070 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21068 def FulfillmentRouting.fulfillment_service @@_fulfillment_service ||= FulfillmentRouting.new('fulfillment_service') end |
Instance Method Details
#to_hash ⇒ Object
21072 21073 21074 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21072 def to_hash value end |