Class: ShopifyClient::CreateAllWebhooks
- Inherits:
-
Object
- Object
- ShopifyClient::CreateAllWebhooks
- Defined in:
- lib/shopify-client/create_all_webhooks.rb
Instance Method Summary collapse
-
#call(client) ⇒ Array<Hash>
Create all registered webhooks for a shop.
Instance Method Details
#call(client) ⇒ Array<Hash>
Create all registered webhooks for a shop.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/shopify-client/create_all_webhooks.rb', line 10 def call(client) create_webhook = CreateWebhook.new ShopifyClient.webhooks.map do |topic| Thread.new do create_webhook.(client, { topic: topic, fields: topic[:fields], }) end end.map(&:value) end |