Class: Io::Flow::V0::Models::OrderQuoteAddressType
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderQuoteAddressType
- 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 OrderQuoteAddressType for this value, creating a new instance for an unknown value.
-
.from_string(value) ⇒ Object
Returns the instance of OrderQuoteAddressType for this value, or nil if not found.
- .shipping ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ OrderQuoteAddressType
constructor
A new instance of OrderQuoteAddressType.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ OrderQuoteAddressType
Returns a new instance of OrderQuoteAddressType.
20654 20655 20656 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20654 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
20652 20653 20654 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20652 def value @value end |
Class Method Details
.ALL ⇒ Object
20674 20675 20676 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20674 def OrderQuoteAddressType.ALL @@all ||= [OrderQuoteAddressType.shipping] end |
.apply(value) ⇒ Object
Returns the instance of OrderQuoteAddressType for this value, creating a new instance for an unknown value
20659 20660 20661 20662 20663 20664 20665 20666 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20659 def OrderQuoteAddressType.apply(value) if value.instance_of?(OrderQuoteAddressType) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || OrderQuoteAddressType.new(value)) end end |
.from_string(value) ⇒ Object
Returns the instance of OrderQuoteAddressType for this value, or nil if not found
20669 20670 20671 20672 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20669 def OrderQuoteAddressType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) OrderQuoteAddressType.ALL.find { |v| v.value == value } end |
.shipping ⇒ Object
20678 20679 20680 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20678 def OrderQuoteAddressType.shipping @@_shipping ||= OrderQuoteAddressType.new('shipping') end |
Instance Method Details
#to_hash ⇒ Object
20682 20683 20684 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20682 def to_hash value end |