Class TokenRequest.Builder<T extends TokenRequest.Builder<T>>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String csrfToken  
      protected java.lang.String oauthState  
      protected io.token.proto.common.token.TokenProtos.TokenRequestOptions.Builder requestOptions  
      protected io.token.proto.common.token.TokenProtos.TokenRequestPayload.Builder requestPayload  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      TokenRequest build()
      Builds the token payload.
      T setActingAs​(io.token.proto.common.token.TokenProtos.ActingAs actingAs)
      Sets acting as on the token.
      T setBankId​(java.lang.String bankId)
      Optional.
      T setCsrfToken​(java.lang.String csrfToken)
      A nonce that will be verified in the callback phase of the flow.
      T setCustomizationId​(java.lang.String customizationId)
      Optional.
      T setDescription​(java.lang.String description)
      Sets the description.
      T setFromAlias​(io.token.proto.common.alias.AliasProtos.Alias fromAlias)
      Optional.
      T setFromMemberId​(java.lang.String fromMemberId)
      Optional.
      T setReceiptRequested​(boolean receiptRequested)
      Optional.
      T setRedirectUrl​(java.lang.String redirectUrl)
      Sets the callback URL to the server that will initiate redemption of the token.
      T setRefId​(java.lang.String refId)
      Sets the reference ID of the token.
      T setSourceAccount​(java.lang.String sourceAccountId)
      Optional.
      T setState​(java.lang.String state)
      Sets a developer-specified string that allows state to be persisted between the the request and callback phases of the flow.
      T setToAlias​(io.token.proto.common.alias.AliasProtos.Alias toAlias)
      Sets the alias of the payee/grantee.
      T setTokenExpiration​(long tokenExpiration)
      Optional.
      T setToMemberId​(java.lang.String toMemberId)
      Sets the memberId of the payee/grantee.
      T setUserRefId​(java.lang.String userRefId)
      Optional.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • requestPayload

        protected io.token.proto.common.token.TokenProtos.TokenRequestPayload.Builder requestPayload
      • requestOptions

        protected io.token.proto.common.token.TokenProtos.TokenRequestOptions.Builder requestOptions
      • oauthState

        protected java.lang.String oauthState
      • csrfToken

        protected java.lang.String csrfToken
    • Method Detail

      • setBankId

        public T setBankId​(java.lang.String bankId)
        Optional. Sets the bank ID in order to bypass the Token bank selection UI.
        Parameters:
        bankId - bank ID
        Returns:
        builder
      • setFromMemberId

        public T setFromMemberId​(java.lang.String fromMemberId)
        Optional. Sets the payer/grantor member ID in order to bypass the Token email input UI.
        Parameters:
        fromMemberId - payer/grantor member ID
        Returns:
        builder
      • setFromAlias

        public T setFromAlias​(io.token.proto.common.alias.AliasProtos.Alias fromAlias)
        Optional. Sets the payer/grantor alias in order to bypass the Token email input UI.
        Parameters:
        fromAlias - payer/grantor alias
        Returns:
        builder
      • setSourceAccount

        public T setSourceAccount​(java.lang.String sourceAccountId)
        Optional. Sets the account ID of the source bank account.
        Parameters:
        sourceAccountId - source bank account ID
        Returns:
        builder
      • setReceiptRequested

        public T setReceiptRequested​(boolean receiptRequested)
        Optional. True if a receipt should be sent to the payee/grantee's default receipt email/SMS/etc.
        Parameters:
        receiptRequested - receipt requested flag
        Returns:
        builder
      • setUserRefId

        public T setUserRefId​(java.lang.String userRefId)
        Optional. Sets the ID used to track a member claimed by a TPP.
        Parameters:
        userRefId - user ref ID
        Returns:
        builder
      • setCustomizationId

        public T setCustomizationId​(java.lang.String customizationId)
        Optional. Sets the ID used to customize the UI of the web-app.
        Parameters:
        customizationId - customization ID
        Returns:
        builder
      • setRedirectUrl

        public T setRedirectUrl​(java.lang.String redirectUrl)
        Sets the callback URL to the server that will initiate redemption of the token.
        Parameters:
        redirectUrl - redirect URL
        Returns:
        builder
      • setRefId

        public T setRefId​(java.lang.String refId)
        Sets the reference ID of the token.
        Parameters:
        refId - token ref ID
        Returns:
        builder
      • setToAlias

        public T setToAlias​(io.token.proto.common.alias.AliasProtos.Alias toAlias)
        Sets the alias of the payee/grantee.
        Parameters:
        toAlias - alias
        Returns:
        builder
      • setToMemberId

        public T setToMemberId​(java.lang.String toMemberId)
        Sets the memberId of the payee/grantee.
        Parameters:
        toMemberId - memberId
        Returns:
        builder
      • setActingAs

        public T setActingAs​(io.token.proto.common.token.TokenProtos.ActingAs actingAs)
        Sets acting as on the token.
        Parameters:
        actingAs - entity the redeemer is acting on behalf of
        Returns:
        builder
      • setDescription

        public T setDescription​(java.lang.String description)
        Sets the description.
        Parameters:
        description - description
        Returns:
        builder
      • setState

        public T setState​(java.lang.String state)
        Sets a developer-specified string that allows state to be persisted between the the request and callback phases of the flow.
        Parameters:
        state - state
        Returns:
        builder
      • setCsrfToken

        public T setCsrfToken​(java.lang.String csrfToken)
        A nonce that will be verified in the callback phase of the flow. Used for CSRF attack mitigation.
        Parameters:
        csrfToken - CSRF token
        Returns:
        builder
      • setTokenExpiration

        public T setTokenExpiration​(long tokenExpiration)
        Optional. Sets the token expiration in UTC timestamp in ms.
        Parameters:
        tokenExpiration - token expiration timestamp
        Returns:
        builder
      • build

        public TokenRequest build()
        Builds the token payload.
        Returns:
        TokenRequest instance