Sha256: 3db7553d9b6f4df7351834a63816cbacdd389c6fa82266e48eef0037d070c3d3
Contents?: true
Size: 509 Bytes
Versions: 15
Compression:
Stored size: 509 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) self.where(order_id: order.id, stock_location_id: stock_location.id).each(&:fulfill_shipment!) end def fulfill_shipment! self.update_attributes!(shipment_fulfilled: true) end end end
Version data entries
15 entries across 15 versions & 1 rubygems