Class: Io::Flow::V0::Models::PhysicalDeliverySpecialSerivce
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PhysicalDeliverySpecialSerivce
- 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 PhysicalDeliverySpecialSerivce for this value, creating a new instance for an unknown value.
- .cold_storage ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of PhysicalDeliverySpecialSerivce for this value, or nil if not found.
- .hazardous ⇒ Object
- .perishable ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ PhysicalDeliverySpecialSerivce
constructor
A new instance of PhysicalDeliverySpecialSerivce.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ PhysicalDeliverySpecialSerivce
17657 17658 17659 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17657 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
17655 17656 17657 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17655 def value @value end |
Class Method Details
.ALL ⇒ Object
17677 17678 17679 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17677 def PhysicalDeliverySpecialSerivce.ALL @@all ||= [PhysicalDeliverySpecialSerivce.cold_storage, PhysicalDeliverySpecialSerivce.hazardous, PhysicalDeliverySpecialSerivce.perishable] end |
.apply(value) ⇒ Object
Returns the instance of PhysicalDeliverySpecialSerivce for this value, creating a new instance for an unknown value
17662 17663 17664 17665 17666 17667 17668 17669 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17662 def PhysicalDeliverySpecialSerivce.apply(value) if value.instance_of?(PhysicalDeliverySpecialSerivce) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || PhysicalDeliverySpecialSerivce.new(value)) end end |
.cold_storage ⇒ Object
17681 17682 17683 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17681 def PhysicalDeliverySpecialSerivce.cold_storage @@_cold_storage ||= PhysicalDeliverySpecialSerivce.new('cold_storage') end |
.from_string(value) ⇒ Object
Returns the instance of PhysicalDeliverySpecialSerivce for this value, or nil if not found
17672 17673 17674 17675 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17672 def PhysicalDeliverySpecialSerivce.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) PhysicalDeliverySpecialSerivce.ALL.find { |v| v.value == value } end |
.hazardous ⇒ Object
17685 17686 17687 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17685 def PhysicalDeliverySpecialSerivce.hazardous @@_hazardous ||= PhysicalDeliverySpecialSerivce.new('hazardous') end |
.perishable ⇒ Object
17689 17690 17691 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17689 def PhysicalDeliverySpecialSerivce.perishable @@_perishable ||= PhysicalDeliverySpecialSerivce.new('perishable') end |
Instance Method Details
#to_hash ⇒ Object
17693 17694 17695 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17693 def to_hash value end |