Class: Io::Flow::V0::Models::InputSpecificationType
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::InputSpecificationType
- 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 InputSpecificationType for this value, creating a new instance for an unknown value.
-
.from_string(value) ⇒ Object
Returns the instance of InputSpecificationType for this value, or nil if not found.
- .number ⇒ Object
- .text ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ InputSpecificationType
constructor
A new instance of InputSpecificationType.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ InputSpecificationType
Returns a new instance of InputSpecificationType.
15361 15362 15363 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15361 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
15359 15360 15361 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15359 def value @value end |
Class Method Details
.ALL ⇒ Object
15381 15382 15383 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15381 def InputSpecificationType.ALL @@all ||= [InputSpecificationType.text, InputSpecificationType.number] end |
.apply(value) ⇒ Object
Returns the instance of InputSpecificationType for this value, creating a new instance for an unknown value
15366 15367 15368 15369 15370 15371 15372 15373 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15366 def InputSpecificationType.apply(value) if value.instance_of?(InputSpecificationType) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || InputSpecificationType.new(value)) end end |
.from_string(value) ⇒ Object
Returns the instance of InputSpecificationType for this value, or nil if not found
15376 15377 15378 15379 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15376 def InputSpecificationType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) InputSpecificationType.ALL.find { |v| v.value == value } end |
.number ⇒ Object
15389 15390 15391 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15389 def InputSpecificationType.number @@_number ||= InputSpecificationType.new('number') end |
.text ⇒ Object
15385 15386 15387 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15385 def InputSpecificationType.text @@_text ||= InputSpecificationType.new('text') end |
Instance Method Details
#to_hash ⇒ Object
15393 15394 15395 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15393 def to_hash value end |