class Io::Flow::V0::Models::WithholdingDeductionType

Attributes

value[R]

Public Class Methods

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

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

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

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 28521
def WithholdingDeductionType.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  WithholdingDeductionType.ALL.find { |v| v.value == value }
end
insurance() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 28542
def WithholdingDeductionType.insurance
  @@_insurance ||= WithholdingDeductionType.new('insurance')
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 28506
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end
tax() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 28530
def WithholdingDeductionType.tax
  @@_tax ||= WithholdingDeductionType.new('tax')
end

Public Instance Methods

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