Class: Io::Flow::V0::Models::ZeroLevyReasonCode

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ ZeroLevyReasonCode

Returns a new instance of ZeroLevyReasonCode.



28600
28601
28602
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28600

def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



28598
28599
28600
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28598

def value
  @value
end

Class Method Details

.amount_below_de_minimis_thresholdObject

The amount owed is below the de minimis threshold



28647
28648
28649
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28647

def ZeroLevyReasonCode.amount_below_de_minimis_threshold
  @@_amount_below_de_minimis_threshold ||= ZeroLevyReasonCode.new('amount_below_de_minimis_threshold')
end

.apply(value) ⇒ Object

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



28605
28606
28607
28608
28609
28610
28611
28612
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28605

def ZeroLevyReasonCode.apply(value)
  if value.instance_of?(ZeroLevyReasonCode)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || ZeroLevyReasonCode.new(value))
  end
end

.delivered_unpaidObject

The consumer has selected not to prepay tax, and thus we have not computed the tax they will owe



28653
28654
28655
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28653

def ZeroLevyReasonCode.delivered_unpaid
  @@_delivered_unpaid ||= ZeroLevyReasonCode.new('delivered_unpaid')
end

.duty_free_by_trade_agreementObject

This cross-border tax or duty is not owed due to a certified trade agreement



28675
28676
28677
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28675

def ZeroLevyReasonCode.duty_free_by_trade_agreement
  @@_duty_free_by_trade_agreement ||= ZeroLevyReasonCode.new('duty_free_by_trade_agreement')
end

.duty_free_domesticObject

This cross-border tax or duty is not owed because the sale is domestic



28658
28659
28660
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28658

def ZeroLevyReasonCode.duty_free_domestic
  @@_duty_free_domestic ||= ZeroLevyReasonCode.new('duty_free_domestic')
end

.duty_free_intra_communityObject

This cross-border tax or duty is not owed because the sale is within the borders of a customs union



28664
28665
28666
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28664

def ZeroLevyReasonCode.duty_free_intra_community
  @@_duty_free_intra_community ||= ZeroLevyReasonCode.new('duty_free_intra_community')
end

.duty_free_reimportObject

When previously exported goods are re-imported back to the country of manufacture, they might be able to enter duty free.



28670
28671
28672
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28670

def ZeroLevyReasonCode.duty_free_reimport
  @@_duty_free_reimport ||= ZeroLevyReasonCode.new('duty_free_reimport')
end

.from_string(value) ⇒ Object

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



28615
28616
28617
28618
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28615

def ZeroLevyReasonCode.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  ZeroLevyReasonCode.ALL.find { |v| v.value == value }
end

.order_below_de_minimis_thresholdObject

The order is below the de minimis threshold



28642
28643
28644
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28642

def ZeroLevyReasonCode.order_below_de_minimis_threshold
  @@_order_below_de_minimis_threshold ||= ZeroLevyReasonCode.new('order_below_de_minimis_threshold')
end

.value_rounds_to_zeroObject

A tax rate was applied, but the result rounded to zero.



28637
28638
28639
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28637

def ZeroLevyReasonCode.value_rounds_to_zero
  @@_value_rounds_to_zero ||= ZeroLevyReasonCode.new('value_rounds_to_zero')
end

.zero_basisObject

When all the applicable components of an item price were added up, the result was a $0 basis



28626
28627
28628
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28626

def ZeroLevyReasonCode.zero_basis
  @@_zero_basis ||= ZeroLevyReasonCode.new('zero_basis')
end

.zero_rate_on_goodsObject

A general 0% rate is defined for items of this type (such as medical devices or children’s clothing)



28632
28633
28634
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28632

def ZeroLevyReasonCode.zero_rate_on_goods
  @@_zero_rate_on_goods ||= ZeroLevyReasonCode.new('zero_rate_on_goods')
end

Instance Method Details

#to_hashObject



28679
28680
28681
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28679

def to_hash
  value
end