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 duty 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.
-
.emergency_situation_surcharge ⇒ Object
Surcharge applied to a shipment during emergency circumstances, such as covid19.
-
.from_string(value) ⇒ Object
Returns the instance of OrderPriceDetailComponentKey for this value, or nil if not found.
-
.fuel_surcharge ⇒ Object
Surcharge applied to a shipment for fuel consumption by the carrier.
-
.insurance ⇒ Object
The insurance cost for the order.
-
.item_discount ⇒ Object
The sum of all discounts applied to the order’s items.
-
.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.
-
.remote_area_surcharge ⇒ Object
Surcharge applied to a shipment for delivery to a remote area determined by the carrier.
-
.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.
17466 17467 17468 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17466 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
17464 17465 17466 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17464 def value @value end |
Class Method Details
.adjustment ⇒ Object
A general purpose adjustment applied to the order.
17491 17492 17493 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17491 def OrderPriceDetailComponentKey.adjustment @@_adjustment ||= OrderPriceDetailComponentKey.new('adjustment') end |
.ALL ⇒ Object
17486 17487 17488 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17486 def OrderPriceDetailComponentKey.ALL @@all ||= [OrderPriceDetailComponentKey.adjustment, OrderPriceDetailComponentKey.vat_deminimis, OrderPriceDetailComponentKey.duty_deminimis, OrderPriceDetailComponentKey.duties_item_price, OrderPriceDetailComponentKey.duties_freight, OrderPriceDetailComponentKey.duties_insurance, OrderPriceDetailComponentKey.vat_item_price, OrderPriceDetailComponentKey.vat_freight, OrderPriceDetailComponentKey.vat_insurance, OrderPriceDetailComponentKey.vat_duties_item_price, OrderPriceDetailComponentKey.vat_duties_freight, OrderPriceDetailComponentKey.vat_duties_insurance, OrderPriceDetailComponentKey.item_price, OrderPriceDetailComponentKey.item_discount, OrderPriceDetailComponentKey.rounding, OrderPriceDetailComponentKey.insurance, OrderPriceDetailComponentKey.shipping, OrderPriceDetailComponentKey.order_discount, OrderPriceDetailComponentKey.subtotal_percent_sales_margin, OrderPriceDetailComponentKey.subtotal_vat_percent_sales_margin, OrderPriceDetailComponentKey.subtotal_duty_percent_sales_margin, OrderPriceDetailComponentKey.vat_subsidy, OrderPriceDetailComponentKey.duty_subsidy, OrderPriceDetailComponentKey.remote_area_surcharge, OrderPriceDetailComponentKey.fuel_surcharge, OrderPriceDetailComponentKey.emergency_situation_surcharge] end |
.apply(value) ⇒ Object
Returns the instance of OrderPriceDetailComponentKey for this value, creating a new instance for an unknown value
17471 17472 17473 17474 17475 17476 17477 17478 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17471 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.
17512 17513 17514 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17512 def OrderPriceDetailComponentKey.duties_freight @@_duties_freight ||= OrderPriceDetailComponentKey.new('duties_freight') end |
.duties_insurance ⇒ Object
The duty owed on the insurance cost of the order.
17517 17518 17519 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17517 def OrderPriceDetailComponentKey.duties_insurance @@_duties_insurance ||= OrderPriceDetailComponentKey.new('duties_insurance') end |
.duties_item_price ⇒ Object
The duty owed on the price of the order’s items, including any added margins and rounding.
17507 17508 17509 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17507 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.
17501 17502 17503 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17501 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.
17612 17613 17614 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17612 def OrderPriceDetailComponentKey.duty_subsidy @@_duty_subsidy ||= OrderPriceDetailComponentKey.new('duty_subsidy') end |
.emergency_situation_surcharge ⇒ Object
Surcharge applied to a shipment during emergency circumstances, such as covid19.
17629 17630 17631 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17629 def OrderPriceDetailComponentKey.emergency_situation_surcharge @@_emergency_situation_surcharge ||= OrderPriceDetailComponentKey.new('emergency_situation_surcharge') end |
.from_string(value) ⇒ Object
Returns the instance of OrderPriceDetailComponentKey for this value, or nil if not found
17481 17482 17483 17484 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17481 def OrderPriceDetailComponentKey.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) OrderPriceDetailComponentKey.ALL.find { |v| v.value == value } end |
.fuel_surcharge ⇒ Object
Surcharge applied to a shipment for fuel consumption by the carrier.
17623 17624 17625 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17623 def OrderPriceDetailComponentKey.fuel_surcharge @@_fuel_surcharge ||= OrderPriceDetailComponentKey.new('fuel_surcharge') end |
.insurance ⇒ Object
The insurance cost for the order.
17570 17571 17572 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17570 def OrderPriceDetailComponentKey.insurance @@_insurance ||= OrderPriceDetailComponentKey.new('insurance') end |
.item_discount ⇒ Object
The sum of all discounts applied to the order’s items.
17560 17561 17562 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17560 def OrderPriceDetailComponentKey.item_discount @@_item_discount ||= OrderPriceDetailComponentKey.new('item_discount') end |
.item_price ⇒ Object
The sum of the price of the order’s items with their currency margins, percent margins, and fixed margins included.
17555 17556 17557 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17555 def OrderPriceDetailComponentKey.item_price @@_item_price ||= OrderPriceDetailComponentKey.new('item_price') end |
.order_discount ⇒ Object
A discount applied to the entire order.
17580 17581 17582 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17580 def OrderPriceDetailComponentKey.order_discount @@_order_discount ||= OrderPriceDetailComponentKey.new('order_discount') end |
.remote_area_surcharge ⇒ Object
Surcharge applied to a shipment for delivery to a remote area determined by the carrier.
17618 17619 17620 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17618 def OrderPriceDetailComponentKey.remote_area_surcharge @@_remote_area_surcharge ||= OrderPriceDetailComponentKey.new('remote_area_surcharge') end |
.rounding ⇒ Object
The sum of any rounding applied to the order’s items.
17565 17566 17567 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17565 def OrderPriceDetailComponentKey.rounding @@_rounding ||= OrderPriceDetailComponentKey.new('rounding') end |
.shipping ⇒ Object
The shipping cost for the order.
17575 17576 17577 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17575 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.
17596 17597 17598 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17596 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.
17586 17587 17588 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17586 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.
17591 17592 17593 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17591 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.
17496 17497 17498 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17496 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.
17544 17545 17546 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17544 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.
17549 17550 17551 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17549 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.
17539 17540 17541 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17539 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.
17528 17529 17530 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17528 def OrderPriceDetailComponentKey.vat_freight @@_vat_freight ||= OrderPriceDetailComponentKey.new('vat_freight') end |
.vat_insurance ⇒ Object
The VAT owed on the insurance cost of the order.
17533 17534 17535 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17533 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.
17523 17524 17525 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17523 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.
17604 17605 17606 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17604 def OrderPriceDetailComponentKey.vat_subsidy @@_vat_subsidy ||= OrderPriceDetailComponentKey.new('vat_subsidy') end |
Instance Method Details
#to_hash ⇒ Object
17633 17634 17635 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17633 def to_hash value end |