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.
-
.duties_taxes_paid_surcharge ⇒ Object
Surcharge applied per shipment for all shipment that are sent DDP.
-
.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.
-
.peak_surcharge ⇒ Object
Surcharge applied per package during peak times.
-
.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.
-
.shipping_discount ⇒ Object
A shipping discount applied to the entire 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.
23191 23192 23193 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23191 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
23189 23190 23191 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23189 def value @value end |
Class Method Details
.adjustment ⇒ Object
A general purpose adjustment applied to the order.
23216 23217 23218 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23216 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
23196 23197 23198 23199 23200 23201 23202 23203 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23196 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.
23237 23238 23239 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23237 def OrderPriceDetailComponentKey.duties_freight @@_duties_freight ||= OrderPriceDetailComponentKey.new('duties_freight') end |
.duties_insurance ⇒ Object
The duty owed on the insurance cost of the order.
23242 23243 23244 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23242 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.
23232 23233 23234 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23232 def OrderPriceDetailComponentKey.duties_item_price @@_duties_item_price ||= OrderPriceDetailComponentKey.new('duties_item_price') end |
.duties_taxes_paid_surcharge ⇒ Object
Surcharge applied per shipment for all shipment that are sent DDP
23369 23370 23371 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23369 def OrderPriceDetailComponentKey.duties_taxes_paid_surcharge @@_duties_taxes_paid_surcharge ||= OrderPriceDetailComponentKey.new('duties_taxes_paid_surcharge') end |
.duty_deminimis ⇒ Object
An adjustment based on whether the duty de minimis applies to the order.
23226 23227 23228 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23226 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.
23342 23343 23344 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23342 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.
23359 23360 23361 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23359 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
23206 23207 23208 23209 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23206 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.
23353 23354 23355 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23353 def OrderPriceDetailComponentKey.fuel_surcharge @@_fuel_surcharge ||= OrderPriceDetailComponentKey.new('fuel_surcharge') end |
.insurance ⇒ Object
The insurance cost for the order.
23295 23296 23297 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23295 def OrderPriceDetailComponentKey.insurance @@_insurance ||= OrderPriceDetailComponentKey.new('insurance') end |
.item_discount ⇒ Object
The sum of all discounts applied to the order’s items.
23285 23286 23287 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23285 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.
23280 23281 23282 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23280 def OrderPriceDetailComponentKey.item_price @@_item_price ||= OrderPriceDetailComponentKey.new('item_price') end |
.order_discount ⇒ Object
A discount applied to the entire order.
23310 23311 23312 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23310 def OrderPriceDetailComponentKey.order_discount @@_order_discount ||= OrderPriceDetailComponentKey.new('order_discount') end |
.peak_surcharge ⇒ Object
Surcharge applied per package during peak times.
23364 23365 23366 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23364 def OrderPriceDetailComponentKey.peak_surcharge @@_peak_surcharge ||= OrderPriceDetailComponentKey.new('peak_surcharge') end |
.remote_area_surcharge ⇒ Object
Surcharge applied to a shipment for delivery to a remote area determined by the carrier.
23348 23349 23350 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23348 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.
23290 23291 23292 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23290 def OrderPriceDetailComponentKey.rounding @@_rounding ||= OrderPriceDetailComponentKey.new('rounding') end |
.shipping ⇒ Object
The shipping cost for the order.
23300 23301 23302 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23300 def OrderPriceDetailComponentKey.shipping @@_shipping ||= OrderPriceDetailComponentKey.new('shipping') end |
.shipping_discount ⇒ Object
A shipping discount applied to the entire order.
23305 23306 23307 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23305 def OrderPriceDetailComponentKey.shipping_discount @@_shipping_discount ||= OrderPriceDetailComponentKey.new('shipping_discount') end |
.subtotal_duty_percent_sales_margin ⇒ Object
The sum of adjustments to duty owed made due to percentage sales margins.
23326 23327 23328 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23326 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.
23316 23317 23318 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23316 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.
23321 23322 23323 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23321 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.
23221 23222 23223 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23221 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.
23269 23270 23271 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23269 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.
23274 23275 23276 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23274 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.
23264 23265 23266 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23264 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.
23253 23254 23255 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23253 def OrderPriceDetailComponentKey.vat_freight @@_vat_freight ||= OrderPriceDetailComponentKey.new('vat_freight') end |
.vat_insurance ⇒ Object
The VAT owed on the insurance cost of the order.
23258 23259 23260 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23258 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.
23248 23249 23250 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23248 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.
23334 23335 23336 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23334 def OrderPriceDetailComponentKey.vat_subsidy @@_vat_subsidy ||= OrderPriceDetailComponentKey.new('vat_subsidy') end |
Instance Method Details
#to_hash ⇒ Object
23373 23374 23375 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23373 def to_hash value end |