public static class ApprovalRequestParams.Builder extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
AUTHYID_ERROR |
static String |
DETAIL_ERROR |
static String |
HIDDEN_DETAIL_ERROR |
static String |
LOGO_ERROR_DEFAULT |
static String |
LOGO_ERROR_RES |
static String |
LOGO_ERROR_URL |
static String |
MESSAGE_ERROR |
| Constructor and Description |
|---|
Builder(Integer authyId,
String message)
This will create a valid builder with the initial required params.
|
| Modifier and Type | Method and Description |
|---|---|
ApprovalRequestParams.Builder |
addDetail(String key,
String value)
Adds a key,value pair into the details which is a Dictionary containing the [ApprovalRequest] details that will be shown to user.
|
ApprovalRequestParams.Builder |
addHiddenDetail(String key,
String value)
Adds a key,value pair into the hidden_details which is a Dictionary containing the approval request details hidden to user.
|
ApprovalRequestParams.Builder |
addLogo(ApprovalRequestParams.Resolution resolution,
String url)
Adds a new logo item to the Logos array.
|
ApprovalRequestParams |
build()
Compiles and creates the provided set of parameters to have a ready to use ApprovalRequestParams object.
|
ApprovalRequestParams.Builder |
setSecondsToExpire(Long secondsToExpire)
Defines the second to expire parameter
|
public static final String MESSAGE_ERROR
public static final String AUTHYID_ERROR
public static final String DETAIL_ERROR
public static final String HIDDEN_DETAIL_ERROR
public static final String LOGO_ERROR_RES
public static final String LOGO_ERROR_URL
public static final String LOGO_ERROR_DEFAULT
public Builder(Integer authyId, String message) throws OneTouchException
authyId - The id of the user that will be authorized using OneTouchmessage - The message to show to the user, cannot be null or empty and it's length needs to be less than 200 max characters.OneTouchException - If any of the params doesn't match the required/length rules.public ApprovalRequestParams.Builder setSecondsToExpire(Long secondsToExpire)
See: https://www.twilio.com/docs/api/authy/authy-onetouch-api#parameters
secondsToExpire - Number of seconds that the approval request will be available for being responded.public ApprovalRequestParams.Builder addDetail(String key, String value) throws OneTouchException
See: https://www.twilio.com/docs/api/authy/authy-onetouch-api#parameters
key - The label of the detail that will be shown to the user, cannot be null or empty and it's length needs to be less than 200 max characters.value - The value of the detail that will be shown to the user, cannot be null or empty and it's length needs to be less than 200 max characters.OneTouchException - If any of the params doesn't match the required/length rules.public ApprovalRequestParams.Builder addHiddenDetail(String key, String value) throws OneTouchException
See: https://www.twilio.com/docs/api/authy/authy-onetouch-api#parameters
key - The label of the hidden detail that will be not shown to the user, cannot be null or empty and it's length needs to be less than 200 max characters.value - The value of the hidden detail that will be not shown to the user, cannot be null or empty and it's length needs to be less than 200 max characters.OneTouchException - If any of the params doesn't match the required/length rules.public ApprovalRequestParams.Builder addLogo(ApprovalRequestParams.Resolution resolution, String url) throws OneTouchException
resolution - The Resolution wanted for the given logo(Default, log,med,high)url - The url to be used to load the logo.OneTouchException - If any of the params doesn't match the required/length rules.public ApprovalRequestParams build() throws OneTouchException
OneTouchException - If any of the params doesn't match the required/length rules.Copyright © 2019. All rights reserved.