public static final class CreditCard.Builder extends Object
Builder
creates instances of the parent CreditCard
from values set by the builder's methods.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
CreditCard.Builder |
avsResult(Character code) |
CreditCard.Builder |
bankName(String name) |
CreditCard.Builder |
bankPhoneCountryCode(String code) |
CreditCard.Builder |
bankPhoneNumber(String number) |
CreditCard |
build() |
CreditCard.Builder |
cvvResult(Character code) |
CreditCard.Builder |
issuerIdNumber(String number) |
CreditCard.Builder |
last4Digits(String digits) |
CreditCard.Builder |
token(String token) |
public CreditCard.Builder issuerIdNumber(String number)
number
- The issuer ID number for the credit card. This is the
first 6 digits of the credit card number. It
identifies the issuing bank.IllegalArgumentException
- when number is not a six digit
string.public CreditCard.Builder last4Digits(String digits)
digits
- The last four digits of the credit card number.IllegalArgumentException
- when number is not a four digit
string.public CreditCard.Builder bankName(String name)
name
- The name of the issuing bank as provided by the end user.public CreditCard.Builder bankPhoneCountryCode(String code)
code
- The phone country code for the issuing bank as provided
by the end user.public CreditCard.Builder bankPhoneNumber(String number)
number
- The phone number, without the country code, for the
issuing bank as provided by the end user.public CreditCard.Builder avsResult(Character code)
code
- The phone number, without the country code, for the
issuing bank as provided by the end user.public CreditCard.Builder cvvResult(Character code)
code
- The card verification value (CVV) code as provided
by the payment processor.public CreditCard.Builder token(String token)
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-".IllegalArgumentException
- when the token is invalid.public CreditCard build()
CreditCard
created from the
fields set on this builder.Copyright © 2016 MaxMind, Inc.. All rights reserved.