Package com.maxmind.minfraud.request
Class CreditCard.Builder
java.lang.Object
com.maxmind.minfraud.request.CreditCard.Builder
- Enclosing class:
- CreditCard
Builder
creates instances of the parent CreditCard
from values set by the builder's methods.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbankPhoneCountryCode
(String code) bankPhoneNumber
(String number) build()
issuerIdNumber
(String number) last4Digits
(String digits) Deprecated.Use lastDigits instead.lastDigits
(String digits) was3dSecureSuccessful
(Boolean wasSuccessful)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
issuerIdNumber
- Parameters:
number
- The issuer ID number for the credit card. This is the first 6 or 8 digits of the credit card number. It identifies the issuing bank.- Returns:
- The builder object.
- Throws:
IllegalArgumentException
- when number is not a six digit string.
-
last4Digits
Deprecated.Use lastDigits instead.- Parameters:
digits
- The last two or four digits of the credit card number.- Returns:
- The builder object.
- Throws:
IllegalArgumentException
- when number is not a two or four digit string.
-
lastDigits
- Parameters:
digits
- The last two or four digits of the credit card number.- Returns:
- The builder object.
- Throws:
IllegalArgumentException
- when number is not a two or four digit string.
-
bankName
- Parameters:
name
- The name of the issuing bank as provided by the end user.- Returns:
- The builder object.
-
bankPhoneCountryCode
- Parameters:
code
- The phone country code for the issuing bank as provided by the end user.- Returns:
- The builder object.
-
bankPhoneNumber
- Parameters:
number
- The phone number, without the country code, for the issuing bank as provided by the end user.- Returns:
- The builder object.
-
avsResult
- Parameters:
code
- The address verification system (AVS) check result, as returned to you by the credit card processor. The minFraud service supports the standard AVS codes.- Returns:
- The builder object.
-
cvvResult
- Parameters:
code
- The card verification value (CVV) code as provided by the payment processor.- Returns:
- The builder object.
-
token
- Parameters:
token
- A token uniquely identifying the card. The token should consist of non-space printable ASCII characters. If the token is all digits, it must be more than 19 characters long. The token must not be a primary account number (PAN) or a simple transformation of it. If you have a valid token that looks like a PAN but is not one, you may prefix that token with a fixed string, e.g., "token-".- Returns:
- The builder object.
- Throws:
IllegalArgumentException
- when the token is invalid.
-
was3dSecureSuccessful
- Parameters:
wasSuccessful
- An indication of whether or not the outcome of 3D-Secure verification (e.g. Safekey, SecureCode, Verified by Visa) was successful, as provided by the end user.true
if customer verification was successful, orfalse
if the customer failed verification. If 3-D Secure verification was not used, was unavailable, or resulted in another outcome other than success or failure, do not use this method.- Returns:
- The builder object.
-
build
- Returns:
- An instance of
CreditCard
created from the fields set on this builder.
-