class Io::Flow::V0::Models::AvailableFilterFormat

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17252
def AvailableFilterFormat.ALL
  @@all ||= [AvailableFilterFormat.boolean, AvailableFilterFormat.date, AvailableFilterFormat.money, AvailableFilterFormat.decimal, AvailableFilterFormat.string, AvailableFilterFormat.unit_of_length, AvailableFilterFormat.unit_of_mass]
end
apply(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 17237
def AvailableFilterFormat.apply(value)
  if value.instance_of?(AvailableFilterFormat)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || AvailableFilterFormat.new(value))
  end
end
boolean() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17256
def AvailableFilterFormat.boolean
  @@_boolean ||= AvailableFilterFormat.new('boolean')
end
date() click to toggle source

Expects date in format YYYY-MM-DD

# File lib/flow_commerce/flow_api_v0_client.rb, line 17261
def AvailableFilterFormat.date
  @@_date ||= AvailableFilterFormat.new('date')
end
decimal() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17269
def AvailableFilterFormat.decimal
  @@_decimal ||= AvailableFilterFormat.new('decimal')
end
from_string(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 17247
def AvailableFilterFormat.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  AvailableFilterFormat.ALL.find { |v| v.value == value }
end
money() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17265
def AvailableFilterFormat.money
  @@_money ||= AvailableFilterFormat.new('money')
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17232
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end
string() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17273
def AvailableFilterFormat.string
  @@_string ||= AvailableFilterFormat.new('string')
end
unit_of_length() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17277
def AvailableFilterFormat.unit_of_length
  @@_unit_of_length ||= AvailableFilterFormat.new('unit_of_length')
end
unit_of_mass() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17281
def AvailableFilterFormat.unit_of_mass
  @@_unit_of_mass ||= AvailableFilterFormat.new('unit_of_mass')
end

Public Instance Methods

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