Class: RawgentoModels::OrderItem
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- RawgentoModels::OrderItem
- Defined in:
- lib/rawgento_models/order_item.rb
Instance Method Summary collapse
Instance Method Details
#all_ordered? ⇒ Boolean
16 17 18 |
# File 'lib/rawgento_models/order_item.rb', line 16 def all_ordered? num_wished == num_ordered end |
#out_of_stock? ⇒ Boolean
20 21 22 |
# File 'lib/rawgento_models/order_item.rb', line 20 def out_of_stock? num_ordered == 0 end |
#remote_product_id ⇒ Object
12 13 14 |
# File 'lib/rawgento_models/order_item.rb', line 12 def remote_product_id local_product.remote_product.try(:product_id) end |