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.
23458 23459 23460 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23458 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
23456 23457 23458 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23456 def value @value end |
Class Method Details
.ALL ⇒ Object
23478 23479 23480 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23478 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
23463 23464 23465 23466 23467 23468 23469 23470 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23463 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
23473 23474 23475 23476 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23473 def OrderQuoteAddressType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) OrderQuoteAddressType.ALL.find { |v| v.value == value } end |
.shipping ⇒ Object
23482 23483 23484 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23482 def OrderQuoteAddressType.shipping @@_shipping ||= OrderQuoteAddressType.new('shipping') end |
Instance Method Details
#to_hash ⇒ Object
23486 23487 23488 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23486 def to_hash value end |