Sha256: e42b3e78846cecd655aa94fd8079e6e16fec52254d2f6f194463ada88ae585c3
Contents?: true
Size: 500 Bytes
Versions: 37
Compression:
Stored size: 500 Bytes
Contents
module Spree class OrderStockLocation < Spree::Base belongs_to :variant, class_name: "Spree::Variant" belongs_to :stock_location, class_name: "Spree::StockLocation" belongs_to :order, class_name: "Spree::Order" 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 def fulfill_shipment! update_attributes!(shipment_fulfilled: true) end end end
Version data entries
37 entries across 37 versions & 1 rubygems