Class: Io::Flow::V0::Models::EconomicTitleLocation
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::EconomicTitleLocation
- 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 EconomicTitleLocation for this value, creating a new instance for an unknown value.
-
.destination ⇒ Object
Indicates title transferred at the destination.
-
.from_string(value) ⇒ Object
Returns the instance of EconomicTitleLocation for this value, or nil if not found.
-
.high_seas ⇒ Object
Indicates title transferred on the high seas.
-
.origination ⇒ Object
Indicates title transferred at the originating fulfillment center.
Instance Method Summary collapse
-
#initialize(value) ⇒ EconomicTitleLocation
constructor
A new instance of EconomicTitleLocation.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ EconomicTitleLocation
Returns a new instance of EconomicTitleLocation.
14509 14510 14511 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14509 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
14507 14508 14509 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14507 def value @value end |
Class Method Details
.ALL ⇒ Object
14529 14530 14531 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14529 def EconomicTitleLocation.ALL @@all ||= [EconomicTitleLocation.high_seas, EconomicTitleLocation.origination, EconomicTitleLocation.destination] end |
.apply(value) ⇒ Object
Returns the instance of EconomicTitleLocation for this value, creating a new instance for an unknown value
14514 14515 14516 14517 14518 14519 14520 14521 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14514 def EconomicTitleLocation.apply(value) if value.instance_of?(EconomicTitleLocation) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || EconomicTitleLocation.new(value)) end end |
.destination ⇒ Object
Indicates title transferred at the destination
14544 14545 14546 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14544 def EconomicTitleLocation.destination @@_destination ||= EconomicTitleLocation.new('destination') end |
.from_string(value) ⇒ Object
Returns the instance of EconomicTitleLocation for this value, or nil if not found
14524 14525 14526 14527 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14524 def EconomicTitleLocation.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) EconomicTitleLocation.ALL.find { |v| v.value == value } end |
.high_seas ⇒ Object
Indicates title transferred on the high seas
14534 14535 14536 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14534 def EconomicTitleLocation.high_seas @@_high_seas ||= EconomicTitleLocation.new('high_seas') end |
.origination ⇒ Object
Indicates title transferred at the originating fulfillment center
14539 14540 14541 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14539 def EconomicTitleLocation.origination @@_origination ||= EconomicTitleLocation.new('origination') end |
Instance Method Details
#to_hash ⇒ Object
14548 14549 14550 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14548 def to_hash value end |