Class: Spree::Tax::OrderTax

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
app/models/spree/tax/order_tax.rb

Overview

Simple object to pass back tax data from a calculator.

Will be used by OrderTaxation to create or update tax adjustments on an order.

Instance Attribute Summary collapse

Instance Attribute Details

#line_item_taxesArray<Spree::Tax::ItemTax>

an array of tax data for order’s line items

Returns:



17
18
19
# File 'app/models/spree/tax/order_tax.rb', line 17

def line_item_taxes
  @line_item_taxes
end

#order_idInteger

the Order these taxes apply to

Returns:

  • (Integer)

    the current value of order_id



17
18
19
# File 'app/models/spree/tax/order_tax.rb', line 17

def order_id
  @order_id
end

#order_taxesArray<Spree::Tax::ItemTax>

an array of tax data for the order

Returns:



17
18
19
# File 'app/models/spree/tax/order_tax.rb', line 17

def order_taxes
  @order_taxes
end

#shipment_taxesArray<Spree::Tax::ItemTax>

an array of tax data for the order’s shipments

Returns:



17
18
19
# File 'app/models/spree/tax/order_tax.rb', line 17

def shipment_taxes
  @shipment_taxes
end