Class: Io::Flow::V0::Models::DeliveryWindowLocation
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::DeliveryWindowLocation
- 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 DeliveryWindowLocation for this value, creating a new instance for an unknown value.
- .center ⇒ Object
- .crossdock ⇒ Object
- .customer ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of DeliveryWindowLocation for this value, or nil if not found.
Instance Method Summary collapse
-
#initialize(value) ⇒ DeliveryWindowLocation
constructor
A new instance of DeliveryWindowLocation.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ DeliveryWindowLocation
Returns a new instance of DeliveryWindowLocation.
18814 18815 18816 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18814 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
18812 18813 18814 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18812 def value @value end |
Class Method Details
.ALL ⇒ Object
18834 18835 18836 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18834 def DeliveryWindowLocation.ALL @@all ||= [DeliveryWindowLocation.center, DeliveryWindowLocation.crossdock, DeliveryWindowLocation.customer] end |
.apply(value) ⇒ Object
Returns the instance of DeliveryWindowLocation for this value, creating a new instance for an unknown value
18819 18820 18821 18822 18823 18824 18825 18826 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18819 def DeliveryWindowLocation.apply(value) if value.instance_of?(DeliveryWindowLocation) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || DeliveryWindowLocation.new(value)) end end |
.center ⇒ Object
18838 18839 18840 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18838 def DeliveryWindowLocation.center @@_center ||= DeliveryWindowLocation.new('center') end |
.crossdock ⇒ Object
18842 18843 18844 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18842 def DeliveryWindowLocation.crossdock @@_crossdock ||= DeliveryWindowLocation.new('crossdock') end |
.customer ⇒ Object
18846 18847 18848 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18846 def DeliveryWindowLocation.customer @@_customer ||= DeliveryWindowLocation.new('customer') end |
.from_string(value) ⇒ Object
Returns the instance of DeliveryWindowLocation for this value, or nil if not found
18829 18830 18831 18832 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18829 def DeliveryWindowLocation.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) DeliveryWindowLocation.ALL.find { |v| v.value == value } end |
Instance Method Details
#to_hash ⇒ Object
18850 18851 18852 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18850 def to_hash value end |