Class: DuodealerApp::WebhooksManagerJob

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

Instance Method Summary collapse

Instance Method Details

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



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

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