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.
22973 22974 22975 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22973 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
22971 22972 22973 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22971 def value @value end |
Class Method Details
.ALL ⇒ Object
22993 22994 22995 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22993 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
22978 22979 22980 22981 22982 22983 22984 22985 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22978 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
22997 22998 22999 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22997 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
22988 22989 22990 22991 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22988 def PhysicalDeliverySpecialSerivce.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) PhysicalDeliverySpecialSerivce.ALL.find { |v| v.value == value } end |
.hazardous ⇒ Object
23001 23002 23003 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23001 def PhysicalDeliverySpecialSerivce.hazardous @@_hazardous ||= PhysicalDeliverySpecialSerivce.new('hazardous') end |
.perishable ⇒ Object
23005 23006 23007 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23005 def PhysicalDeliverySpecialSerivce.perishable @@_perishable ||= PhysicalDeliverySpecialSerivce.new('perishable') end |
Instance Method Details
#to_hash ⇒ Object
23009 23010 23011 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23009 def to_hash value end |