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.



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

#valueObject (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

.ALLObject



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_thresholdObject

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_unpaidObject

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_agreementObject

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_domesticObject

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_communityObject

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_reimportObject

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_thresholdObject

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_zeroObject

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_basisObject

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_goodsObject

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_hashObject



26532
26533
26534
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26532

def to_hash
  value
end