class Reji::PaymentMethod
Attributes
owner[R]
Get the Stripe model instance.
Public Class Methods
new(owner, payment_method)
click to toggle source
# File lib/reji/payment_method.rb, line 5 def initialize(owner, payment_method) if owner.stripe_id != payment_method.customer raise Reji::InvalidPaymentMethodError.invalid_owner(payment_method, owner) end @owner = owner @payment_method = payment_method end
Public Instance Methods
as_stripe_payment_method()
click to toggle source
Get the Stripe PaymentMethod
instance.
# File lib/reji/payment_method.rb, line 23 def as_stripe_payment_method @payment_method end
delete()
click to toggle source
Delete the payment method.
# File lib/reji/payment_method.rb, line 15 def delete @owner.remove_payment_method(@payment_method) end
method_missing(key)
click to toggle source
Dynamically get values from the Stripe PaymentMethod
.
# File lib/reji/payment_method.rb, line 28 def method_missing(key) @payment_method[key] end
respond_to_missing?(method_name, include_private = false)
click to toggle source
Calls superclass method
# File lib/reji/payment_method.rb, line 32 def respond_to_missing?(method_name, include_private = false) super end