-
- All Implemented Interfaces:
public final class InquiryTemplateBuilder
Get a this builder by calling Inquiry.fromTemplate or Inquiry.fromTemplateVersion.
-
-
Method Summary
Modifier and Type Method Description final InquiryTemplateBuilder
fromTemplateId(String templateId)
final InquiryTemplateBuilder
referenceId(String referenceId)
You can generate and provide a unique id which we will associate with the inquiry. final InquiryTemplateBuilder
accountId(String accountId)
Persona-maintained account used to monitor user progress across inquiries. final InquiryTemplateBuilder
fields(Fields fields)
Pre-populate the Inquiry with custom fields final InquiryTemplateBuilder
environment(Environment environment)
The Persona API environment on which to create inquiries. final InquiryTemplateBuilder
theme(@StyleRes() Integer theme)
Theme to apply to the Inquiry flow final InquiryTemplateBuilder
theme(ThemeSource themeSource)
Theme to apply to the Inquiry flow final InquiryTemplateBuilder
enableErrorLogging(Boolean enableErrorLogging)
Whether to enable error logging for fatal exceptions. final InquiryTemplateBuilder
returnCollectedData(Boolean returnCollectedData)
Whether to return the data collected from the inquiry process. final Inquiry
build()
Create the Inquiry objects with the fields set. -
-
Method Detail
-
fromTemplateId
final InquiryTemplateBuilder fromTemplateId(String templateId)
-
referenceId
final InquiryTemplateBuilder referenceId(String referenceId)
You can generate and provide a unique id which we will associate with the inquiry. The identifier can be used to monitor user progress in newly created inquiries.
Setting this will null out accountId.
- Parameters:
referenceId
- custom identifier for the inquiry
-
accountId
final InquiryTemplateBuilder accountId(String accountId)
Persona-maintained account used to monitor user progress across inquiries.
Setting this will null out referenceId.
- Parameters:
accountId
- custom identifier for the inquiry
-
fields
final InquiryTemplateBuilder fields(Fields fields)
Pre-populate the Inquiry with custom fields
- Parameters:
fields
- custom data to store on the inquiry
-
environment
final InquiryTemplateBuilder environment(Environment environment)
The Persona API environment on which to create inquiries. For sandbox and production, use Environment.SANDBOX and Environment.PRODUCTION respectively.
- Parameters:
environment
- either Environment.SANDBOX or Environment.PRODUCTION
-
theme
@Deprecated(message = "Please migrate to theme(themeSource: ThemeSource) instead.") final InquiryTemplateBuilder theme(@StyleRes() Integer theme)
Theme to apply to the Inquiry flow
- Parameters:
theme
- a valid StyleRes to apply to an activity
-
theme
final InquiryTemplateBuilder theme(ThemeSource themeSource)
Theme to apply to the Inquiry flow
- Parameters:
themeSource
- a valid ThemeSource to apply for styling the inquiry
-
enableErrorLogging
final InquiryTemplateBuilder enableErrorLogging(Boolean enableErrorLogging)
Whether to enable error logging for fatal exceptions. When enabled, additional information will be available in the InquiryResponse.Error object when an error occurs due to an uncaught exception. See InquiryResponse.Error.cause.
Defaults to true.
-
returnCollectedData
final InquiryTemplateBuilder returnCollectedData(Boolean returnCollectedData)
Whether to return the data collected from the inquiry process.
Defaults to false.
-
-
-
-