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_deminimus ⇒ Object
An adjustment made if the item does not meet the duty deminimus 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_deminimus ⇒ Object
An adjustment made if the item does not meet the VAT deminimus 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.
6017 6018 6019 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6017 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
6015 6016 6017 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6015 def value @value end |
Class Method Details
.ALL ⇒ Object
.apply(value) ⇒ Object
Returns the instance of PriceDetailComponentKey for this value, creating a new instance for an unknown value
6022 6023 6024 6025 6026 6027 6028 6029 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6022 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.
6042 6043 6044 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6042 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.
6053 6054 6055 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6053 def PriceDetailComponentKey.currency_margin @@_currency_margin ||= PriceDetailComponentKey.new('currency_margin') end |
.discount ⇒ Object
A discount applied to the item.
6047 6048 6049 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6047 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.
6075 6076 6077 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6075 def PriceDetailComponentKey.duties_added_margin @@_duties_added_margin ||= PriceDetailComponentKey.new('duties_added_margin') end |
.duties_deminimus ⇒ Object
An adjustment made if the item does not meet the duty deminimus rule.
6085 6086 6087 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6085 def PriceDetailComponentKey.duties_deminimus @@_duties_deminimus ||= PriceDetailComponentKey.new('duties_deminimus') end |
.duties_item_price ⇒ Object
The duty owed on the post-discount base item price.
6069 6070 6071 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6069 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.
6080 6081 6082 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6080 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.
6064 6065 6066 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6064 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
6032 6033 6034 6035 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6032 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.
6059 6060 6061 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6059 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.
6096 6097 6098 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6096 def PriceDetailComponentKey.vat_added_margin @@_vat_added_margin ||= PriceDetailComponentKey.new('vat_added_margin') end |
.vat_deminimus ⇒ Object
An adjustment made if the item does not meet the VAT deminimus rule.
6122 6123 6124 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6122 def PriceDetailComponentKey.vat_deminimus @@_vat_deminimus ||= PriceDetailComponentKey.new('vat_deminimus') 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.
6112 6113 6114 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6112 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.
6106 6107 6108 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6106 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.
6117 6118 6119 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6117 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.
6090 6091 6092 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6090 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.
6101 6102 6103 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6101 def PriceDetailComponentKey.vat_rounding @@_vat_rounding ||= PriceDetailComponentKey.new('vat_rounding') end |
Instance Method Details
#to_hash ⇒ Object
6126 6127 6128 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6126 def to_hash value end |