Class: Spree::Tax::ItemTax

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
core/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 LineItem or a Shipment.)

Instance Attribute Summary collapse

Instance Attribute Details

#amountBigDecimal

the amount of tax applied to the item

Returns:

  • (BigDecimal)

    the current value of amount



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

def amount
  @amount
end

#included_in_priceBoolean

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

Returns:

  • (Boolean)

    the current value of included_in_price



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

def included_in_price
  @included_in_price
end

#item_idInteger

the LineItem or Shipment ID

Returns:

  • (Integer)

    the current value of item_id



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

def item_id
  @item_id
end

#labelString

information about the taxes

Returns:

  • (String)

    the current value of label



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

def label
  @label
end

#tax_rateSpree::TaxRate

will be used as the source for tax adjustments

Returns:



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

def tax_rate
  @tax_rate
end