Module: Spree::UserPaymentSource

Extended by:
ActiveSupport::Concern
Included in:
UserMethods
Defined in:
core/app/models/concerns/spree/user_payment_source.rb

Instance Method Summary collapse

Instance Method Details

#default_credit_cardObject



7
8
9
10
11
12
13
14
15
16
# File 'core/app/models/concerns/spree/user_payment_source.rb', line 7

def default_credit_card
  Spree::Deprecation.warn(
    "user.default_credit_card is deprecated. Please use user.wallet.default_wallet_payment_source instead.",
    caller
  )
  default = wallet.default_wallet_payment_source
  if default && default.payment_source.is_a?(Spree::CreditCard)
    default.payment_source
  end
end

#payment_sourcesObject



18
19
20
21
22
23
24
# File 'core/app/models/concerns/spree/user_payment_source.rb', line 18

def payment_sources
  Spree::Deprecation.warn(
    "user.payment_sources is deprecated. Please use user.wallet.wallet_payment_sources instead.",
    caller
  )
  credit_cards.with_payment_profile
end