class Io::Flow::V0::Models::PriceDetailComponentKey
Attributes
Public Class Methods
# File lib/flow_commerce/flow_api_v0_client.rb, line 25226 def PriceDetailComponentKey.ALL @@all ||= [PriceDetailComponentKey.base_price, PriceDetailComponentKey.discount, PriceDetailComponentKey.currency_margin, PriceDetailComponentKey.percent_item_margin, PriceDetailComponentKey.fixed_item_margin, PriceDetailComponentKey.duties_item_price, PriceDetailComponentKey.duties_added_margin, PriceDetailComponentKey.duties_rounding, PriceDetailComponentKey.duties_deminimis, PriceDetailComponentKey.vat_item_price, PriceDetailComponentKey.vat_added_margin, PriceDetailComponentKey.vat_rounding, PriceDetailComponentKey.vat_duties_item_price, PriceDetailComponentKey.vat_duties_added_margin, PriceDetailComponentKey.vat_duties_rounding, PriceDetailComponentKey.vat_deminimis, PriceDetailComponentKey.item_price_percent_sales_margin, PriceDetailComponentKey.margins_percent_sales_margin, PriceDetailComponentKey.rounding_percent_sales_margin, PriceDetailComponentKey.vat_percent_sales_margin, PriceDetailComponentKey.vat_duty_percent_sales_margin, PriceDetailComponentKey.duty_percent_sales_margin] end
Returns the instance of PriceDetailComponentKey
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 25211 def PriceDetailComponentKey.apply(value) if value.instance_of?(PriceDetailComponentKey) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || PriceDetailComponentKey.new(value)) end end
The base price of the item.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25231 def PriceDetailComponentKey.base_price @@_base_price ||= PriceDetailComponentKey.new('base_price') end
The amount added to the post-discount item price due to FX markup, as configured in the organization’s currency settings.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25242 def PriceDetailComponentKey.currency_margin @@_currency_margin ||= PriceDetailComponentKey.new('currency_margin') end
A discount applied to the base price of the item.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25236 def PriceDetailComponentKey.discount @@_discount ||= PriceDetailComponentKey.new('discount') end
The duty owed on the sum of the currency margin, percent item margin, and fixed item margin.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25265 def PriceDetailComponentKey.duties_added_margin @@_duties_added_margin ||= PriceDetailComponentKey.new('duties_added_margin') end
An adjustment made if the item does not meet the duty de minimis rule.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25275 def PriceDetailComponentKey.duties_deminimis @@_duties_deminimis ||= PriceDetailComponentKey.new('duties_deminimis') end
The duty owed on the post-discount base item price.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25259 def PriceDetailComponentKey.duties_item_price @@_duties_item_price ||= PriceDetailComponentKey.new('duties_item_price') end
The duty owed on any rounding applied to the total item price.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25270 def PriceDetailComponentKey.duties_rounding @@_duties_rounding ||= PriceDetailComponentKey.new('duties_rounding') end
An adjustment made to duty owed as a result of a percent sales margin.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25343 def PriceDetailComponentKey.duty_percent_sales_margin @@_duty_percent_sales_margin ||= PriceDetailComponentKey.new('duty_percent_sales_margin') end
The amount added to the post-discount item price from a fixed item margin. Negative amounts represent discounts.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25254 def PriceDetailComponentKey.fixed_item_margin @@_fixed_item_margin ||= PriceDetailComponentKey.new('fixed_item_margin') end
Returns the instance of PriceDetailComponentKey
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 25221 def PriceDetailComponentKey.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) PriceDetailComponentKey.ALL.find { |v| v.value == value } end
An adjustment made to the item price as a result of a percent sales margin.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25317 def PriceDetailComponentKey.item_price_percent_sales_margin @@_item_price_percent_sales_margin ||= PriceDetailComponentKey.new('item_price_percent_sales_margin') end
An adjustment made to the item margins as a result of a percent sales margin.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25322 def PriceDetailComponentKey.margins_percent_sales_margin @@_margins_percent_sales_margin ||= PriceDetailComponentKey.new('margins_percent_sales_margin') end
# File lib/flow_commerce/flow_api_v0_client.rb, line 25206 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end
The amount added to the post-discount item price from a percent item margin. Negative amounts represent discounts.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25248 def PriceDetailComponentKey.percent_item_margin @@_percent_item_margin ||= PriceDetailComponentKey.new('percent_item_margin') end
An adjustment made to rounding as a result of a percent sales margin.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25327 def PriceDetailComponentKey.rounding_percent_sales_margin @@_rounding_percent_sales_margin ||= PriceDetailComponentKey.new('rounding_percent_sales_margin') end
The VAT owed on the sum of the currency margin, percent item margin, and fixed item margin.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25286 def PriceDetailComponentKey.vat_added_margin @@_vat_added_margin ||= PriceDetailComponentKey.new('vat_added_margin') end
An adjustment made if the item does not meet the VAT de minimis rule.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25312 def PriceDetailComponentKey.vat_deminimis @@_vat_deminimis ||= PriceDetailComponentKey.new('vat_deminimis') end
The VAT owed on the duty owed on the sum of the currency margin, percent item margin, and fixed item margin.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25302 def PriceDetailComponentKey.vat_duties_added_margin @@_vat_duties_added_margin ||= PriceDetailComponentKey.new('vat_duties_added_margin') end
The VAT owed on the duty owed on the post-discount base item price.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25296 def PriceDetailComponentKey.vat_duties_item_price @@_vat_duties_item_price ||= PriceDetailComponentKey.new('vat_duties_item_price') end
The VAT owed on the duty owed on any rounding applied to the total item price.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25307 def PriceDetailComponentKey.vat_duties_rounding @@_vat_duties_rounding ||= PriceDetailComponentKey.new('vat_duties_rounding') end
An adjustment made to VAT on duties (e.g. VAT on duties on item price) owed as a result of a percent sales margin.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25338 def PriceDetailComponentKey.vat_duty_percent_sales_margin @@_vat_duty_percent_sales_margin ||= PriceDetailComponentKey.new('vat_duty_percent_sales_margin') end
The VAT owed on the post-discount base item price.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25280 def PriceDetailComponentKey.vat_item_price @@_vat_item_price ||= PriceDetailComponentKey.new('vat_item_price') end
An adjustment made to VAT owed as a result of a percent sales margin.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25332 def PriceDetailComponentKey.vat_percent_sales_margin @@_vat_percent_sales_margin ||= PriceDetailComponentKey.new('vat_percent_sales_margin') end
The VAT owed on any rounding applied to the total item price.
# File lib/flow_commerce/flow_api_v0_client.rb, line 25291 def PriceDetailComponentKey.vat_rounding @@_vat_rounding ||= PriceDetailComponentKey.new('vat_rounding') end
Public Instance Methods
# File lib/flow_commerce/flow_api_v0_client.rb, line 25347 def to_hash value end