Class Client


  • public final class Client
    extends io.token.rpc.Client
    An authenticated RPC client that is used to talk to Token gateway. The class is a thin wrapper on top of gRPC generated client. Makes the API easier to use.
    • Field Summary

      • Fields inherited from class io.token.rpc.Client

        crypto, customerInitiated, customerTrackingMetadata, gateway, memberId
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      io.reactivex.Completable addRedirectUrls​(java.util.List<java.lang.String> redirectUrls)
      Add redirect URLs.
      io.reactivex.Observable<io.token.proto.common.token.TokenProtos.TokenOperationResult> cancelToken​(io.token.proto.common.token.TokenProtos.Token token)
      Cancels a token.
      io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.BulkTransfer> createBulkTransfer​(java.lang.String tokenId)
      Redeems a bulk transfer token.
      io.reactivex.Observable<java.lang.String> createCustomization​(io.token.proto.common.blob.BlobProtos.Blob.Payload logo, java.util.Map<java.lang.String,​java.lang.String> colors, java.lang.String consentText, java.lang.String name, java.lang.String appName)
      Creates a customization.
      io.reactivex.Observable<io.token.proto.gateway.Gateway.CreateRestrictionResponse> createRestriction​(io.token.proto.gateway.Gateway.CreateRestrictionRequest request)
      Create restriction.
      io.reactivex.Observable<io.token.proto.common.submission.SubmissionProtos.StandingOrderSubmission> createStandingOrder​(java.lang.String tokenId)
      Redeems a standing order token.
      io.reactivex.Observable<java.lang.String> createSubTpp​(io.token.proto.gateway.Gateway.CreateSubTppRequest createSubTppRequest)
      Creates a SubTpp.
      io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.Transfer> createTransfer​(io.token.proto.common.transfer.TransferProtos.TransferPayload transfer)
      Redeems a transfer token.
      io.reactivex.Observable<io.token.proto.gateway.Gateway.DeleteRestrictionResponse> deleteRestriction​(io.token.proto.gateway.Gateway.DeleteRestrictionRequest request)
      Delete restriction.
      io.reactivex.Completable deleteSubTpp​(io.token.proto.gateway.Gateway.DeleteSubTppRequest deleteSubTppRequest)
      Deletes a SubTpp.
      io.reactivex.Completable deleteWebhookConfig()
      delete the webhook config.
      boolean equals​(java.lang.Object obj)  
      Client forAccessToken​(java.lang.String tokenId, boolean customerInitiated)
      Creates a new instance with On-Behalf-Of authentication set.
      Client forAccessToken​(java.lang.String tokenId, io.token.proto.common.security.SecurityProtos.CustomerTrackingMetadata customerTrackingMetadata)
      Creates a new instance with On-Behalf-Of authentication set.
      io.reactivex.Observable<io.token.proto.common.token.TokenProtos.Token> getActiveAccessToken​(java.lang.String toMemberId)
      Looks up a existing access token where the calling member is the grantor and given member is the grantee.
      io.reactivex.Observable<java.lang.String> getBankAuthUrl​(java.lang.String bankId, java.lang.String tokenRequestId, java.util.Optional<io.token.proto.common.security.SecurityProtos.CustomerTrackingMetadata> customerTrackingMetadata, boolean consentAccepted)
      Get url to bank authorization page for a token request.
      io.reactivex.Observable<io.token.proto.common.blob.BlobProtos.Blob> getBlob​(java.lang.String blobId)
      Retrieves a blob from the server.
      io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.BulkTransfer> getBulkTransfer​(java.lang.String bulkTransferId)
      Looks up an existing bulk transfer.
      io.reactivex.Observable<io.token.proto.gateway.Gateway.GetEidasCertificateStatusResponse> getEidasCertificateStatus()
      Get status of the current eIDAS certificate along with the certificate itself.
      io.reactivex.Observable<io.token.proto.gateway.Gateway.GetEidasVerificationStatusResponse> getEidasVerificationStatus​(java.lang.String verificationId)
      Retrieves an eIDAS verification status by verificationId.
      io.reactivex.Observable<io.token.proto.gateway.Gateway.GetExternalMetadataResponse> getExternalMetadata​(java.lang.String tokenRequestId)
      Get the external metadata from the bank associated with a token request.
      protected java.lang.String getOnBehalfOf()  
      io.reactivex.Observable<java.util.List<java.lang.String>> getRedirectUrls()
      Get redirect URLs.
      io.reactivex.Observable<io.token.proto.gateway.Gateway.GetRestrictionsResponse> getRestrictions​(io.token.proto.gateway.Gateway.GetRestrictionsRequest request)
      Delete restriction.
      io.reactivex.Observable<io.token.proto.common.submission.SubmissionProtos.StandingOrderSubmission> getStandingOrderSubmission​(java.lang.String submissionId)
      Looks up an existing Token standing order submission.
      io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.submission.SubmissionProtos.StandingOrderSubmission,​java.lang.String>> getStandingOrderSubmissions​(java.lang.String offset, int limit)
      Looks up a list of existing standing order submissions.
      io.reactivex.Observable<io.token.proto.common.token.TokenProtos.Token> getToken​(java.lang.String tokenId)
      Looks up a existing token.
      io.reactivex.Observable<io.token.tokenrequest.TokenRequestResult> getTokenRequestResult​(java.lang.String tokenRequestId)
      Get the token request result based on a token's tokenRequestId.
      io.reactivex.Observable<io.token.tokenrequest.TokenRequestResult> getTokenRequestResultWithStatus​(java.lang.String tokenRequestId)
      Get the token request result with status based on a token's tokenRequestId.
      io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.token.TokenProtos.Token,​java.lang.String>> getTokens​(io.token.proto.gateway.Gateway.GetTokensRequest.Type type, java.lang.String offset, int limit)
      Looks up a list of existing token.
      io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.Transfer> getTransfer​(java.lang.String transferId)
      Looks up an existing transfer.
      io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.Transfer> getTransfer​(java.lang.String transferId, java.lang.Boolean skipTransferUpdate)
      Looks up an existing transfer.
      io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.transfer.TransferProtos.Transfer,​java.lang.String>> getTransfers​(java.lang.String offset, int limit, java.lang.String tokenId)
      Looks up a list of existing transfers.
      io.reactivex.Observable<io.token.proto.common.webhook.WebhookProtos.Webhook.Config> getWebhookConfig()
      Get the webhook config.
      int hashCode()  
      io.reactivex.Observable<io.token.proto.gateway.Gateway.InitiateBankAuthorizationResponse> initiateBankAuthorization​(java.lang.String tokenRequestId, java.util.Map<java.lang.String,​java.lang.String> credentials, java.util.Optional<io.token.proto.common.security.SecurityProtos.CustomerTrackingMetadata> customerTrackingMetadata, boolean consentAccepted)
      Initiate authorization process with the source bank, for an existing token request.
      io.reactivex.Observable<java.lang.String> onBankAuthCallback​(java.lang.String bankId, java.lang.String query, java.util.Optional<io.token.proto.common.security.SecurityProtos.CustomerTrackingMetadata> customerTrackingMetadata)
      Forward the callback from the bank (after user authentication) to Token.
      io.reactivex.Completable removeRedirectUrls​(java.util.List<java.lang.String> redirectUrls)
      Remove redirect URLs.
      io.reactivex.Observable<io.token.proto.common.member.MemberProtos.SubTpp> retrieveSubTpp​(io.token.proto.gateway.Gateway.RetrieveSubTppRequest retrieveSubTppRequest)
      Retrieves a SubTpp.
      io.reactivex.Observable<java.util.List<io.token.proto.common.member.MemberProtos.SubTpp>> retrieveSubTppChildren​(io.token.proto.gateway.Gateway.RetrieveSubTppChildrenRequest retrieveSubTppChildrenRequest)
      Retrieves SubTpp childrens.
      io.reactivex.Observable<java.util.List<io.token.proto.common.member.MemberProtos.SubTpp>> retrieveSubTpps​(io.token.proto.gateway.Gateway.RetrieveSubTppsRequest retrieveSubTppsRequest)
      Retrieves root SubTpps.
      io.reactivex.Observable<io.token.proto.common.member.MemberProtos.Profile> setProfile​(io.token.proto.common.member.MemberProtos.Profile profile)
      Deprecated.
      io.reactivex.Completable setProfileName​(java.lang.String profileName)
      Replaces a member's profile name.
      io.reactivex.Completable setProfilePicture​(io.token.proto.common.blob.BlobProtos.Blob.Payload payload)
      Replaces a member's public profile picture.
      io.reactivex.Completable setTokenRequestTransferDestinations​(java.lang.String tokenRequestId, java.util.List<io.token.proto.common.transferinstructions.TransferInstructionsProtos.TransferDestination> transferDestinations)
      Sets destination accounts for once if it hasn't been set.
      io.reactivex.Completable setWebhookConfig​(io.token.proto.common.webhook.WebhookProtos.Webhook.Config config)
      Set a webhook config.
      io.reactivex.Observable<java.lang.String> storeTokenRequest​(io.token.proto.common.token.TokenProtos.TokenRequestPayload payload, io.token.proto.common.token.TokenProtos.TokenRequestOptions options)
      Stores a token request.
      io.reactivex.Observable<io.token.proto.common.notification.NotificationProtos.NotifyStatus> triggerBalanceStepUpNotification​(java.util.List<java.lang.String> accountIds)
      Trigger a step up notification for balance requests.
      io.reactivex.Observable<io.token.proto.common.notification.NotificationProtos.NotifyStatus> triggerTransactionStepUpNotification​(java.lang.String accountId)
      Trigger a step up notification for transaction requests.
      io.reactivex.Observable<io.token.proto.gateway.Gateway.VerifyEidasResponse> verifyEidas​(io.token.proto.common.eidas.EidasProtos.VerifyEidasPayload payload, java.lang.String signature)
      Verifies eIDAS certificate.
      • Methods inherited from class io.token.rpc.Client

        authenticationContext, authenticationContext, authenticationContext, authorizeRecovery, confirmFunds, createAndLinkTestBankAccount, deleteMember, getAccount, getAccounts, getAliases, getBalance, getBalances, getBankInfo, getCryptoEngine, getDefaultAgent, getMember, getProfile, getProfileName, getProfilePicture, getStandingOrder, getStandingOrders, getTransaction, getTransactions, linkAccounts, pageBuilder, resolveTransferDestinations, retryVerification, signTokenPayload, tokenAction, updateMember, updateMember, useDefaultRecoveryRule, verifyAlias
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setProfile

        @Deprecated
        public io.reactivex.Observable<io.token.proto.common.member.MemberProtos.Profile> setProfile​(io.token.proto.common.member.MemberProtos.Profile profile)
        Deprecated.
        Replaces a member's public profile.
        Parameters:
        profile - Profile to set
        Returns:
        observable that completes when request handled
      • setProfileName

        public io.reactivex.Completable setProfileName​(java.lang.String profileName)
        Replaces a member's profile name.
        Parameters:
        profileName - profile name
        Returns:
        completable that completes when request handled
      • setProfilePicture

        public io.reactivex.Completable setProfilePicture​(io.token.proto.common.blob.BlobProtos.Blob.Payload payload)
        Replaces a member's public profile picture.
        Parameters:
        payload - Picture data
        Returns:
        observable that completes when request handled
      • getBlob

        public io.reactivex.Observable<io.token.proto.common.blob.BlobProtos.Blob> getBlob​(java.lang.String blobId)
        Retrieves a blob from the server.
        Parameters:
        blobId - id of the blob
        Returns:
        Blob
      • forAccessToken

        public Client forAccessToken​(java.lang.String tokenId,
                                     boolean customerInitiated)
        Creates a new instance with On-Behalf-Of authentication set.
        Parameters:
        tokenId - access token ID to be used
        customerInitiated - whether the customer initiated the calls
        Returns:
        new client instance
      • forAccessToken

        public Client forAccessToken​(java.lang.String tokenId,
                                     io.token.proto.common.security.SecurityProtos.CustomerTrackingMetadata customerTrackingMetadata)
        Creates a new instance with On-Behalf-Of authentication set.
        Parameters:
        tokenId - access token ID to be used
        customerTrackingMetadata - customer tracking metadata
        Returns:
        new client instance
      • storeTokenRequest

        public io.reactivex.Observable<java.lang.String> storeTokenRequest​(io.token.proto.common.token.TokenProtos.TokenRequestPayload payload,
                                                                           io.token.proto.common.token.TokenProtos.TokenRequestOptions options)
        Stores a token request.
        Parameters:
        payload - token request payload
        options - token request options
        Returns:
        reference id for token request
      • createSubTpp

        public io.reactivex.Observable<java.lang.String> createSubTpp​(io.token.proto.gateway.Gateway.CreateSubTppRequest createSubTppRequest)
        Creates a SubTpp.
        Parameters:
        createSubTppRequest - create subTpp request
        Returns:
        subTpp id of created subTpp
      • deleteSubTpp

        public io.reactivex.Completable deleteSubTpp​(io.token.proto.gateway.Gateway.DeleteSubTppRequest deleteSubTppRequest)
        Deletes a SubTpp.
        Parameters:
        deleteSubTppRequest - delete subTpp request
        Returns:
        observable that completes when request handled
      • retrieveSubTpp

        public io.reactivex.Observable<io.token.proto.common.member.MemberProtos.SubTpp> retrieveSubTpp​(io.token.proto.gateway.Gateway.RetrieveSubTppRequest retrieveSubTppRequest)
        Retrieves a SubTpp.
        Parameters:
        retrieveSubTppRequest - retrieve subTpp request
        Returns:
        observable that completes when request handled
      • retrieveSubTpps

        public io.reactivex.Observable<java.util.List<io.token.proto.common.member.MemberProtos.SubTpp>> retrieveSubTpps​(io.token.proto.gateway.Gateway.RetrieveSubTppsRequest retrieveSubTppsRequest)
        Retrieves root SubTpps.
        Parameters:
        retrieveSubTppsRequest - retrieve subTpps request
        Returns:
        observable that completes when request handled
      • retrieveSubTppChildren

        public io.reactivex.Observable<java.util.List<io.token.proto.common.member.MemberProtos.SubTpp>> retrieveSubTppChildren​(io.token.proto.gateway.Gateway.RetrieveSubTppChildrenRequest retrieveSubTppChildrenRequest)
        Retrieves SubTpp childrens.
        Parameters:
        retrieveSubTppChildrenRequest - retrieve subTpp children request
        Returns:
        observable that completes when request handled
      • setTokenRequestTransferDestinations

        public io.reactivex.Completable setTokenRequestTransferDestinations​(java.lang.String tokenRequestId,
                                                                            java.util.List<io.token.proto.common.transferinstructions.TransferInstructionsProtos.TransferDestination> transferDestinations)
        Sets destination accounts for once if it hasn't been set.
        Parameters:
        tokenRequestId - token request Id
        transferDestinations - destination accounts
        Returns:
        observable that completes when request handled
      • getTokenRequestResult

        public io.reactivex.Observable<io.token.tokenrequest.TokenRequestResult> getTokenRequestResult​(java.lang.String tokenRequestId)
        Get the token request result based on a token's tokenRequestId.
        Parameters:
        tokenRequestId - token request id
        Returns:
        token request result
      • getTokenRequestResultWithStatus

        public io.reactivex.Observable<io.token.tokenrequest.TokenRequestResult> getTokenRequestResultWithStatus​(java.lang.String tokenRequestId)
        Get the token request result with status based on a token's tokenRequestId.
        Parameters:
        tokenRequestId - token request id
        Returns:
        token request result
      • createCustomization

        public io.reactivex.Observable<java.lang.String> createCustomization​(io.token.proto.common.blob.BlobProtos.Blob.Payload logo,
                                                                             java.util.Map<java.lang.String,​java.lang.String> colors,
                                                                             java.lang.String consentText,
                                                                             java.lang.String name,
                                                                             java.lang.String appName)
        Creates a customization.
        Parameters:
        logo - logo
        colors - map of ARGB colors #AARRGGBB
        consentText - consent text
        name - display name
        appName - corresponding app name
        Returns:
        customization id
      • getActiveAccessToken

        public io.reactivex.Observable<io.token.proto.common.token.TokenProtos.Token> getActiveAccessToken​(java.lang.String toMemberId)
        Looks up a existing access token where the calling member is the grantor and given member is the grantee.
        Parameters:
        toMemberId - beneficiary of the active access token
        Returns:
        token returned by the server
      • getTokens

        public io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.token.TokenProtos.Token,​java.lang.String>> getTokens​(io.token.proto.gateway.Gateway.GetTokensRequest.Type type,
                                                                                                                                                 @Nullable
                                                                                                                                                 java.lang.String offset,
                                                                                                                                                 int limit)
        Looks up a list of existing token.
        Parameters:
        type - token type
        offset - optional offset to start at
        limit - max number of records to return
        Returns:
        token returned by the server
      • getToken

        public io.reactivex.Observable<io.token.proto.common.token.TokenProtos.Token> getToken​(java.lang.String tokenId)
        Looks up a existing token.
        Parameters:
        tokenId - token id
        Returns:
        token returned by the server
      • getTransfer

        public io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.Transfer> getTransfer​(java.lang.String transferId)
        Looks up an existing transfer.
        Parameters:
        transferId - transfer id
        Returns:
        transfer record
      • getTransfer

        public io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.Transfer> getTransfer​(java.lang.String transferId,
                                                                                                           java.lang.Boolean skipTransferUpdate)
        Looks up an existing transfer.
        Parameters:
        transferId - transfer id
        skipTransferUpdate - flag to skip transfer update
        Returns:
        transfer record
      • getBulkTransfer

        public io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.BulkTransfer> getBulkTransfer​(java.lang.String bulkTransferId)
        Looks up an existing bulk transfer.
        Parameters:
        bulkTransferId - bulk transfer ID
        Returns:
        bulk transfer record
      • getStandingOrderSubmission

        public io.reactivex.Observable<io.token.proto.common.submission.SubmissionProtos.StandingOrderSubmission> getStandingOrderSubmission​(java.lang.String submissionId)
        Looks up an existing Token standing order submission.
        Parameters:
        submissionId - submission ID
        Returns:
        standing order submission record
      • getTransfers

        public io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.transfer.TransferProtos.Transfer,​java.lang.String>> getTransfers​(@Nullable
                                                                                                                                                             java.lang.String offset,
                                                                                                                                                             int limit,
                                                                                                                                                             @Nullable
                                                                                                                                                             java.lang.String tokenId)
        Looks up a list of existing transfers.
        Parameters:
        offset - optional offset to start at
        limit - max number of records to return
        tokenId - optional token id to restrict the search
        Returns:
        transfer record
      • getStandingOrderSubmissions

        public io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.submission.SubmissionProtos.StandingOrderSubmission,​java.lang.String>> getStandingOrderSubmissions​(@Nullable
                                                                                                                                                                                               java.lang.String offset,
                                                                                                                                                                                               int limit)
        Looks up a list of existing standing order submissions.
        Parameters:
        offset - optional offset to start at
        limit - max number of records to return
        Returns:
        standing order submissions
      • createTransfer

        public io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.Transfer> createTransfer​(io.token.proto.common.transfer.TransferProtos.TransferPayload transfer)
        Redeems a transfer token.
        Parameters:
        transfer - transfer parameters, such as amount, currency, etc
        Returns:
        transfer record
      • createBulkTransfer

        public io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.BulkTransfer> createBulkTransfer​(java.lang.String tokenId)
        Redeems a bulk transfer token.
        Parameters:
        tokenId - ID of token to redeem
        Returns:
        bulk transfer record
      • createStandingOrder

        public io.reactivex.Observable<io.token.proto.common.submission.SubmissionProtos.StandingOrderSubmission> createStandingOrder​(java.lang.String tokenId)
        Redeems a standing order token.
        Parameters:
        tokenId - ID of token to redeem
        Returns:
        standing order submission
      • cancelToken

        public io.reactivex.Observable<io.token.proto.common.token.TokenProtos.TokenOperationResult> cancelToken​(io.token.proto.common.token.TokenProtos.Token token)
        Cancels a token.
        Parameters:
        token - token to cancel
        Returns:
        result of the cancel operation, returned by the server
      • triggerBalanceStepUpNotification

        public io.reactivex.Observable<io.token.proto.common.notification.NotificationProtos.NotifyStatus> triggerBalanceStepUpNotification​(java.util.List<java.lang.String> accountIds)
        Trigger a step up notification for balance requests.
        Parameters:
        accountIds - list of account ids
        Returns:
        notification status
      • triggerTransactionStepUpNotification

        public io.reactivex.Observable<io.token.proto.common.notification.NotificationProtos.NotifyStatus> triggerTransactionStepUpNotification​(java.lang.String accountId)
        Trigger a step up notification for transaction requests.
        Parameters:
        accountId - account id
        Returns:
        notification status
      • verifyEidas

        public io.reactivex.Observable<io.token.proto.gateway.Gateway.VerifyEidasResponse> verifyEidas​(io.token.proto.common.eidas.EidasProtos.VerifyEidasPayload payload,
                                                                                                       java.lang.String signature)
        Verifies eIDAS certificate.
        Parameters:
        payload - payload containing member id, eIDAS alias and the certificate
        signature - payload signed with the private key corresponding to the certificate
        Returns:
        result of the verification operation, returned by the server
      • getEidasCertificateStatus

        public io.reactivex.Observable<io.token.proto.gateway.Gateway.GetEidasCertificateStatusResponse> getEidasCertificateStatus()
        Get status of the current eIDAS certificate along with the certificate itself.
        Returns:
        eidas status and the eidas certificate, if any
      • getEidasVerificationStatus

        public io.reactivex.Observable<io.token.proto.gateway.Gateway.GetEidasVerificationStatusResponse> getEidasVerificationStatus​(java.lang.String verificationId)
        Retrieves an eIDAS verification status by verificationId.
        Parameters:
        verificationId - verification id
        Returns:
        a status of the verification operation together with the certificate and alias value
      • getBankAuthUrl

        public io.reactivex.Observable<java.lang.String> getBankAuthUrl​(java.lang.String bankId,
                                                                        java.lang.String tokenRequestId,
                                                                        java.util.Optional<io.token.proto.common.security.SecurityProtos.CustomerTrackingMetadata> customerTrackingMetadata,
                                                                        boolean consentAccepted)
        Get url to bank authorization page for a token request.
        Parameters:
        bankId - bank ID
        tokenRequestId - token request ID
        customerTrackingMetadata - customer tracking metadata
        consentAccepted - if user/payer accepted the consent
        Returns:
        url
      • initiateBankAuthorization

        public io.reactivex.Observable<io.token.proto.gateway.Gateway.InitiateBankAuthorizationResponse> initiateBankAuthorization​(java.lang.String tokenRequestId,
                                                                                                                                   java.util.Map<java.lang.String,​java.lang.String> credentials,
                                                                                                                                   java.util.Optional<io.token.proto.common.security.SecurityProtos.CustomerTrackingMetadata> customerTrackingMetadata,
                                                                                                                                   boolean consentAccepted)
        Initiate authorization process with the source bank, for an existing token request.
        Parameters:
        tokenRequestId - token request ID
        credentials - user credentials
        customerTrackingMetadata - customer tracking metadata
        consentAccepted - if user/payer accepted the consent
        Returns:
        initiation response
      • onBankAuthCallback

        public io.reactivex.Observable<java.lang.String> onBankAuthCallback​(java.lang.String bankId,
                                                                            java.lang.String query,
                                                                            java.util.Optional<io.token.proto.common.security.SecurityProtos.CustomerTrackingMetadata> customerTrackingMetadata)
        Forward the callback from the bank (after user authentication) to Token.
        Parameters:
        bankId - bank ID
        query - HTTP query string
        customerTrackingMetadata - customer tracking metadata
        Returns:
        token request ID
      • getExternalMetadata

        public io.reactivex.Observable<io.token.proto.gateway.Gateway.GetExternalMetadataResponse> getExternalMetadata​(java.lang.String tokenRequestId)
        Get the external metadata from the bank associated with a token request.
        Parameters:
        tokenRequestId - token request ID
        Returns:
        external metadata
      • setWebhookConfig

        public io.reactivex.Completable setWebhookConfig​(io.token.proto.common.webhook.WebhookProtos.Webhook.Config config)
        Set a webhook config.
        Parameters:
        config - the webhook config
        Returns:
        completable
      • getWebhookConfig

        public io.reactivex.Observable<io.token.proto.common.webhook.WebhookProtos.Webhook.Config> getWebhookConfig()
        Get the webhook config.
        Returns:
        config
      • deleteWebhookConfig

        public io.reactivex.Completable deleteWebhookConfig()
        delete the webhook config.
        Returns:
        completable
      • getRedirectUrls

        public io.reactivex.Observable<java.util.List<java.lang.String>> getRedirectUrls()
        Get redirect URLs.
        Returns:
        redirect URLs
      • createRestriction

        public io.reactivex.Observable<io.token.proto.gateway.Gateway.CreateRestrictionResponse> createRestriction​(io.token.proto.gateway.Gateway.CreateRestrictionRequest request)
        Create restriction.
        Parameters:
        request - create restriction request
        Returns:
        created restriction
      • deleteRestriction

        public io.reactivex.Observable<io.token.proto.gateway.Gateway.DeleteRestrictionResponse> deleteRestriction​(io.token.proto.gateway.Gateway.DeleteRestrictionRequest request)
        Delete restriction.
        Parameters:
        request - delete restriction request
        Returns:
        deleted restriction
      • getRestrictions

        public io.reactivex.Observable<io.token.proto.gateway.Gateway.GetRestrictionsResponse> getRestrictions​(io.token.proto.gateway.Gateway.GetRestrictionsRequest request)
        Delete restriction.
        Parameters:
        request - get restriction request
        Returns:
        list of restrictions
      • addRedirectUrls

        public io.reactivex.Completable addRedirectUrls​(java.util.List<java.lang.String> redirectUrls)
        Add redirect URLs.
        Parameters:
        redirectUrls - redirect URLs to add
        Returns:
        completable
      • removeRedirectUrls

        public io.reactivex.Completable removeRedirectUrls​(java.util.List<java.lang.String> redirectUrls)
        Remove redirect URLs.
        Parameters:
        redirectUrls - redirect URLs to remove
        Returns:
        completable
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class io.token.rpc.Client
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class io.token.rpc.Client
      • getOnBehalfOf

        protected java.lang.String getOnBehalfOf()
        Overrides:
        getOnBehalfOf in class io.token.rpc.Client