Sha256: 76766c6e7f2dc96cbad9cb8deebcd1f5c36f477af336bd5a2c6042c45e32add4
Contents?: true
Size: 560 Bytes
Versions: 14
Compression:
Stored size: 560 Bytes
Contents
class <%= @job_class_name %> < ActiveJob::Base extend ShopifyAPI::Webhooks::Handler class << self def handle(topic:, shop:, body:) perform_later(topic: topic, shop_domain: shop, webhook: body) end end def perform(topic:, shop_domain:, webhook:) shop = Shop.find_by(shopify_domain: shop_domain) if shop.nil? logger.error("#{self.class} failed: cannot find shop with domain '#{shop_domain}'") raise ActiveRecord::RecordNotFound, "Shop Not Found" end shop.with_shopify_session do |session| end end end
Version data entries
14 entries across 14 versions & 1 rubygems