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.
15176 15177 15178 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15176 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
15174 15175 15176 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15174 def value @value end |
Class Method Details
.ALL ⇒ Object
15196 15197 15198 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15196 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
15181 15182 15183 15184 15185 15186 15187 15188 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15181 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
15211 15212 15213 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15211 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
15191 15192 15193 15194 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15191 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
15201 15202 15203 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15201 def EconomicTitleLocation.high_seas @@_high_seas ||= EconomicTitleLocation.new('high_seas') end |
.origination ⇒ Object
Indicates title transferred at the originating fulfillment center
15206 15207 15208 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15206 def EconomicTitleLocation.origination @@_origination ||= EconomicTitleLocation.new('origination') end |
Instance Method Details
#to_hash ⇒ Object
15215 15216 15217 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15215 def to_hash value end |