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_deminimus ⇒ Object
An adjustment based on whether the duty deminimus applies to the order.
-
.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.
-
.tax_deminimus ⇒ Object
An adjustment based on whether the tax deminimus 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.
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.
5520 5521 5522 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5520 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
5518 5519 5520 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5518 def value @value end |
Class Method Details
.adjustment ⇒ Object
A general purpose adjustment applied to the order.
5545 5546 5547 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5545 def OrderPriceDetailComponentKey.adjustment @@_adjustment ||= OrderPriceDetailComponentKey.new('adjustment') end |
.ALL ⇒ Object
5540 5541 5542 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5540 def OrderPriceDetailComponentKey.ALL @@all ||= [OrderPriceDetailComponentKey.adjustment, OrderPriceDetailComponentKey.tax_deminimus, OrderPriceDetailComponentKey.duty_deminimus, 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.rounding, OrderPriceDetailComponentKey.insurance, OrderPriceDetailComponentKey.shipping, OrderPriceDetailComponentKey.order_discount] end |
.apply(value) ⇒ Object
Returns the instance of OrderPriceDetailComponentKey for this value, creating a new instance for an unknown value
5525 5526 5527 5528 5529 5530 5531 5532 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5525 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.
5566 5567 5568 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5566 def OrderPriceDetailComponentKey.duties_freight @@_duties_freight ||= OrderPriceDetailComponentKey.new('duties_freight') end |
.duties_insurance ⇒ Object
The duty owed on the insurance cost of the order.
5571 5572 5573 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5571 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.
5561 5562 5563 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5561 def OrderPriceDetailComponentKey.duties_item_price @@_duties_item_price ||= OrderPriceDetailComponentKey.new('duties_item_price') end |
.duty_deminimus ⇒ Object
An adjustment based on whether the duty deminimus applies to the order.
5555 5556 5557 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5555 def OrderPriceDetailComponentKey.duty_deminimus @@_duty_deminimus ||= OrderPriceDetailComponentKey.new('duty_deminimus') end |
.from_string(value) ⇒ Object
Returns the instance of OrderPriceDetailComponentKey for this value, or nil if not found
5535 5536 5537 5538 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5535 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.
5619 5620 5621 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5619 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.
5609 5610 5611 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5609 def OrderPriceDetailComponentKey.item_price @@_item_price ||= OrderPriceDetailComponentKey.new('item_price') end |
.order_discount ⇒ Object
A discount applied to the entire order.
5629 5630 5631 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5629 def OrderPriceDetailComponentKey.order_discount @@_order_discount ||= OrderPriceDetailComponentKey.new('order_discount') end |
.rounding ⇒ Object
The sum of any rounding applied to the order’s items.
5614 5615 5616 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5614 def OrderPriceDetailComponentKey.rounding @@_rounding ||= OrderPriceDetailComponentKey.new('rounding') end |
.shipping ⇒ Object
The shipping cost for the order.
5624 5625 5626 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5624 def OrderPriceDetailComponentKey.shipping @@_shipping ||= OrderPriceDetailComponentKey.new('shipping') end |
.tax_deminimus ⇒ Object
An adjustment based on whether the tax deminimus applies to the order.
5550 5551 5552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5550 def OrderPriceDetailComponentKey.tax_deminimus @@_tax_deminimus ||= OrderPriceDetailComponentKey.new('tax_deminimus') end |
.vat_duties_freight ⇒ Object
The VAT owed on the duties on the freight cost of the order.
5598 5599 5600 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5598 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.
5603 5604 5605 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5603 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.
5593 5594 5595 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5593 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.
5582 5583 5584 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5582 def OrderPriceDetailComponentKey.vat_freight @@_vat_freight ||= OrderPriceDetailComponentKey.new('vat_freight') end |
.vat_insurance ⇒ Object
The VAT owed on the insurance cost of the order.
5587 5588 5589 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5587 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.
5577 5578 5579 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5577 def OrderPriceDetailComponentKey.vat_item_price @@_vat_item_price ||= OrderPriceDetailComponentKey.new('vat_item_price') end |
Instance Method Details
#to_hash ⇒ Object
5633 5634 5635 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5633 def to_hash value end |