From 3fb1df9bb390f231335765ec454d03e75ae50a02 Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Sun, 26 Jan 2020 18:49:16 +0000 Subject: [PATCH] Rename CardCloner to CreditCardCloner because it's dependent on Spree:CreditCard attributes --- app/models/spree/gateway/stripe_sca.rb | 2 +- lib/stripe/{card_cloner.rb => credit_card_cloner.rb} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename lib/stripe/{card_cloner.rb => credit_card_cloner.rb} (98%) diff --git a/app/models/spree/gateway/stripe_sca.rb b/app/models/spree/gateway/stripe_sca.rb index 0cafe4b6d6..e0849d2dbb 100644 --- a/app/models/spree/gateway/stripe_sca.rb +++ b/app/models/spree/gateway/stripe_sca.rb @@ -70,7 +70,7 @@ module Spree options[:currency] = gateway_options[:currency] options[:stripe_account] = stripe_account_id - Stripe::CardCloner.new.clone!(creditcard, stripe_account_id) + Stripe::CreditCardCloner.new.clone!(creditcard, stripe_account_id) options[:customer] = creditcard.gateway_customer_profile_id payment_method = creditcard.gateway_payment_profile_id diff --git a/lib/stripe/card_cloner.rb b/lib/stripe/credit_card_cloner.rb similarity index 98% rename from lib/stripe/card_cloner.rb rename to lib/stripe/credit_card_cloner.rb index c0e14f2644..021029a83e 100644 --- a/lib/stripe/card_cloner.rb +++ b/lib/stripe/credit_card_cloner.rb @@ -11,7 +11,7 @@ # This process can be deleted once all hubs are running on the new stripe_sca method and all cards in the system have been migrated to the new payment_methods # Basically, when all DBs have no card_* values in credit_card.gateway_payment_profile_id module Stripe - class CardCloner + class CreditCardCloner def clone!(credit_card, stripe_account_id) return unless credit_card.gateway_payment_profile_id.starts_with?('card_')