Sha256: a4c39a75ab193cd6328fcdfe3b967bb44759d5a6b780e11eae72f06ef9cbe3a5

Contents?: true

Size: 545 Bytes

Versions: 11

Compression:

Stored size: 545 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 charge status as "cancelled" unless charges have been waived.
  # - Remove any stored sessions for the shop.
  #
  def perform(domain, shop_data)
    unless @shop.charge_waived?
      @shop.charge_cancelled!
    end

    @shop.sessions.delete_all
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
disco_app-0.7.0 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.7.1 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.7.2 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.8.0 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.8.1 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.8.2 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.8.3 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.8.4 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.8.5 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.8.6 app/jobs/disco_app/concerns/app_uninstalled_job.rb
disco_app-0.8.7 app/jobs/disco_app/concerns/app_uninstalled_job.rb