class Io::Flow::V0::Models::OrderPriceDetailKey
Attributes
value[R]
Public Class Methods
ALL()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 23403 def OrderPriceDetailKey.ALL @@all ||= [OrderPriceDetailKey.adjustment, OrderPriceDetailKey.subtotal, OrderPriceDetailKey.vat, OrderPriceDetailKey.duty, OrderPriceDetailKey.shipping, OrderPriceDetailKey.insurance, OrderPriceDetailKey.discount, OrderPriceDetailKey.surcharges] end
adjustment()
click to toggle source
The details of any adjustments made to the order.
# File lib/flow_commerce/flow_api_v0_client.rb, line 23408 def OrderPriceDetailKey.adjustment @@_adjustment ||= OrderPriceDetailKey.new('adjustment') end
apply(value)
click to toggle source
Returns the instance of OrderPriceDetailKey
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 23388 def OrderPriceDetailKey.apply(value) if value.instance_of?(OrderPriceDetailKey) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || OrderPriceDetailKey.new(value)) end end
discount()
click to toggle source
The details of any discount applied to the order.
# File lib/flow_commerce/flow_api_v0_client.rb, line 23439 def OrderPriceDetailKey.discount @@_discount ||= OrderPriceDetailKey.new('discount') end
duty()
click to toggle source
The details of any duties owed on the order.
# File lib/flow_commerce/flow_api_v0_client.rb, line 23424 def OrderPriceDetailKey.duty @@_duty ||= OrderPriceDetailKey.new('duty') end
from_string(value)
click to toggle source
Returns the instance of OrderPriceDetailKey
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 23398 def OrderPriceDetailKey.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) OrderPriceDetailKey.ALL.find { |v| v.value == value } end
insurance()
click to toggle source
The details of insurance costs for the order.
# File lib/flow_commerce/flow_api_v0_client.rb, line 23434 def OrderPriceDetailKey.insurance @@_insurance ||= OrderPriceDetailKey.new('insurance') end
new(value)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 23383 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end
shipping()
click to toggle source
The details of shipping costs for the order.
# File lib/flow_commerce/flow_api_v0_client.rb, line 23429 def OrderPriceDetailKey.shipping @@_shipping ||= OrderPriceDetailKey.new('shipping') end
subtotal()
click to toggle source
The details of the subtotal for the order, including item prices, margins, and rounding.
# File lib/flow_commerce/flow_api_v0_client.rb, line 23414 def OrderPriceDetailKey.subtotal @@_subtotal ||= OrderPriceDetailKey.new('subtotal') end
surcharges()
click to toggle source
Additional fees and levies applied to the order
# File lib/flow_commerce/flow_api_v0_client.rb, line 23444 def OrderPriceDetailKey.surcharges @@_surcharges ||= OrderPriceDetailKey.new('surcharges') end
vat()
click to toggle source
The details of any VAT owed on the order.
# File lib/flow_commerce/flow_api_v0_client.rb, line 23419 def OrderPriceDetailKey.vat @@_vat ||= OrderPriceDetailKey.new('vat') end
Public Instance Methods
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 23448 def to_hash value end