Skip to content

Commit 32bf313

Browse files
committed
Add setter for last_4_digits
Now that last_4_digits is not an attribute it will not have a setter generated for it. This adds such a setter method.
1 parent 25db0f4 commit 32bf313

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/minfraud/components/credit_card.rb

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class CreditCard < Base
7474
# @return [Boolean, nil]
7575
attr_accessor :was_3d_secure_successful
7676

77-
# The last digits of the credit card number.
77+
# Get the last digits of the credit card number.
7878
#
7979
# @deprecated Use {::last_digits} instead.
8080
#
@@ -83,6 +83,15 @@ def last_4_digits
8383
@last_digits
8484
end
8585

86+
# Set the last digits of the credit card number.
87+
#
88+
# @deprecated Use {::last_digits} instead.
89+
#
90+
# @return [String, nil]
91+
def last_4_digits=(last4)
92+
@last_digits = last4
93+
end
94+
8695
# @param params [Hash] Hash of parameters. Each key/value should
8796
# correspond to one of the available attributes.
8897
def initialize(params = {})

0 commit comments

Comments
 (0)