Class: Io::Flow::V0::Models::LaneDirection
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::LaneDirection
- 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 LaneDirection for this value, creating a new instance for an unknown value.
-
.from_string(value) ⇒ Object
Returns the instance of LaneDirection for this value, or nil if not found.
- .outbound ⇒ Object
- .return ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ LaneDirection
constructor
A new instance of LaneDirection.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ LaneDirection
Returns a new instance of LaneDirection.
16388 16389 16390 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16388 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
16386 16387 16388 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16386 def value @value end |
Class Method Details
.ALL ⇒ Object
16408 16409 16410 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16408 def LaneDirection.ALL @@all ||= [LaneDirection.outbound, LaneDirection.return] end |
.apply(value) ⇒ Object
Returns the instance of LaneDirection for this value, creating a new instance for an unknown value
16393 16394 16395 16396 16397 16398 16399 16400 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16393 def LaneDirection.apply(value) if value.instance_of?(LaneDirection) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || LaneDirection.new(value)) end end |
.from_string(value) ⇒ Object
Returns the instance of LaneDirection for this value, or nil if not found
16403 16404 16405 16406 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16403 def LaneDirection.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) LaneDirection.ALL.find { |v| v.value == value } end |
.outbound ⇒ Object
16412 16413 16414 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16412 def LaneDirection.outbound @@_outbound ||= LaneDirection.new('outbound') end |
.return ⇒ Object
16416 16417 16418 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16416 def LaneDirection.return @@_return ||= LaneDirection.new('return') end |
Instance Method Details
#to_hash ⇒ Object
16420 16421 16422 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16420 def to_hash value end |