Class: ShopifyGraphql::CreateWebhooksJob
- Inherits:
-
ActiveJob::Base
- Object
- ActiveJob::Base
- ShopifyGraphql::CreateWebhooksJob
- Defined in:
- lib/shopify_graphql/jobs/create_webhooks_job.rb
Instance Method Summary collapse
Instance Method Details
#perform(shop_domain:, shop_token:) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/shopify_graphql/jobs/create_webhooks_job.rb', line 7 def perform(shop_domain:, shop_token:) webhooks = ShopifyGraphql.configuration.webhooks ShopifyAPI::Auth::Session.temp(shop: shop_domain, access_token: shop_token) do manager = WebhooksManager.new(webhooks) manager.create_webhooks end rescue UnauthorizedAccess, ResourceNotFound, ForbiddenAccess, PaymentRequired # Ignore end |