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.
17071 17072 17073 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17071 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
17069 17070 17071 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17069 def value @value end |
Class Method Details
.ALL ⇒ Object
17091 17092 17093 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17091 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
17076 17077 17078 17079 17080 17081 17082 17083 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17076 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
17086 17087 17088 17089 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17086 def LaneDirection.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) LaneDirection.ALL.find { |v| v.value == value } end |
.outbound ⇒ Object
17095 17096 17097 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17095 def LaneDirection.outbound @@_outbound ||= LaneDirection.new('outbound') end |
.return ⇒ Object
17099 17100 17101 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17099 def LaneDirection.return @@_return ||= LaneDirection.new('return') 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 |