Package com.veeva.vault.sdk.api.token
Interface TokenRequest.Builder
- Enclosing interface:
- TokenRequest
public static interface TokenRequest.Builder
Builds a
TokenRequest.
This builder accepts name-value pairs for custom tokens.
A single request may contain up to 10,000 items.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aTokenRequestbased on the values set in the builder.Sets a custom value for a specified token.
-
Method Details
-
withValue
Sets a custom value for a specified token.Specified token names must begin with
Custom., and the remainder of the token name must only consist of alphanumeric lowercase characters and single consecutive underscores. Additionally, names must start with a letter and cannot end with an underscore. Token names can be a maximum of 40 characters.For example, if you include a custom value with name
Custom.product_name, the supplied value will replace instances of${Custom.product_name}inStrings that support token resolution.The values must be one of the supported types:
StringBooleanBigDecimalLocalDateZonedDateTime- A
Listcontaining onlyStrings
- Parameters:
name- the name of the token, which must begin withCustom.and cannot be null or empty.value- the value to resolve for the token. Must be an instance of a supported type.- Returns:
- the current builder
-
build
TokenRequest build()Builds aTokenRequestbased on the values set in the builder.- Returns:
- the built token request
-