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.
-
.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_deminimis ⇒ Object
An adjustment based on whether the tax 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.
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.
6473 6474 6475 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6473 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
6471 6472 6473 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6471 def value @value end |
Class Method Details
.adjustment ⇒ Object
A general purpose adjustment applied to the order.
6498 6499 6500 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6498 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
6478 6479 6480 6481 6482 6483 6484 6485 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6478 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.
6519 6520 6521 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6519 def OrderPriceDetailComponentKey.duties_freight @@_duties_freight ||= OrderPriceDetailComponentKey.new('duties_freight') end |
.duties_insurance ⇒ Object
The duty owed on the insurance cost of the order.
6524 6525 6526 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6524 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.
6514 6515 6516 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6514 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.
6508 6509 6510 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6508 def OrderPriceDetailComponentKey.duty_deminimis @@_duty_deminimis ||= OrderPriceDetailComponentKey.new('duty_deminimis') end |
.from_string(value) ⇒ Object
Returns the instance of OrderPriceDetailComponentKey for this value, or nil if not found
6488 6489 6490 6491 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6488 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.
6572 6573 6574 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6572 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.
6562 6563 6564 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6562 def OrderPriceDetailComponentKey.item_price @@_item_price ||= OrderPriceDetailComponentKey.new('item_price') end |
.order_discount ⇒ Object
A discount applied to the entire order.
6582 6583 6584 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6582 def OrderPriceDetailComponentKey.order_discount @@_order_discount ||= OrderPriceDetailComponentKey.new('order_discount') end |
.rounding ⇒ Object
The sum of any rounding applied to the order’s items.
6567 6568 6569 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6567 def OrderPriceDetailComponentKey.rounding @@_rounding ||= OrderPriceDetailComponentKey.new('rounding') end |
.shipping ⇒ Object
The shipping cost for the order.
6577 6578 6579 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6577 def OrderPriceDetailComponentKey.shipping @@_shipping ||= OrderPriceDetailComponentKey.new('shipping') end |
.tax_deminimis ⇒ Object
An adjustment based on whether the tax de minimis applies to the order.
6503 6504 6505 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6503 def OrderPriceDetailComponentKey.tax_deminimis @@_tax_deminimis ||= OrderPriceDetailComponentKey.new('tax_deminimis') end |
.vat_duties_freight ⇒ Object
The VAT owed on the duties on the freight cost of the order.
6551 6552 6553 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6551 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.
6556 6557 6558 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6556 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.
6546 6547 6548 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6546 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.
6535 6536 6537 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6535 def OrderPriceDetailComponentKey.vat_freight @@_vat_freight ||= OrderPriceDetailComponentKey.new('vat_freight') end |
.vat_insurance ⇒ Object
The VAT owed on the insurance cost of the order.
6540 6541 6542 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6540 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.
6530 6531 6532 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6530 def OrderPriceDetailComponentKey.vat_item_price @@_vat_item_price ||= OrderPriceDetailComponentKey.new('vat_item_price') end |
Instance Method Details
#to_hash ⇒ Object
6586 6587 6588 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6586 def to_hash value end |