Class: SpreePluggto::UpsertProductJob
- Inherits:
-
ActiveJob::Base
- Object
- ActiveJob::Base
- SpreePluggto::UpsertProductJob
- Defined in:
- app/jobs/spree_pluggto/upsert_product_job.rb
Instance Method Summary collapse
-
#perform(product_id) ⇒ Object
UPSERT => Updates the record if it exists, inserts if it is new.
Instance Method Details
#perform(product_id) ⇒ Object
UPSERT => Updates the record if it exists, inserts if it is new
4 5 6 7 |
# File 'app/jobs/spree_pluggto/upsert_product_job.rb', line 4 def perform(product_id) product = ::Spree::Product.find(product_id) ::SpreePluggto::Api::Product.upsert(product) end |