Class: Spree::Tax::ItemTax

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

Overview

Simple object used to hold tax data for an item.

This generic object will hold the amount of tax that should be applied to an item. (Either a Order, a LineItem or a Shipment.)

Instance Attribute Summary collapse

Instance Attribute Details

#amountBigDecimal

the amount of tax applied to the item



18
19
20
# File 'app/models/spree/tax/item_tax.rb', line 18

def amount
  @amount
end

#included_in_priceBoolean

whether the amount is included in the items price, or additional tax.



18
19
20
# File 'app/models/spree/tax/item_tax.rb', line 18

def included_in_price
  @included_in_price
end

#item_idInteger

the LineItem or Shipment ID. Or blank if an order-level tax.



18
19
20
# File 'app/models/spree/tax/item_tax.rb', line 18

def item_id
  @item_id
end

#labelString

information about the taxes



18
19
20
# File 'app/models/spree/tax/item_tax.rb', line 18

def label
  @label
end

#tax_rateSpree::TaxRate

will be used as the source for tax adjustments



18
19
20
# File 'app/models/spree/tax/item_tax.rb', line 18

def tax_rate
  @tax_rate
end