Class CreditCard.Builder

java.lang.Object
com.maxmind.minfraud.request.CreditCard.Builder
Enclosing class:
CreditCard

public static final class CreditCard.Builder extends Object
Builder creates instances of the parent CreditCard from values set by the builder's methods.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • issuerIdNumber

      public CreditCard.Builder issuerIdNumber(String number)
      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.
    • lastDigits

      public CreditCard.Builder lastDigits(String digits)
      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

      public CreditCard.Builder bankName(String name)
      Parameters:
      name - The name of the issuing bank as provided by the end user.
      Returns:
      The builder object.
    • bankPhoneCountryCode

      public CreditCard.Builder bankPhoneCountryCode(String code)
      Parameters:
      code - The phone country code for the issuing bank as provided by the end user.
      Returns:
      The builder object.
    • bankPhoneNumber

      public CreditCard.Builder bankPhoneNumber(String number)
      Parameters:
      number - The phone number, without the country code, for the issuing bank as provided by the end user.
      Returns:
      The builder object.
    • country

      public CreditCard.Builder country(String code)
      Parameters:
      code - The two character ISO 3166-1 alpha-2 country code where the issuer of the card is located. This may be passed instead of issuerIdNumber if you do not wish to pass partial account numbers, or if your payment processor does not provide them.
      Returns:
      The builder object.
      Throws:
      IllegalArgumentException - when code is not a two-letter country code.
    • avsResult

      public CreditCard.Builder avsResult(Character code)
      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

      public CreditCard.Builder cvvResult(Character code)
      Parameters:
      code - The card verification value (CVV) code as provided by the payment processor.
      Returns:
      The builder object.
    • token

      public CreditCard.Builder token(String 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

      public CreditCard.Builder was3dSecureSuccessful(Boolean wasSuccessful)
      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, or false 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

      public CreditCard build()
      Returns:
      An instance of CreditCard created from the fields set on this builder.