class Io::Flow::V0::Models::PricingLevySetting

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 25484
def PricingLevySetting.ALL
  @@all ||= [PricingLevySetting.included, PricingLevySetting.displayed, PricingLevySetting.ignored]
end
apply(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 25469
def PricingLevySetting.apply(value)
  if value.instance_of?(PricingLevySetting)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || PricingLevySetting.new(value))
  end
end
displayed() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 25492
def PricingLevySetting.displayed
  @@_displayed ||= PricingLevySetting.new('displayed')
end
from_string(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 25479
def PricingLevySetting.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  PricingLevySetting.ALL.find { |v| v.value == value }
end
ignored() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 25496
def PricingLevySetting.ignored
  @@_ignored ||= PricingLevySetting.new('ignored')
end
included() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 25488
def PricingLevySetting.included
  @@_included ||= PricingLevySetting.new('included')
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 25464
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 25500
def to_hash
  value
end