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 Details

    • withValue

      TokenRequest.Builder withValue(String name, Object value)
      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} in Strings that support token resolution.

      The values must be one of the supported types:

      Parameters:
      name - the name of the token, which must begin with Custom. 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 a TokenRequest based on the values set in the builder.
      Returns:
      the built token request