module Reji::InteractsWithPaymentBehavior
Public Instance Methods
allow_payment_failures()
click to toggle source
Allow subscription changes even if payment fails.
# File lib/reji/concerns/interacts_with_payment_behavior.rb, line 8 def allow_payment_failures @payment_behavior = 'allow_incomplete' self end
error_if_payment_fails()
click to toggle source
Prevent any subscription change if payment is unsuccessful.
# File lib/reji/concerns/interacts_with_payment_behavior.rb, line 22 def error_if_payment_fails @payment_behavior = 'error_if_incomplete' self end
payment_behavior()
click to toggle source
Determine the payment behavior when updating the subscription.
# File lib/reji/concerns/interacts_with_payment_behavior.rb, line 29 def payment_behavior @payment_behavior ||= 'allow_incomplete' end
pending_if_payment_fails()
click to toggle source
Set any subscription change as pending until payment is successful.
# File lib/reji/concerns/interacts_with_payment_behavior.rb, line 15 def pending_if_payment_fails @payment_behavior = 'pending_if_incomplete' self end