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.
19157 19158 19159 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19157 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
19155 19156 19157 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19155 def value @value end |
Class Method Details
.ALL ⇒ Object
19177 19178 19179 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19177 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
19162 19163 19164 19165 19166 19167 19168 19169 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19162 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
19192 19193 19194 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19192 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
19172 19173 19174 19175 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19172 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
19182 19183 19184 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19182 def EconomicTitleLocation.high_seas @@_high_seas ||= EconomicTitleLocation.new('high_seas') end |
.origination ⇒ Object
Indicates title transferred at the originating fulfillment center
19187 19188 19189 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19187 def EconomicTitleLocation.origination @@_origination ||= EconomicTitleLocation.new('origination') end |
Instance Method Details
#to_hash ⇒ Object
19196 19197 19198 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19196 def to_hash value end |