lib/braintree/credit_card_gateway.rb in braintree-4.19.0 vs lib/braintree/credit_card_gateway.rb in braintree-4.20.0

- old
+ new

@@ -22,14 +22,20 @@ def create!(*args) return_object_or_raise(:credit_card) { create(*args) } end + # NEXT_MAJOR_VERSION remove this method + # CreditCard.credit has been deprecated in favor of Transaction.credit def credit(token, transaction_attributes) + warn "[DEPRECATED] CreditCard.credit is deprecated. Use Transaction.credit instead" @gateway.transaction.credit(transaction_attributes.merge(:payment_method_token => token)) end + # NEXT_MAJOR_VERSION remove this method + # CreditCard.credit has been deprecated in favor of Transaction.credit def credit!(*args) + warn "[DEPRECATED] CreditCard.credit is deprecated. Use Transaction.credit instead" return_object_or_raise(:transaction) { credit(*args) } end def delete(token) @config.http.delete("#{@config.base_merchant_path}/payment_methods/credit_card/#{token}")