class Io::Flow::V0::Models::IncludedLevyKey

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21396
def IncludedLevyKey.ALL
  @@all ||= [IncludedLevyKey.duty, IncludedLevyKey.vat, IncludedLevyKey.vat_and_duty, IncludedLevyKey.none]
end
apply(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 21381
def IncludedLevyKey.apply(value)
  if value.instance_of?(IncludedLevyKey)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || IncludedLevyKey.new(value))
  end
end
duty() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21400
def IncludedLevyKey.duty
  @@_duty ||= IncludedLevyKey.new('duty')
end
from_string(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 21391
def IncludedLevyKey.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  IncludedLevyKey.ALL.find { |v| v.value == value }
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21376
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end
none() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21412
def IncludedLevyKey.none
  @@_none ||= IncludedLevyKey.new('none')
end
vat() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21404
def IncludedLevyKey.vat
  @@_vat ||= IncludedLevyKey.new('vat')
end
vat_and_duty() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21408
def IncludedLevyKey.vat_and_duty
  @@_vat_and_duty ||= IncludedLevyKey.new('vat_and_duty')
end

Public Instance Methods

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