Class: Solon::BasketItem

Inherits:
Object
  • Object
show all
Defined in:
lib/solon/basket_item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



3
4
5
# File 'lib/solon/basket_item.rb', line 3

def description
  @description
end

#quantityObject

Returns the value of attribute quantity.



3
4
5
# File 'lib/solon/basket_item.rb', line 3

def quantity
  @quantity
end

#tax_appliedObject

Returns the value of attribute tax_applied.



3
4
5
# File 'lib/solon/basket_item.rb', line 3

def tax_applied
  @tax_applied
end

#total_cost_with_taxObject

Returns the value of attribute total_cost_with_tax.



3
4
5
# File 'lib/solon/basket_item.rb', line 3

def total_cost_with_tax
  @total_cost_with_tax
end

#unit_cost_with_taxObject

Returns the value of attribute unit_cost_with_tax.



3
4
5
# File 'lib/solon/basket_item.rb', line 3

def unit_cost_with_tax
  @unit_cost_with_tax
end

#unit_cost_without_taxObject

Returns the value of attribute unit_cost_without_tax.



3
4
5
# File 'lib/solon/basket_item.rb', line 3

def unit_cost_without_tax
  @unit_cost_without_tax
end

Instance Method Details

#to_post_dataObject Also known as: to_s



5
6
7
# File 'lib/solon/basket_item.rb', line 5

def to_post_data
  "#{description}:#{quantity}:#{unit_cost_with_tax}:#{tax_applied}:#{unit_cost_with_tax}:#{total_cost_with_tax}"
end