Skip to Content Skip to Search
Methods
R

Constants

LOST_STATUSES = %w[churned void uncollectible].freeze
 
RECOVERING_STATUSES = %w[in_recovery].freeze
 
SAVED_STATUSES = %w[ recovered_email recovered_website recovered_abandoned_signup recovered_trial_extension recovered_coupon recovered_support ].freeze
 
STATUSES = (SAVED_STATUSES + RECOVERING_STATUSES + LOST_STATUSES + UNTRACKED_STATUSES).freeze
 

These were found in specs, and appear to be intentionally excluded from the failed payments dashboard

UNTRACKED_STATUSES = %w[recovered_externally recovering].freeze
 

Class Public methods

recovery_amount(charge_amount, plan_amount)

# File app/models/db/failed_payment.rb, line 50
def self.recovery_amount(charge_amount, plan_amount)
  charge_amount.zero? ? plan_amount : charge_amount
end

Instance Public methods

recovered?()

# File app/models/db/failed_payment.rb, line 54
def recovered?
  status.include?("recovered")
end