Class: Io::Flow::V0::Models::OrderPriceDetailComponentKey
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderPriceDetailComponentKey
- 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
-
.adjustment ⇒ Object
A general purpose adjustment applied to the order.
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of OrderPriceDetailComponentKey for this value, creating a new instance for an unknown value.
-
.duties_freight ⇒ Object
The duty owed on the freight cost of the order.
-
.duties_insurance ⇒ Object
The duty owed on the insurance cost of the order.
-
.duties_item_price ⇒ Object
The VAT owed on the price of the order’s items, including any added margins and rounding.
-
.duty_deminimis ⇒ Object
An adjustment based on whether the duty de minimis applies to the order.
-
.duty_subsidy ⇒ Object
An offset to account for any duty subsidized by the organization.
-
.from_string(value) ⇒ Object
Returns the instance of OrderPriceDetailComponentKey for this value, or nil if not found.
-
.insurance ⇒ Object
The insurance cost for the order.
-
.item_price ⇒ Object
The sum of the price of the order’s items with their currency margins, percent margins, and fixed margins included.
-
.order_discount ⇒ Object
A discount applied to the entire order.
-
.rounding ⇒ Object
The sum of any rounding applied to the order’s items.
-
.shipping ⇒ Object
The shipping cost for the order.
-
.subtotal_duty_percent_sales_margin ⇒ Object
The sum of adjustments to duty owed made due to percentage sales margins.
-
.subtotal_percent_sales_margin ⇒ Object
The sum of adjustments to item price, margin and rounding made due to percentage sales margins.
-
.subtotal_vat_percent_sales_margin ⇒ Object
The sum of adjustments to VAT owed made due to percentage sales margins.
-
.vat_deminimis ⇒ Object
An adjustment based on whether the VAT de minimis applies to the order.
-
.vat_duties_freight ⇒ Object
The VAT owed on the duties on the freight cost of the order.
-
.vat_duties_insurance ⇒ Object
The VAT owed on the duties on the insurance cost of the order.
-
.vat_duties_item_price ⇒ Object
The VAT owed on the duties on the price of the order’s items, including any added margins and rounding.
-
.vat_freight ⇒ Object
The VAT owed on the freight cost of the order.
-
.vat_insurance ⇒ Object
The VAT owed on the insurance cost of the order.
-
.vat_item_price ⇒ Object
The VAT owed on the price of the order’s items, including any added margins and rounding.
-
.vat_subsidy ⇒ Object
An offset to account for any VAT subsidized by the organization.
Instance Method Summary collapse
-
#initialize(value) ⇒ OrderPriceDetailComponentKey
constructor
A new instance of OrderPriceDetailComponentKey.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ OrderPriceDetailComponentKey
Returns a new instance of OrderPriceDetailComponentKey.
8036 8037 8038 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8036 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
8034 8035 8036 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8034 def value @value end |
Class Method Details
.adjustment ⇒ Object
A general purpose adjustment applied to the order.
8061 8062 8063 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8061 def OrderPriceDetailComponentKey.adjustment @@_adjustment ||= OrderPriceDetailComponentKey.new('adjustment') end |
.ALL ⇒ Object
.apply(value) ⇒ Object
Returns the instance of OrderPriceDetailComponentKey for this value, creating a new instance for an unknown value
8041 8042 8043 8044 8045 8046 8047 8048 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8041 def OrderPriceDetailComponentKey.apply(value) if value.instance_of?(OrderPriceDetailComponentKey) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || OrderPriceDetailComponentKey.new(value)) end end |
.duties_freight ⇒ Object
The duty owed on the freight cost of the order.
8082 8083 8084 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8082 def OrderPriceDetailComponentKey.duties_freight @@_duties_freight ||= OrderPriceDetailComponentKey.new('duties_freight') end |
.duties_insurance ⇒ Object
The duty owed on the insurance cost of the order.
8087 8088 8089 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8087 def OrderPriceDetailComponentKey.duties_insurance @@_duties_insurance ||= OrderPriceDetailComponentKey.new('duties_insurance') end |
.duties_item_price ⇒ Object
The VAT owed on the price of the order’s items, including any added margins and rounding.
8077 8078 8079 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8077 def OrderPriceDetailComponentKey.duties_item_price @@_duties_item_price ||= OrderPriceDetailComponentKey.new('duties_item_price') end |
.duty_deminimis ⇒ Object
An adjustment based on whether the duty de minimis applies to the order.
8071 8072 8073 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8071 def OrderPriceDetailComponentKey.duty_deminimis @@_duty_deminimis ||= OrderPriceDetailComponentKey.new('duty_deminimis') end |
.duty_subsidy ⇒ Object
An offset to account for any duty subsidized by the organization. For example, if duty is included in an item price and changes at the order level (due to passing de minimis threshold, or the destination having a more specific duty rate), the difference will be represented here.
8177 8178 8179 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8177 def OrderPriceDetailComponentKey.duty_subsidy @@_duty_subsidy ||= OrderPriceDetailComponentKey.new('duty_subsidy') end |
.from_string(value) ⇒ Object
Returns the instance of OrderPriceDetailComponentKey for this value, or nil if not found
8051 8052 8053 8054 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8051 def OrderPriceDetailComponentKey.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) OrderPriceDetailComponentKey.ALL.find { |v| v.value == value } end |
.insurance ⇒ Object
The insurance cost for the order.
8135 8136 8137 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8135 def OrderPriceDetailComponentKey.insurance @@_insurance ||= OrderPriceDetailComponentKey.new('insurance') end |
.item_price ⇒ Object
The sum of the price of the order’s items with their currency margins, percent margins, and fixed margins included.
8125 8126 8127 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8125 def OrderPriceDetailComponentKey.item_price @@_item_price ||= OrderPriceDetailComponentKey.new('item_price') end |
.order_discount ⇒ Object
A discount applied to the entire order.
8145 8146 8147 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8145 def OrderPriceDetailComponentKey.order_discount @@_order_discount ||= OrderPriceDetailComponentKey.new('order_discount') end |
.rounding ⇒ Object
The sum of any rounding applied to the order’s items.
8130 8131 8132 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8130 def OrderPriceDetailComponentKey.rounding @@_rounding ||= OrderPriceDetailComponentKey.new('rounding') end |
.shipping ⇒ Object
The shipping cost for the order.
8140 8141 8142 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8140 def OrderPriceDetailComponentKey.shipping @@_shipping ||= OrderPriceDetailComponentKey.new('shipping') end |
.subtotal_duty_percent_sales_margin ⇒ Object
The sum of adjustments to duty owed made due to percentage sales margins.
8161 8162 8163 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8161 def OrderPriceDetailComponentKey.subtotal_duty_percent_sales_margin @@_subtotal_duty_percent_sales_margin ||= OrderPriceDetailComponentKey.new('subtotal_duty_percent_sales_margin') end |
.subtotal_percent_sales_margin ⇒ Object
The sum of adjustments to item price, margin and rounding made due to percentage sales margins.
8151 8152 8153 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8151 def OrderPriceDetailComponentKey.subtotal_percent_sales_margin @@_subtotal_percent_sales_margin ||= OrderPriceDetailComponentKey.new('subtotal_percent_sales_margin') end |
.subtotal_vat_percent_sales_margin ⇒ Object
The sum of adjustments to VAT owed made due to percentage sales margins.
8156 8157 8158 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8156 def OrderPriceDetailComponentKey.subtotal_vat_percent_sales_margin @@_subtotal_vat_percent_sales_margin ||= OrderPriceDetailComponentKey.new('subtotal_vat_percent_sales_margin') end |
.vat_deminimis ⇒ Object
An adjustment based on whether the VAT de minimis applies to the order.
8066 8067 8068 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8066 def OrderPriceDetailComponentKey.vat_deminimis @@_vat_deminimis ||= OrderPriceDetailComponentKey.new('vat_deminimis') end |
.vat_duties_freight ⇒ Object
The VAT owed on the duties on the freight cost of the order.
8114 8115 8116 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8114 def OrderPriceDetailComponentKey.vat_duties_freight @@_vat_duties_freight ||= OrderPriceDetailComponentKey.new('vat_duties_freight') end |
.vat_duties_insurance ⇒ Object
The VAT owed on the duties on the insurance cost of the order.
8119 8120 8121 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8119 def OrderPriceDetailComponentKey.vat_duties_insurance @@_vat_duties_insurance ||= OrderPriceDetailComponentKey.new('vat_duties_insurance') end |
.vat_duties_item_price ⇒ Object
The VAT owed on the duties on the price of the order’s items, including any added margins and rounding.
8109 8110 8111 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8109 def OrderPriceDetailComponentKey.vat_duties_item_price @@_vat_duties_item_price ||= OrderPriceDetailComponentKey.new('vat_duties_item_price') end |
.vat_freight ⇒ Object
The VAT owed on the freight cost of the order.
8098 8099 8100 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8098 def OrderPriceDetailComponentKey.vat_freight @@_vat_freight ||= OrderPriceDetailComponentKey.new('vat_freight') end |
.vat_insurance ⇒ Object
The VAT owed on the insurance cost of the order.
8103 8104 8105 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8103 def OrderPriceDetailComponentKey.vat_insurance @@_vat_insurance ||= OrderPriceDetailComponentKey.new('vat_insurance') end |
.vat_item_price ⇒ Object
The VAT owed on the price of the order’s items, including any added margins and rounding.
8093 8094 8095 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8093 def OrderPriceDetailComponentKey.vat_item_price @@_vat_item_price ||= OrderPriceDetailComponentKey.new('vat_item_price') end |
.vat_subsidy ⇒ Object
An offset to account for any VAT subsidized by the organization. For example, if VAT is included in an item price and changes at the order level (due to passing de minimis threshold, or the destination having a more specific VAT rate), the difference will be represented here.
8169 8170 8171 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8169 def OrderPriceDetailComponentKey.vat_subsidy @@_vat_subsidy ||= OrderPriceDetailComponentKey.new('vat_subsidy') end |
Instance Method Details
#to_hash ⇒ Object
8181 8182 8183 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8181 def to_hash value end |