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.



7448
7449
7450
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7448

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



7446
7447
7448
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7446

def value
  @value
end

Class Method Details

.adjustmentObject

A general purpose adjustment applied to the order.



7473
7474
7475
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7473

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

.apply(value) ⇒ Object

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



7453
7454
7455
7456
7457
7458
7459
7460
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7453

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.



7494
7495
7496
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7494

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

.duties_insuranceObject

The duty owed on the insurance cost of the order.



7499
7500
7501
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7499

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

.duties_item_priceObject

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



7489
7490
7491
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7489

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

.duty_deminimisObject

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



7483
7484
7485
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7483

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



7463
7464
7465
7466
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7463

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

.insuranceObject

The insurance cost for the order.



7547
7548
7549
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7547

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

.item_priceObject

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



7537
7538
7539
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7537

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

.order_discountObject

A discount applied to the entire order.



7557
7558
7559
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7557

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

.roundingObject

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



7542
7543
7544
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7542

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

.shippingObject

The shipping cost for the order.



7552
7553
7554
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7552

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

.vat_deminimisObject

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



7478
7479
7480
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7478

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.



7526
7527
7528
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7526

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.



7531
7532
7533
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7531

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.



7521
7522
7523
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7521

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.



7510
7511
7512
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7510

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

.vat_insuranceObject

The VAT owed on the insurance cost of the order.



7515
7516
7517
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7515

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.



7505
7506
7507
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7505

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

Instance Method Details

#to_hashObject



7561
7562
7563
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7561

def to_hash
  value
end