lib/paid_up/subscription.rb in paid_up-0.13.10 vs lib/paid_up/subscription.rb in paid_up-0.13.11
- old
+ new
@@ -24,9 +24,10 @@
PaidUp::Plan.free
end
end
def update(plan, stripe_token = nil, coupon = nil, trial_end = nil)
+ return if stripe_data.nil?
update_stripe_token(stripe_token)
update_coupon(coupon)
update_trial_end(trial_end)
update_plan(plan)
stripe_data.save || raise(:could_not_update_plan.l)