Exception: Reji::SubscriptionUpdateFailureError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/reji/errors.rb

Class Method Summary collapse

Class Method Details

.cannot_delete_last_plan(subscription) ⇒ Object



59
60
61
# File 'lib/reji/errors.rb', line 59

def self.cannot_delete_last_plan(subscription)
  self.new("The plan on subscription \"#{subscription.stripe_id}\" cannot be removed because it is the last one.")
end

.duplicate_plan(subscription, plan) ⇒ Object



55
56
57
# File 'lib/reji/errors.rb', line 55

def self.duplicate_plan(subscription, plan)
  self.new("The plan \"#{plan}\" is already attached to subscription \"#{subscription.stripe_id}\".")
end

.incomplete_subscription(subscription) ⇒ Object



51
52
53
# File 'lib/reji/errors.rb', line 51

def self.incomplete_subscription(subscription)
  self.new("The subscription \"#{subscription.stripe_id}\" cannot be updated because its payment is incomplete.")
end