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.
17064 17065 17066 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17064 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
17062 17063 17064 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17062 def value @value end |
Class Method Details
.ALL ⇒ Object
17084 17085 17086 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17084 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
17069 17070 17071 17072 17073 17074 17075 17076 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17069 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
17099 17100 17101 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17099 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
17079 17080 17081 17082 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17079 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
17089 17090 17091 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17089 def EconomicTitleLocation.high_seas @@_high_seas ||= EconomicTitleLocation.new('high_seas') end |
.origination ⇒ Object
Indicates title transferred at the originating fulfillment center
17094 17095 17096 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17094 def EconomicTitleLocation.origination @@_origination ||= EconomicTitleLocation.new('origination') end |
Instance Method Details
#to_hash ⇒ Object
17103 17104 17105 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17103 def to_hash value end |