Skip to content

Commit 25db0f4

Browse files
committed
Avoid sending both last_digits and last_4_digits
1 parent 8f2af77 commit 25db0f4

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

lib/minfraud/components/credit_card.rb

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@ class CreditCard < Base
2121
# @return [String, nil]
2222
attr_accessor :last_digits
2323

24-
# The last four digits of the credit card number.
25-
#
26-
# @deprecated Use {::last_digits} instead.
27-
#
28-
# @return [String, nil]
29-
attr_accessor :last_4_digits
30-
3124
# The name of the issuing bank as provided by the end user.
3225
#
3326
# @return [String, nil]
@@ -81,13 +74,21 @@ class CreditCard < Base
8174
# @return [Boolean, nil]
8275
attr_accessor :was_3d_secure_successful
8376

77+
# The last digits of the credit card number.
78+
#
79+
# @deprecated Use {::last_digits} instead.
80+
#
81+
# @return [String, nil]
82+
def last_4_digits
83+
@last_digits
84+
end
85+
8486
# @param params [Hash] Hash of parameters. Each key/value should
8587
# correspond to one of the available attributes.
8688
def initialize(params = {})
8789
@bank_phone_country_code = params[:bank_phone_country_code]
8890
@issuer_id_number = params[:issuer_id_number]
8991
@last_digits = params[:last_digits] || params[:last_4_digits]
90-
@last_4_digits = @last_digits
9192
@bank_name = params[:bank_name]
9293
@bank_phone_number = params[:bank_phone_number]
9394
@avs_result = params[:avs_result]

0 commit comments

Comments
 (0)