Class: Io::Flow::V0::Models::OrderPriceDetailComponentKey

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ OrderPriceDetailComponentKey

Returns a new instance of OrderPriceDetailComponentKey.



20387
20388
20389
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20387

def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



20385
20386
20387
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20385

def value
  @value
end

Class Method Details

.adjustmentObject

A general purpose adjustment applied to the order.



20412
20413
20414
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20412

def OrderPriceDetailComponentKey.adjustment
  @@_adjustment ||= OrderPriceDetailComponentKey.new('adjustment')
end

.ALLObject



20407
20408
20409
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20407

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.shipping_discount, 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, OrderPriceDetailComponentKey.peak_surcharge, OrderPriceDetailComponentKey.duties_taxes_paid_surcharge]
end

.apply(value) ⇒ Object

Returns the instance of OrderPriceDetailComponentKey for this value, creating a new instance for an unknown value



20392
20393
20394
20395
20396
20397
20398
20399
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20392

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_freightObject

The duty owed on the freight cost of the order.



20433
20434
20435
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20433

def OrderPriceDetailComponentKey.duties_freight
  @@_duties_freight ||= OrderPriceDetailComponentKey.new('duties_freight')
end

.duties_insuranceObject

The duty owed on the insurance cost of the order.



20438
20439
20440
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20438

def OrderPriceDetailComponentKey.duties_insurance
  @@_duties_insurance ||= OrderPriceDetailComponentKey.new('duties_insurance')
end

.duties_item_priceObject

The duty owed on the price of the order’s items, including any added margins and rounding.



20428
20429
20430
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20428

def OrderPriceDetailComponentKey.duties_item_price
  @@_duties_item_price ||= OrderPriceDetailComponentKey.new('duties_item_price')
end

.duties_taxes_paid_surchargeObject

Surcharge applied per shipment for all shipment that are sent DDP



20565
20566
20567
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20565

def OrderPriceDetailComponentKey.duties_taxes_paid_surcharge
  @@_duties_taxes_paid_surcharge ||= OrderPriceDetailComponentKey.new('duties_taxes_paid_surcharge')
end

.duty_deminimisObject

An adjustment based on whether the duty de minimis applies to the order.



20422
20423
20424
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20422

def OrderPriceDetailComponentKey.duty_deminimis
  @@_duty_deminimis ||= OrderPriceDetailComponentKey.new('duty_deminimis')
end

.duty_subsidyObject

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.



20538
20539
20540
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20538

def OrderPriceDetailComponentKey.duty_subsidy
  @@_duty_subsidy ||= OrderPriceDetailComponentKey.new('duty_subsidy')
end

.emergency_situation_surchargeObject

Surcharge applied to a shipment during emergency circumstances, such as covid19.



20555
20556
20557
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20555

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



20402
20403
20404
20405
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20402

def OrderPriceDetailComponentKey.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  OrderPriceDetailComponentKey.ALL.find { |v| v.value == value }
end

.fuel_surchargeObject

Surcharge applied to a shipment for fuel consumption by the carrier.



20549
20550
20551
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20549

def OrderPriceDetailComponentKey.fuel_surcharge
  @@_fuel_surcharge ||= OrderPriceDetailComponentKey.new('fuel_surcharge')
end

.insuranceObject

The insurance cost for the order.



20491
20492
20493
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20491

def OrderPriceDetailComponentKey.insurance
  @@_insurance ||= OrderPriceDetailComponentKey.new('insurance')
end

.item_discountObject

The sum of all discounts applied to the order’s items.



20481
20482
20483
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20481

def OrderPriceDetailComponentKey.item_discount
  @@_item_discount ||= OrderPriceDetailComponentKey.new('item_discount')
end

.item_priceObject

The sum of the price of the order’s items with their currency margins, percent margins, and fixed margins included.



20476
20477
20478
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20476

def OrderPriceDetailComponentKey.item_price
  @@_item_price ||= OrderPriceDetailComponentKey.new('item_price')
end

.order_discountObject

A discount applied to the entire order.



20506
20507
20508
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20506

def OrderPriceDetailComponentKey.order_discount
  @@_order_discount ||= OrderPriceDetailComponentKey.new('order_discount')
end

.peak_surchargeObject

Surcharge applied per package during peak times.



20560
20561
20562
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20560

def OrderPriceDetailComponentKey.peak_surcharge
  @@_peak_surcharge ||= OrderPriceDetailComponentKey.new('peak_surcharge')
end

.remote_area_surchargeObject

Surcharge applied to a shipment for delivery to a remote area determined by the carrier.



20544
20545
20546
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20544

def OrderPriceDetailComponentKey.remote_area_surcharge
  @@_remote_area_surcharge ||= OrderPriceDetailComponentKey.new('remote_area_surcharge')
end

.roundingObject

The sum of any rounding applied to the order’s items.



20486
20487
20488
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20486

def OrderPriceDetailComponentKey.rounding
  @@_rounding ||= OrderPriceDetailComponentKey.new('rounding')
end

.shippingObject

The shipping cost for the order.



20496
20497
20498
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20496

def OrderPriceDetailComponentKey.shipping
  @@_shipping ||= OrderPriceDetailComponentKey.new('shipping')
end

.shipping_discountObject

A shipping discount applied to the entire order.



20501
20502
20503
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20501

def OrderPriceDetailComponentKey.shipping_discount
  @@_shipping_discount ||= OrderPriceDetailComponentKey.new('shipping_discount')
end

.subtotal_duty_percent_sales_marginObject

The sum of adjustments to duty owed made due to percentage sales margins.



20522
20523
20524
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20522

def OrderPriceDetailComponentKey.subtotal_duty_percent_sales_margin
  @@_subtotal_duty_percent_sales_margin ||= OrderPriceDetailComponentKey.new('subtotal_duty_percent_sales_margin')
end

.subtotal_percent_sales_marginObject

The sum of adjustments to item price, margin and rounding made due to percentage sales margins.



20512
20513
20514
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20512

def OrderPriceDetailComponentKey.subtotal_percent_sales_margin
  @@_subtotal_percent_sales_margin ||= OrderPriceDetailComponentKey.new('subtotal_percent_sales_margin')
end

.subtotal_vat_percent_sales_marginObject

The sum of adjustments to VAT owed made due to percentage sales margins.



20517
20518
20519
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20517

def OrderPriceDetailComponentKey.subtotal_vat_percent_sales_margin
  @@_subtotal_vat_percent_sales_margin ||= OrderPriceDetailComponentKey.new('subtotal_vat_percent_sales_margin')
end

.vat_deminimisObject

An adjustment based on whether the VAT de minimis applies to the order.



20417
20418
20419
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20417

def OrderPriceDetailComponentKey.vat_deminimis
  @@_vat_deminimis ||= OrderPriceDetailComponentKey.new('vat_deminimis')
end

.vat_duties_freightObject

The VAT owed on the duties on the freight cost of the order.



20465
20466
20467
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20465

def OrderPriceDetailComponentKey.vat_duties_freight
  @@_vat_duties_freight ||= OrderPriceDetailComponentKey.new('vat_duties_freight')
end

.vat_duties_insuranceObject

The VAT owed on the duties on the insurance cost of the order.



20470
20471
20472
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20470

def OrderPriceDetailComponentKey.vat_duties_insurance
  @@_vat_duties_insurance ||= OrderPriceDetailComponentKey.new('vat_duties_insurance')
end

.vat_duties_item_priceObject

The VAT owed on the duties on the price of the order’s items, including any added margins and rounding.



20460
20461
20462
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20460

def OrderPriceDetailComponentKey.vat_duties_item_price
  @@_vat_duties_item_price ||= OrderPriceDetailComponentKey.new('vat_duties_item_price')
end

.vat_freightObject

The VAT owed on the freight cost of the order.



20449
20450
20451
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20449

def OrderPriceDetailComponentKey.vat_freight
  @@_vat_freight ||= OrderPriceDetailComponentKey.new('vat_freight')
end

.vat_insuranceObject

The VAT owed on the insurance cost of the order.



20454
20455
20456
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20454

def OrderPriceDetailComponentKey.vat_insurance
  @@_vat_insurance ||= OrderPriceDetailComponentKey.new('vat_insurance')
end

.vat_item_priceObject

The VAT owed on the price of the order’s items, including any added margins and rounding.



20444
20445
20446
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20444

def OrderPriceDetailComponentKey.vat_item_price
  @@_vat_item_price ||= OrderPriceDetailComponentKey.new('vat_item_price')
end

.vat_subsidyObject

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.



20530
20531
20532
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20530

def OrderPriceDetailComponentKey.vat_subsidy
  @@_vat_subsidy ||= OrderPriceDetailComponentKey.new('vat_subsidy')
end

Instance Method Details

#to_hashObject



20569
20570
20571
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20569

def to_hash
  value
end