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
14003 14004 14005 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14003 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
14001 14002 14003 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14001 def value @value end |
Class Method Details
.ALL ⇒ Object
14023 14024 14025 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14023 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
14008 14009 14010 14011 14012 14013 14014 14015 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14008 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
14038 14039 14040 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14038 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
14018 14019 14020 14021 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14018 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
14028 14029 14030 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14028 def EconomicTitleLocation.high_seas @@_high_seas ||= EconomicTitleLocation.new('high_seas') end |
.origination ⇒ Object
Indicates title transferred at the originating fulfillment center
14033 14034 14035 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14033 def EconomicTitleLocation.origination @@_origination ||= EconomicTitleLocation.new('origination') end |
Instance Method Details
#to_hash ⇒ Object
14042 14043 14044 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14042 def to_hash value end |