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
Returns a new instance of PhysicalDeliverySpecialSerivce.
18609 18610 18611 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18609 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
18607 18608 18609 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18607 def value @value end |
Class Method Details
.ALL ⇒ Object
18629 18630 18631 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18629 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
18614 18615 18616 18617 18618 18619 18620 18621 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18614 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
18633 18634 18635 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18633 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
18624 18625 18626 18627 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18624 def PhysicalDeliverySpecialSerivce.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) PhysicalDeliverySpecialSerivce.ALL.find { |v| v.value == value } end |
.hazardous ⇒ Object
18637 18638 18639 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18637 def PhysicalDeliverySpecialSerivce.hazardous @@_hazardous ||= PhysicalDeliverySpecialSerivce.new('hazardous') end |
.perishable ⇒ Object
18641 18642 18643 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18641 def PhysicalDeliverySpecialSerivce.perishable @@_perishable ||= PhysicalDeliverySpecialSerivce.new('perishable') end |
Instance Method Details
#to_hash ⇒ Object
18645 18646 18647 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18645 def to_hash value end |