Class: ShopifyApp::WebhooksManagerJob

Inherits:
ActiveJob::Base
  • Object
show all
Defined in:
lib/shopify_app/jobs/webhooks_manager_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(shop_domain:, shop_token:, webhooks:) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/shopify_app/jobs/webhooks_manager_job.rb', line 8

def perform(shop_domain:, shop_token:, webhooks:)
  api_version = ShopifyApp.configuration.api_version
  ShopifyAPI::Session.temp(domain: shop_domain, token: shop_token, api_version: api_version) do
    manager = WebhooksManager.new(webhooks)
    manager.create_webhooks
  end
end