Sha256: ae7af934445af55342d73371bc463632d4791b0e0680a8e5ea40586446a72943

Contents?: true

Size: 519 Bytes

Versions: 11

Compression:

Stored size: 519 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)
    @shop.sessions.delete_all
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
disco_app-0.9.11 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.10.0 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.10.1 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.10.2 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.10.3 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.10.4 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.10.5 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.11.0 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.11.1 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.12.0 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.12.1 app/jobs/disco_app/concerns/app_uninstalled_job.rb