Class: Io::Flow::V0::Models::TaxDutyCalculatorValidationErrorCode
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::TaxDutyCalculatorValidationErrorCode
- 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
-
.apply(value) ⇒ Object
Returns the instance of TaxDutyCalculatorValidationErrorCode for this value, creating a new instance for an unknown value.
-
.destination_address_iso3166_unrecognized ⇒ Object
Destination address country is not recognized as a destination country in ISO 3166.
-
.destination_country_not_defined ⇒ Object
Destination address including at minimum a country must be included to properly generate a tax quote.
-
.from_string(value) ⇒ Object
Returns the instance of TaxDutyCalculatorValidationErrorCode for this value, or nil if not found.
- .generic_error ⇒ Object
-
.line_item_country_of_origin_iso3166_unrecognized ⇒ Object
Line item country of origin is not recognized as a country of origin in ISO 3166.
-
.line_item_currency_iso4217_unrecognized ⇒ Object
Line item provided currency is not recognized as a calculation currency in ISO 4217.
-
.line_item_discount_amount_positive ⇒ Object
Line item Unit discount must be less than or equal to 0.
-
.line_item_discount_amount_precision_invalid ⇒ Object
Line item Unit discount amount is more precise than the maximum allowed for this currency.
-
.line_item_duty_provider_invalid ⇒ Object
Line item country of origin and shipto country resulted in inability to calculate duty.
-
.line_item_hs_code_invalid ⇒ Object
Line item does not appear to contain a properly formed hs code.
-
.line_item_quantity_invalid ⇒ Object
Line item quantity must be greater than 0.
-
.line_item_ship_from_invalid ⇒ Object
Every line’s ship from address must include a country to properly generate a tax quote.
-
.line_item_shipfrom_shipto_country_invalid ⇒ Object
This is a cross-border calculator.
-
.line_item_unit_price_negative ⇒ Object
Line Item Unit amount must be greater than or equal to 0.
-
.line_item_unit_price_precision_invalid ⇒ Object
Provided value for unit amount is more precise than the maximum allowed for this currency.
-
.line_quantity_invalid ⇒ Object
Order must contain at least one line of ordered goods.
-
.merchant_of_record_invalid ⇒ Object
Only ‘Flow’ is supported as Merchant of Record.
-
.shipping_discount_amount_invalid ⇒ Object
Shipping discount must be less than or equal to 0.
-
.shipping_discount_amount_precision_invalid ⇒ Object
Shipping discount amount is more precise than the maximum allowed for this currency.
-
.shipping_unit_price_negative ⇒ Object
Shipping amount must be greater than or equal to 0.
-
.shipping_unit_price_precision_invalid ⇒ Object
Shipping amount is more precise than the maximum allowed for this currency.
-
.wrong_unit_specified ⇒ Object
Only weight units may be specified for a unit weight.
Instance Method Summary collapse
-
#initialize(value) ⇒ TaxDutyCalculatorValidationErrorCode
constructor
A new instance of TaxDutyCalculatorValidationErrorCode.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ TaxDutyCalculatorValidationErrorCode
Returns a new instance of TaxDutyCalculatorValidationErrorCode.
27162 27163 27164 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27162 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
27160 27161 27162 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27160 def value @value end |
Class Method Details
.ALL ⇒ Object
.apply(value) ⇒ Object
Returns the instance of TaxDutyCalculatorValidationErrorCode for this value, creating a new instance for an unknown value
27167 27168 27169 27170 27171 27172 27173 27174 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27167 def TaxDutyCalculatorValidationErrorCode.apply(value) if value.instance_of?(TaxDutyCalculatorValidationErrorCode) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || TaxDutyCalculatorValidationErrorCode.new(value)) end end |
.destination_address_iso3166_unrecognized ⇒ Object
Destination address country is not recognized as a destination country in ISO 3166
27198 27199 27200 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27198 def TaxDutyCalculatorValidationErrorCode.destination_address_iso3166_unrecognized @@_destination_address_iso3166_unrecognized ||= TaxDutyCalculatorValidationErrorCode.new('destination_address_iso3166_unrecognized') end |
.destination_country_not_defined ⇒ Object
Destination address including at minimum a country must be included to properly generate a tax quote
27192 27193 27194 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27192 def TaxDutyCalculatorValidationErrorCode.destination_country_not_defined @@_destination_country_not_defined ||= TaxDutyCalculatorValidationErrorCode.new('destination_country_not_defined') end |
.from_string(value) ⇒ Object
Returns the instance of TaxDutyCalculatorValidationErrorCode for this value, or nil if not found
27177 27178 27179 27180 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27177 def TaxDutyCalculatorValidationErrorCode.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) TaxDutyCalculatorValidationErrorCode.ALL.find { |v| v.value == value } end |
.generic_error ⇒ Object
27186 27187 27188 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27186 def TaxDutyCalculatorValidationErrorCode.generic_error @@_generic_error ||= TaxDutyCalculatorValidationErrorCode.new('generic_error') end |
.line_item_country_of_origin_iso3166_unrecognized ⇒ Object
Line item country of origin is not recognized as a country of origin in ISO 3166
27254 27255 27256 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27254 def TaxDutyCalculatorValidationErrorCode.line_item_country_of_origin_iso3166_unrecognized @@_line_item_country_of_origin_iso3166_unrecognized ||= TaxDutyCalculatorValidationErrorCode.new('line_item_country_of_origin_iso3166_unrecognized') end |
.line_item_currency_iso4217_unrecognized ⇒ Object
Line item provided currency is not recognized as a calculation currency in ISO 4217
27216 27217 27218 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27216 def TaxDutyCalculatorValidationErrorCode.line_item_currency_iso4217_unrecognized @@_line_item_currency_iso4217_unrecognized ||= TaxDutyCalculatorValidationErrorCode.new('line_item_currency_iso4217_unrecognized') end |
.line_item_discount_amount_positive ⇒ Object
Line item Unit discount must be less than or equal to 0
27248 27249 27250 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27248 def TaxDutyCalculatorValidationErrorCode.line_item_discount_amount_positive @@_line_item_discount_amount_positive ||= TaxDutyCalculatorValidationErrorCode.new('line_item_discount_amount_positive') end |
.line_item_discount_amount_precision_invalid ⇒ Object
Line item Unit discount amount is more precise than the maximum allowed for this currency
27243 27244 27245 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27243 def TaxDutyCalculatorValidationErrorCode.line_item_discount_amount_precision_invalid @@_line_item_discount_amount_precision_invalid ||= TaxDutyCalculatorValidationErrorCode.new('line_item_discount_amount_precision_invalid') end |
.line_item_duty_provider_invalid ⇒ Object
Line item country of origin and shipto country resulted in inability to calculate duty.
27266 27267 27268 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27266 def TaxDutyCalculatorValidationErrorCode.line_item_duty_provider_invalid @@_line_item_duty_provider_invalid ||= TaxDutyCalculatorValidationErrorCode.new('line_item_duty_provider_invalid') end |
.line_item_hs_code_invalid ⇒ Object
Line item does not appear to contain a properly formed hs code. Please provide a 6 digit code or a 4-14 digit code specific to the destination country
27260 27261 27262 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27260 def TaxDutyCalculatorValidationErrorCode.line_item_hs_code_invalid @@_line_item_hs_code_invalid ||= TaxDutyCalculatorValidationErrorCode.new('line_item_hs_code_invalid') end |
.line_item_quantity_invalid ⇒ Object
Line item quantity must be greater than 0
27226 27227 27228 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27226 def TaxDutyCalculatorValidationErrorCode.line_item_quantity_invalid @@_line_item_quantity_invalid ||= TaxDutyCalculatorValidationErrorCode.new('line_item_quantity_invalid') end |
.line_item_ship_from_invalid ⇒ Object
Every line’s ship from address must include a country to properly generate a tax quote
27210 27211 27212 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27210 def TaxDutyCalculatorValidationErrorCode.line_item_ship_from_invalid @@_line_item_ship_from_invalid ||= TaxDutyCalculatorValidationErrorCode.new('line_item_ship_from_invalid') end |
.line_item_shipfrom_shipto_country_invalid ⇒ Object
This is a cross-border calculator. No line’s ship from country can be the same as the destination country
27204 27205 27206 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27204 def TaxDutyCalculatorValidationErrorCode.line_item_shipfrom_shipto_country_invalid @@_line_item_shipfrom_shipto_country_invalid ||= TaxDutyCalculatorValidationErrorCode.new('line_item_shipfrom_shipto_country_invalid') end |
.line_item_unit_price_negative ⇒ Object
Line Item Unit amount must be greater than or equal to 0
27237 27238 27239 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27237 def TaxDutyCalculatorValidationErrorCode.line_item_unit_price_negative @@_line_item_unit_price_negative ||= TaxDutyCalculatorValidationErrorCode.new('line_item_unit_price_negative') end |
.line_item_unit_price_precision_invalid ⇒ Object
Provided value for unit amount is more precise than the maximum allowed for this currency
27232 27233 27234 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27232 def TaxDutyCalculatorValidationErrorCode.line_item_unit_price_precision_invalid @@_line_item_unit_price_precision_invalid ||= TaxDutyCalculatorValidationErrorCode.new('line_item_unit_price_precision_invalid') end |
.line_quantity_invalid ⇒ Object
Order must contain at least one line of ordered goods
27221 27222 27223 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27221 def TaxDutyCalculatorValidationErrorCode.line_quantity_invalid @@_line_quantity_invalid ||= TaxDutyCalculatorValidationErrorCode.new('line_quantity_invalid') end |
.merchant_of_record_invalid ⇒ Object
Only ‘Flow’ is supported as Merchant of Record
27292 27293 27294 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27292 def TaxDutyCalculatorValidationErrorCode.merchant_of_record_invalid @@_merchant_of_record_invalid ||= TaxDutyCalculatorValidationErrorCode.new('merchant_of_record_invalid') end |
.shipping_discount_amount_invalid ⇒ Object
Shipping discount must be less than or equal to 0
27287 27288 27289 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27287 def TaxDutyCalculatorValidationErrorCode.shipping_discount_amount_invalid @@_shipping_discount_amount_invalid ||= TaxDutyCalculatorValidationErrorCode.new('shipping_discount_amount_invalid') end |
.shipping_discount_amount_precision_invalid ⇒ Object
Shipping discount amount is more precise than the maximum allowed for this currency
27282 27283 27284 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27282 def TaxDutyCalculatorValidationErrorCode.shipping_discount_amount_precision_invalid @@_shipping_discount_amount_precision_invalid ||= TaxDutyCalculatorValidationErrorCode.new('shipping_discount_amount_precision_invalid') end |
.shipping_unit_price_negative ⇒ Object
Shipping amount must be greater than or equal to 0
27276 27277 27278 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27276 def TaxDutyCalculatorValidationErrorCode.shipping_unit_price_negative @@_shipping_unit_price_negative ||= TaxDutyCalculatorValidationErrorCode.new('shipping_unit_price_negative') end |
.shipping_unit_price_precision_invalid ⇒ Object
Shipping amount is more precise than the maximum allowed for this currency
27271 27272 27273 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27271 def TaxDutyCalculatorValidationErrorCode.shipping_unit_price_precision_invalid @@_shipping_unit_price_precision_invalid ||= TaxDutyCalculatorValidationErrorCode.new('shipping_unit_price_precision_invalid') end |
.wrong_unit_specified ⇒ Object
Only weight units may be specified for a unit weight.
27297 27298 27299 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27297 def TaxDutyCalculatorValidationErrorCode.wrong_unit_specified @@_wrong_unit_specified ||= TaxDutyCalculatorValidationErrorCode.new('wrong_unit_specified') end |
Instance Method Details
#to_hash ⇒ Object
27301 27302 27303 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27301 def to_hash value end |