Class: Io::Flow::V0::Models::PriceDetailComponentKey
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PriceDetailComponentKey
- 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 PriceDetailComponentKey for this value, creating a new instance for an unknown value.
-
.base_price ⇒ Object
The base price of the item.
-
.currency_margin ⇒ Object
The amount added to the post-discount base item price due to FX markup, as configured in the organization’s currency settings.
-
.discount ⇒ Object
A discount applied to the item.
-
.duties_added_margin ⇒ Object
The duty owed on the sum of the currency margin, percent item margin, and fixed item margin.
-
.duties_deminimis ⇒ Object
An adjustment made if the item does not meet the duty de minimis rule.
-
.duties_item_price ⇒ Object
The duty owed on the post-discount base item price.
-
.duties_rounding ⇒ Object
The duty owed on any rounding applied to the total item price.
-
.fixed_item_margin ⇒ Object
The amount added to the total item price from the fixed margin, if applicable.
-
.from_string(value) ⇒ Object
Returns the instance of PriceDetailComponentKey for this value, or nil if not found.
-
.percent_item_margin ⇒ Object
The amount added to the total item price from the percent margin, if applicable.
-
.vat_added_margin ⇒ Object
The VAT owed on the sum of the currency margin, percent item margin, and fixed item margin.
-
.vat_deminimis ⇒ Object
An adjustment made if the item does not meet the VAT de minimis rule.
-
.vat_duties_added_margin ⇒ Object
The VAT owed on the duty owed on the sum of the currency margin, percent item margin, and fixed item margin.
-
.vat_duties_item_price ⇒ Object
The VAT owed on the duty owed on the post-discount base item price.
-
.vat_duties_rounding ⇒ Object
The VAT owed on the duty owed on any rounding applied to the total item price.
-
.vat_item_price ⇒ Object
The VAT owed on the post-discount base item price.
-
.vat_rounding ⇒ Object
The VAT owed on any rounding applied to the total item price.
Instance Method Summary collapse
-
#initialize(value) ⇒ PriceDetailComponentKey
constructor
A new instance of PriceDetailComponentKey.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ PriceDetailComponentKey
Returns a new instance of PriceDetailComponentKey.
7734 7735 7736 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7734 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
7732 7733 7734 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7732 def value @value end |
Class Method Details
.ALL ⇒ Object
7754 7755 7756 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7754 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] end |
.apply(value) ⇒ Object
Returns the instance of PriceDetailComponentKey for this value, creating a new instance for an unknown value
7739 7740 7741 7742 7743 7744 7745 7746 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7739 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 |
.base_price ⇒ Object
The base price of the item.
7759 7760 7761 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7759 def PriceDetailComponentKey.base_price @@_base_price ||= PriceDetailComponentKey.new('base_price') end |
.currency_margin ⇒ Object
The amount added to the post-discount base item price due to FX markup, as configured in the organization’s currency settings.
7770 7771 7772 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7770 def PriceDetailComponentKey.currency_margin @@_currency_margin ||= PriceDetailComponentKey.new('currency_margin') end |
.discount ⇒ Object
A discount applied to the item.
7764 7765 7766 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7764 def PriceDetailComponentKey.discount @@_discount ||= PriceDetailComponentKey.new('discount') end |
.duties_added_margin ⇒ Object
The duty owed on the sum of the currency margin, percent item margin, and fixed item margin.
7792 7793 7794 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7792 def PriceDetailComponentKey.duties_added_margin @@_duties_added_margin ||= PriceDetailComponentKey.new('duties_added_margin') end |
.duties_deminimis ⇒ Object
An adjustment made if the item does not meet the duty de minimis rule.
7802 7803 7804 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7802 def PriceDetailComponentKey.duties_deminimis @@_duties_deminimis ||= PriceDetailComponentKey.new('duties_deminimis') end |
.duties_item_price ⇒ Object
The duty owed on the post-discount base item price.
7786 7787 7788 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7786 def PriceDetailComponentKey.duties_item_price @@_duties_item_price ||= PriceDetailComponentKey.new('duties_item_price') end |
.duties_rounding ⇒ Object
The duty owed on any rounding applied to the total item price.
7797 7798 7799 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7797 def PriceDetailComponentKey.duties_rounding @@_duties_rounding ||= PriceDetailComponentKey.new('duties_rounding') end |
.fixed_item_margin ⇒ Object
The amount added to the total item price from the fixed margin, if applicable.
7781 7782 7783 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7781 def PriceDetailComponentKey.fixed_item_margin @@_fixed_item_margin ||= PriceDetailComponentKey.new('fixed_item_margin') end |
.from_string(value) ⇒ Object
Returns the instance of PriceDetailComponentKey for this value, or nil if not found
7749 7750 7751 7752 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7749 def PriceDetailComponentKey.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) PriceDetailComponentKey.ALL.find { |v| v.value == value } end |
.percent_item_margin ⇒ Object
The amount added to the total item price from the percent margin, if applicable.
7776 7777 7778 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7776 def PriceDetailComponentKey.percent_item_margin @@_percent_item_margin ||= PriceDetailComponentKey.new('percent_item_margin') end |
.vat_added_margin ⇒ Object
The VAT owed on the sum of the currency margin, percent item margin, and fixed item margin.
7813 7814 7815 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7813 def PriceDetailComponentKey.vat_added_margin @@_vat_added_margin ||= PriceDetailComponentKey.new('vat_added_margin') end |
.vat_deminimis ⇒ Object
An adjustment made if the item does not meet the VAT de minimis rule.
7839 7840 7841 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7839 def PriceDetailComponentKey.vat_deminimis @@_vat_deminimis ||= PriceDetailComponentKey.new('vat_deminimis') end |
.vat_duties_added_margin ⇒ Object
The VAT owed on the duty owed on the sum of the currency margin, percent item margin, and fixed item margin.
7829 7830 7831 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7829 def PriceDetailComponentKey.vat_duties_added_margin @@_vat_duties_added_margin ||= PriceDetailComponentKey.new('vat_duties_added_margin') end |
.vat_duties_item_price ⇒ Object
The VAT owed on the duty owed on the post-discount base item price.
7823 7824 7825 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7823 def PriceDetailComponentKey.vat_duties_item_price @@_vat_duties_item_price ||= PriceDetailComponentKey.new('vat_duties_item_price') end |
.vat_duties_rounding ⇒ Object
The VAT owed on the duty owed on any rounding applied to the total item price.
7834 7835 7836 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7834 def PriceDetailComponentKey.vat_duties_rounding @@_vat_duties_rounding ||= PriceDetailComponentKey.new('vat_duties_rounding') end |
.vat_item_price ⇒ Object
The VAT owed on the post-discount base item price.
7807 7808 7809 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7807 def PriceDetailComponentKey.vat_item_price @@_vat_item_price ||= PriceDetailComponentKey.new('vat_item_price') end |
.vat_rounding ⇒ Object
The VAT owed on any rounding applied to the total item price.
7818 7819 7820 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7818 def PriceDetailComponentKey.vat_rounding @@_vat_rounding ||= PriceDetailComponentKey.new('vat_rounding') end |
Instance Method Details
#to_hash ⇒ Object
7843 7844 7845 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7843 def to_hash value end |