class Io::Flow::V0::Models::Aggregate

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 16597
def Aggregate.ALL
  @@all ||= [Aggregate.maximum, Aggregate.minimum]
end
apply(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 16582
def Aggregate.apply(value)
  if value.instance_of?(Aggregate)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || Aggregate.new(value))
  end
end
from_string(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 16592
def Aggregate.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  Aggregate.ALL.find { |v| v.value == value }
end
maximum() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 16601
def Aggregate.maximum
  @@_maximum ||= Aggregate.new('maximum')
end
minimum() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 16605
def Aggregate.minimum
  @@_minimum ||= Aggregate.new('minimum')
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 16577
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Public Instance Methods

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