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?
Methods included from Metadata
#metadata, #metadata=, #public_metadata=
Instance Method Details
#gateway_customer ⇒ Spree::GatewayCustomer
Returns the gateway customer for the user.
28 29 30 31 32 |
# File 'app/models/spree/payment_source.rb', line 28 def gateway_customer return if user.blank? payment_method.gateway_customers.find_by(user: user) end |