Class: Io::Flow::V0::Models::ZeroLevyReasonCode
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ZeroLevyReasonCode
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
- .ALL ⇒ Object
-
.amount_below_de_minimis_threshold ⇒ Object
The amount owed is below the de minimis threshold.
-
.apply(value) ⇒ Object
Returns the instance of ZeroLevyReasonCode for this value, creating a new instance for an unknown value.
-
.delivered_unpaid ⇒ Object
The consumer has selected not to prepay tax, and thus we have not computed the tax they will owe.
-
.duty_free_by_trade_agreement ⇒ Object
This cross-border tax or duty is not owed due to a certified trade agreement.
-
.duty_free_domestic ⇒ Object
This cross-border tax or duty is not owed because the sale is domestic.
-
.duty_free_intra_community ⇒ Object
This cross-border tax or duty is not owed because the sale is within the borders of a customs union.
-
.duty_free_reimport ⇒ Object
When previously exported goods are re-imported back to the country of manufacture, they might be able to enter duty free.
-
.from_string(value) ⇒ Object
Returns the instance of ZeroLevyReasonCode for this value, or nil if not found.
-
.order_below_de_minimis_threshold ⇒ Object
The order is below the de minimis threshold.
-
.value_rounds_to_zero ⇒ Object
A tax rate was applied, but the result rounded to zero.
-
.zero_basis ⇒ Object
When all the applicable components of an item price were added up, the result was a $0 basis.
-
.zero_rate_on_goods ⇒ Object
A general 0% rate is defined for items of this type (such as medical devices or children’s clothing).
Instance Method Summary collapse
-
#initialize(value) ⇒ ZeroLevyReasonCode
constructor
A new instance of ZeroLevyReasonCode.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ ZeroLevyReasonCode
Returns a new instance of ZeroLevyReasonCode.
26453 26454 26455 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26453 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
26451 26452 26453 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26451 def value @value end |
Class Method Details
.ALL ⇒ Object
26473 26474 26475 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26473 def ZeroLevyReasonCode.ALL @@all ||= [ZeroLevyReasonCode.zero_basis, ZeroLevyReasonCode.zero_rate_on_goods, ZeroLevyReasonCode.value_rounds_to_zero, ZeroLevyReasonCode.order_below_de_minimis_threshold, ZeroLevyReasonCode.amount_below_de_minimis_threshold, ZeroLevyReasonCode.delivered_unpaid, ZeroLevyReasonCode.duty_free_domestic, ZeroLevyReasonCode.duty_free_intra_community, ZeroLevyReasonCode.duty_free_reimport, ZeroLevyReasonCode.duty_free_by_trade_agreement] end |
.amount_below_de_minimis_threshold ⇒ Object
The amount owed is below the de minimis threshold
26500 26501 26502 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26500 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
26458 26459 26460 26461 26462 26463 26464 26465 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26458 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_unpaid ⇒ Object
The consumer has selected not to prepay tax, and thus we have not computed the tax they will owe
26506 26507 26508 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26506 def ZeroLevyReasonCode.delivered_unpaid @@_delivered_unpaid ||= ZeroLevyReasonCode.new('delivered_unpaid') end |
.duty_free_by_trade_agreement ⇒ Object
This cross-border tax or duty is not owed due to a certified trade agreement
26528 26529 26530 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26528 def ZeroLevyReasonCode.duty_free_by_trade_agreement @@_duty_free_by_trade_agreement ||= ZeroLevyReasonCode.new('duty_free_by_trade_agreement') end |
.duty_free_domestic ⇒ Object
This cross-border tax or duty is not owed because the sale is domestic
26511 26512 26513 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26511 def ZeroLevyReasonCode.duty_free_domestic @@_duty_free_domestic ||= ZeroLevyReasonCode.new('duty_free_domestic') end |
.duty_free_intra_community ⇒ Object
This cross-border tax or duty is not owed because the sale is within the borders of a customs union
26517 26518 26519 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26517 def ZeroLevyReasonCode.duty_free_intra_community @@_duty_free_intra_community ||= ZeroLevyReasonCode.new('duty_free_intra_community') end |
.duty_free_reimport ⇒ Object
When previously exported goods are re-imported back to the country of manufacture, they might be able to enter duty free.
26523 26524 26525 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26523 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
26468 26469 26470 26471 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26468 def ZeroLevyReasonCode.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ZeroLevyReasonCode.ALL.find { |v| v.value == value } end |
.order_below_de_minimis_threshold ⇒ Object
The order is below the de minimis threshold
26495 26496 26497 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26495 def ZeroLevyReasonCode.order_below_de_minimis_threshold @@_order_below_de_minimis_threshold ||= ZeroLevyReasonCode.new('order_below_de_minimis_threshold') end |
.value_rounds_to_zero ⇒ Object
A tax rate was applied, but the result rounded to zero.
26490 26491 26492 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26490 def ZeroLevyReasonCode.value_rounds_to_zero @@_value_rounds_to_zero ||= ZeroLevyReasonCode.new('value_rounds_to_zero') end |
.zero_basis ⇒ Object
When all the applicable components of an item price were added up, the result was a $0 basis
26479 26480 26481 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26479 def ZeroLevyReasonCode.zero_basis @@_zero_basis ||= ZeroLevyReasonCode.new('zero_basis') end |
.zero_rate_on_goods ⇒ Object
A general 0% rate is defined for items of this type (such as medical devices or children’s clothing)
26485 26486 26487 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26485 def ZeroLevyReasonCode.zero_rate_on_goods @@_zero_rate_on_goods ||= ZeroLevyReasonCode.new('zero_rate_on_goods') end |
Instance Method Details
#to_hash ⇒ Object
26532 26533 26534 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26532 def to_hash value end |