Module: Tienda::OrderableItem

Defined in:
lib/tienda/orderable_item.rb

Overview

All items which can be ordered should include this module and ensure that all methods have been overridden. It’s a lazy-mans protocol.

Instance Method Summary collapse

Instance Method Details

#cost_priceObject



19
20
# File 'lib/tienda/orderable_item.rb', line 19

def cost_price
end

#full_nameObject

stock_level_adjustments must be an association



7
8
# File 'lib/tienda/orderable_item.rb', line 7

def full_name
end

#in_stock?Boolean

Returns:

  • (Boolean)


28
29
# File 'lib/tienda/orderable_item.rb', line 28

def in_stock?
end

#orderable?Boolean

Returns:

  • (Boolean)


10
11
# File 'lib/tienda/orderable_item.rb', line 10

def orderable?
end

#priceObject



16
17
# File 'lib/tienda/orderable_item.rb', line 16

def price
end

#skuObject



13
14
# File 'lib/tienda/orderable_item.rb', line 13

def sku
end

#stockObject



31
32
# File 'lib/tienda/orderable_item.rb', line 31

def stock
end

#stock_control?Boolean

Returns:

  • (Boolean)


25
26
# File 'lib/tienda/orderable_item.rb', line 25

def stock_control?
end

#tax_rateObject



22
23
# File 'lib/tienda/orderable_item.rb', line 22

def tax_rate
end

#weightObject



34
35
# File 'lib/tienda/orderable_item.rb', line 34

def weight
end