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.
25018 25019 25020 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25018 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
25016 25017 25018 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25016 def value @value end |
Class Method Details
.ALL ⇒ Object
25038 25039 25040 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25038 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
25023 25024 25025 25026 25027 25028 25029 25030 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25023 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
25042 25043 25044 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25042 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
25033 25034 25035 25036 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25033 def PhysicalDeliverySpecialSerivce.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) PhysicalDeliverySpecialSerivce.ALL.find { |v| v.value == value } end |
.hazardous ⇒ Object
25046 25047 25048 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25046 def PhysicalDeliverySpecialSerivce.hazardous @@_hazardous ||= PhysicalDeliverySpecialSerivce.new('hazardous') end |
.perishable ⇒ Object
25050 25051 25052 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25050 def PhysicalDeliverySpecialSerivce.perishable @@_perishable ||= PhysicalDeliverySpecialSerivce.new('perishable') end |
Instance Method Details
#to_hash ⇒ Object
25054 25055 25056 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25054 def to_hash value end |