class Io::Flow::V0::Models::LevyComponent

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 22100
def LevyComponent.ALL
  @@all ||= [LevyComponent.goods, LevyComponent.duty, LevyComponent.insurance, LevyComponent.freight, LevyComponent.vat]
end
apply(value) click to toggle source

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

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

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 22095
def LevyComponent.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  LevyComponent.ALL.find { |v| v.value == value }
end
goods() click to toggle source

The value of goods

# File lib/flow_commerce/flow_api_v0_client.rb, line 22105
def LevyComponent.goods
  @@_goods ||= LevyComponent.new('goods')
end
insurance() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 22113
def LevyComponent.insurance
  @@_insurance ||= LevyComponent.new('insurance')
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 22080
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end
vat() click to toggle source

Value-Added Tax

# File lib/flow_commerce/flow_api_v0_client.rb, line 22122
def LevyComponent.vat
  @@_vat ||= LevyComponent.new('vat')
end

Public Instance Methods

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