Class: SpreePluggto::UpdateStockJob

Inherits:
ActiveJob::Base
  • Object
show all
Defined in:
app/jobs/spree_pluggto/update_stock_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(variant_id) ⇒ Object



3
4
5
6
# File 'app/jobs/spree_pluggto/update_stock_job.rb', line 3

def perform(variant_id)
  variant = ::Spree::Variant.find(variant_id)
  ::SpreePluggto::Api::Stock.update(variant)
end