Class: Spree::PaymentSource
- Inherits:
-
Object
- Object
- Spree::PaymentSource
- Includes:
- Metadata, Metafields, PaymentSourceConcern
- Defined in:
- app/models/spree/payment_source.rb
Instance Method Summary collapse
-
#gateway_customer ⇒ Spree::GatewayCustomer
Returns the gateway customer for the user.
Methods included from PaymentSourceConcern
#actions, #can_capture?, #can_credit?, #can_void?, #has_payment_profile?
Instance Method Details
#gateway_customer ⇒ Spree::GatewayCustomer
Returns the gateway customer for the user.
26 27 28 29 30 |
# File 'app/models/spree/payment_source.rb', line 26 def gateway_customer return if user.blank? payment_method.gateway_customers.find_by(user: user) end |