Sha256: 1acb20d042beee123921ed9891c6b03dfd0d2b78e127aafa91c9616b184e4222

Contents?: true

Size: 574 Bytes

Versions: 7

Compression:

Stored size: 574 Bytes

Contents

module DiscoApp::Concerns::AppUninstalledJob
  extend ActiveSupport::Concern

  included do
    before_enqueue { @shop.awaiting_uninstall! }
    before_perform { @shop.uninstalling! }
    after_perform { @shop.uninstalled! }
  end

  # Perform application uninstallation.
  #
  # - Mark any recurring application charges as cancelled.
  # - Remove any stored sessions for the shop.
  #
  def perform(shop, shop_data)
    DiscoApp::ChargesService.cancel_recurring_charges(@shop)
    DiscoApp::SendSubscriptionJob.perform_later(@shop)
    @shop.sessions.delete_all
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
disco_app-0.12.5 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.12.6 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.12.7 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.13.0 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.13.1 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.13.2 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.12.7.pre.puma.pre.3 app/jobs/disco_app/concerns/app_uninstalled_job.rb