Class: Spree::OrderStockLocation Private

Inherits:
Base
  • Object
show all
Defined in:
app/models/spree/order_stock_location.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from Base

display_includes, #initialize_preference_defaults, page, preference

Methods included from Preferences::Preferable

#default_preferences, #defined_preferences, #get_preference, #has_preference!, #has_preference?, #preference_default, #preference_type, #set_preference

Class Method Details

+ (Object) fulfill_for_order_with_stock_location(order, stock_location)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



7
8
9
# File 'app/models/spree/order_stock_location.rb', line 7

def self.fulfill_for_order_with_stock_location(order, stock_location)
  where(order_id: order.id, stock_location_id: stock_location.id).each(&:fulfill_shipment!)
end

Instance Method Details

- (Object) fulfill_shipment!

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



11
12
13
# File 'app/models/spree/order_stock_location.rb', line 11

def fulfill_shipment!
  update_attributes!(shipment_fulfilled: true)
end