class Io::Flow::V0::Models::InputSpecificationType

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21619
def InputSpecificationType.ALL
  @@all ||= [InputSpecificationType.text, InputSpecificationType.number]
end
apply(value) click to toggle source

Returns the instance of InputSpecificationType for this value, creating a new instance for an unknown value

# File lib/flow_commerce/flow_api_v0_client.rb, line 21604
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) click to toggle source

Returns the instance of InputSpecificationType for this value, or nil if not found

# File lib/flow_commerce/flow_api_v0_client.rb, line 21614
def InputSpecificationType.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  InputSpecificationType.ALL.find { |v| v.value == value }
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21599
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end
number() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21627
def InputSpecificationType.number
  @@_number ||= InputSpecificationType.new('number')
end
text() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21623
def InputSpecificationType.text
  @@_text ||= InputSpecificationType.new('text')
end

Public Instance Methods

to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21631
def to_hash
  value
end