Class ConsumerInfo
java.lang.Object
com.thalesgroup.gemalto.d1.paymentpasskey.ConsumerInfo
Represents the consumer information for Payment Passkey operations.
This class encapsulates the consumer contact information that can be used during Payment Passkey enrollment and authentication flows. It supports two types of consumer identification:
- Email-based: Using the consumer's email address.
- Phone-based: Using the consumer's phone number with country code.
Usage Examples:
// Create ConsumerInfo with email
ConsumerInfo consumerInfo = new ConsumerInfo("user@example.com");
// Create ConsumerInfo with phone number
ConsumerInfo consumerInfo = new ConsumerInfo("1234567890", "+1");
// Update consumer information
consumerInfo.setEmail("newemail@example.com");
consumerInfo.setPhoneNumber("9876543210");
consumerInfo.setPhoneNumberCountryCode("+44");
-
Constructor Summary
ConstructorsConstructorDescriptionConsumerInfo(String email) Constructs a new ConsumerInfo instance.ConsumerInfo(String phoneNumber, String phoneNumberCountryCode) Constructs a new ConsumerInfo instance. -
Method Summary
Modifier and TypeMethodDescriptiongetEmail()Gets the consumer's email address.Gets the phone number without a country code.Gets the country code of the phone number.voidSets the consumer's email address.voidsetPhoneNumber(String phoneNumber) Sets the phone number without a country code.voidsetPhoneNumberCountryCode(String phoneNumberCountryCode) Sets the country code of the phone number.
-
Constructor Details
-
ConsumerInfo
Constructs a new ConsumerInfo instance.- Parameters:
email- The consumer's email address.
-
ConsumerInfo
Constructs a new ConsumerInfo instance.- Parameters:
phoneNumber- The phone number without a country code.phoneNumberCountryCode- The country code of the phone number.
-
-
Method Details
-
getEmail
Gets the consumer's email address.- Returns:
- The email address, or null if it is not provided.
-
getPhoneNumber
Gets the phone number without a country code.- Returns:
- The phone number, or null if it is not provided.
-
getPhoneNumberCountryCode
Gets the country code of the phone number.- Returns:
- The phone number country code, or null if it is not provided.
-
setEmail
Sets the consumer's email address.- Parameters:
email- The email address of the consumer.
-
setPhoneNumber
Sets the phone number without a country code.- Parameters:
phoneNumber- The phone number without a country code.
-
setPhoneNumberCountryCode
Sets the country code of the phone number.- Parameters:
phoneNumberCountryCode- The country code of the phone number.
-