Exception: Shoppe::Errors::NotEnoughStock

Inherits:
Shoppe::Error
  • Object
show all
Defined in:
lib/shoppe/errors/not_enough_stock.rb

Instance Method Summary collapse

Methods inherited from Shoppe::Error

#initialize, #message, #options

Constructor Details

This class inherits a constructor from Shoppe::Error

Instance Method Details

#available_stockObject


5
6
7
# File 'lib/shoppe/errors/not_enough_stock.rb', line 5

def available_stock
  @options[:ordered_item].stock
end

#requested_stockObject


9
10
11
# File 'lib/shoppe/errors/not_enough_stock.rb', line 9

def requested_stock
  @options[:requested_stock]
end