Class: Gold::AppUninstalledJob

Inherits:
ApplicationJob show all
Defined in:
app/jobs/gold/app_uninstalled_job.rb

Overview

Uninstalls the app for the merchant.

Instance Method Summary collapse

Instance Method Details

#perform(shop_domain:, webhook: nil) ⇒ Object

rubocop:disable Lint/UnusedMethodArgument



4
5
6
7
8
# File 'app/jobs/gold/app_uninstalled_job.rb', line 4

def perform(shop_domain:, webhook: nil) # rubocop:disable Lint/UnusedMethodArgument
  shop = Gold.shop_class.find_by!(Gold.shop_domain_attribute => shop_domain)
  billing = Gold::Billing.find_by!(shop: shop)
  UninstallOp.new(billing).call
end