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.
14059 14060 14061 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14059 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
14057 14058 14059 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14057 def value @value end |
Class Method Details
.ALL ⇒ Object
14079 14080 14081 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14079 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
14064 14065 14066 14067 14068 14069 14070 14071 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14064 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
14074 14075 14076 14077 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14074 def InputSpecificationType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) InputSpecificationType.ALL.find { |v| v.value == value } end |
.number ⇒ Object
14087 14088 14089 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14087 def InputSpecificationType.number @@_number ||= InputSpecificationType.new('number') end |
.text ⇒ Object
14083 14084 14085 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14083 def InputSpecificationType.text @@_text ||= InputSpecificationType.new('text') end |
Instance Method Details
#to_hash ⇒ Object
14091 14092 14093 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14091 def to_hash value end |