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.
21657 21658 21659 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21657 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
21655 21656 21657 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21655 def value @value end |
Class Method Details
.ALL ⇒ Object
21677 21678 21679 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21677 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
21662 21663 21664 21665 21666 21667 21668 21669 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21662 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
21672 21673 21674 21675 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21672 def OrderQuoteAddressType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) OrderQuoteAddressType.ALL.find { |v| v.value == value } end |
.shipping ⇒ Object
21681 21682 21683 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21681 def OrderQuoteAddressType.shipping @@_shipping ||= OrderQuoteAddressType.new('shipping') end |
Instance Method Details
#to_hash ⇒ Object
21685 21686 21687 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21685 def to_hash value end |