Module: Spree::UserPaymentSource

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

Instance Method Summary (collapse)

Instance Method Details

- (Object) default_credit_card



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

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

- (Object) payment_sources



16
17
18
19
20
21
22
# File 'app/models/concerns/spree/user_payment_source.rb', line 16

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