Home Reference Source Test
import TokenRequestBuilder from '@token-io/tpp/src/main/TokenRequestBuilder.js'
public class | source

TokenRequestBuilder

Constructor Summary

Public Constructor
public

constructor(payload: Object)

Use TokenClient::createTransferTokenRequest or TokenClient::createAccessTokenRequest.

Member Summary

Public Members
public
public

Method Summary

Public Methods
public

setActingAs(actingAs: ActingAs): TokenRequestBuilder

Sets acting as on the token.

public

Sets a default bank ID for the TokenRequestBuilder.

public

Sets the CSRF token.

public

Sets the callback state.

public

Sets customization ID for the TokenRequestBuilder.

public

Sets the description of the token.

public

setFromAlias(alias: Alias | string, value: string): TokenRequestBuilder

Sets the alias of the payer/grantor.

public

Sets the member ID of the payer/grantor.

public

Sets if a receipt should be sent to the payee/grantee's default receipt email/SMS/etc.

public

Sets the callback URL to the server that will initiate redemption of the token.

public

Sets a custom reference ID on the TokenRequestBuilder.

public

Sets the source account ID.

public

setToAlias(alias: Alias | string, value: string): TokenRequestBuilder

Sets the alias of the payee/grantee.

public

Sets the member ID of the payee/grantee.

public

Sets the ID used to track a member claimed by a TPP.

Public Constructors

public constructor(payload: Object) source

Use TokenClient::createTransferTokenRequest or TokenClient::createAccessTokenRequest.

Params:

NameTypeAttributeDescription
payload Object

Public Members

public requestOptions: Object source

public requestPayload: Object source

Public Methods

public setActingAs(actingAs: ActingAs): TokenRequestBuilder source

Sets acting as on the token.

Params:

NameTypeAttributeDescription
actingAs ActingAs

entity the TPP is acting on behalf of

Return:

TokenRequestBuilder

TokenRequestBuilder

public setBankId(bankId: string): TokenRequestBuilder source

Sets a default bank ID for the TokenRequestBuilder.

Params:

NameTypeAttributeDescription
bankId string

the default bank ID

Return:

TokenRequestBuilder

TokenRequestBuilder

public setCSRFToken(csrf: string): TokenRequestBuilder source

Sets the CSRF token.

Params:

NameTypeAttributeDescription
csrf string

CSRF token

Return:

TokenRequestBuilder

TokenRequestBuilder

public setCallbackState(state: Object | string): TokenRequestBuilder source

Sets the callback state.

Params:

NameTypeAttributeDescription
state Object | string

arbitrary JS object or string

Return:

TokenRequestBuilder

TokenRequestBuilder

public setCustomizationId(customizationId: string): TokenRequestBuilder source

Sets customization ID for the TokenRequestBuilder.

Params:

NameTypeAttributeDescription
customizationId string

result of Member::createCustomization

Return:

TokenRequestBuilder

TokenRequestBuilder

public setDescription(description: string): TokenRequestBuilder source

Sets the description of the token.

Params:

NameTypeAttributeDescription
description string

description

Return:

TokenRequestBuilder

TokenRequestBuilder

public setFromAlias(alias: Alias | string, value: string): TokenRequestBuilder source

Sets the alias of the payer/grantor.

Params:

NameTypeAttributeDescription
alias Alias | string

alias object, or type of alias as a string

value string

optional value of the alias if first param is type

Return:

TokenRequestBuilder

TokenRequestBuilder

public setFromMemberId(fromMemberId: string): TokenRequestBuilder source

Sets the member ID of the payer/grantor.

Params:

NameTypeAttributeDescription
fromMemberId string

member ID of the payer/grantor

Return:

TokenRequestBuilder

TokenRequestBuilder

public setReceiptRequested(receiptRequested: boolean): TokenRequestBuilder source

Sets if a receipt should be sent to the payee/grantee's default receipt email/SMS/etc.

Params:

NameTypeAttributeDescription
receiptRequested boolean

true if a receipt is requested

Return:

TokenRequestBuilder

TokenRequestBuilder

public setRedirectUrl(redirectUrl: string): TokenRequestBuilder source

Sets the callback URL to the server that will initiate redemption of the token.

Params:

NameTypeAttributeDescription
redirectUrl string

redirectUrl

Return:

TokenRequestBuilder

TokenRequestBuilder

public setRefId(refId: string): TokenRequestBuilder source

Sets a custom reference ID on the TokenRequestBuilder.

Params:

NameTypeAttributeDescription
refId string

refId

Return:

TokenRequestBuilder

TokenRequestBuilder

public setSourceAccount(accountId: string): TokenRequestBuilder source

Sets the source account ID.

Params:

NameTypeAttributeDescription
accountId string

source account ID

Return:

TokenRequestBuilder

TokenRequestBuilder

public setToAlias(alias: Alias | string, value: string): TokenRequestBuilder source

Sets the alias of the payee/grantee.

Params:

NameTypeAttributeDescription
alias Alias | string

alias of the payee/grantee

value string

optional value of the alias if first param is type

Return:

TokenRequestBuilder

TokenRequestBuilder

public setToMemberId(toMemberId: string): TokenRequestBuilder source

Sets the member ID of the payee/grantee.

Params:

NameTypeAttributeDescription
toMemberId string

member ID of the payee/grantee

Return:

TokenRequestBuilder

TokenRequestBuilder

public setUserRefId(userRefId: string): TokenRequestBuilder source

Sets the ID used to track a member claimed by a TPP.

Params:

NameTypeAttributeDescription
userRefId string

userRefId

Return:

TokenRequestBuilder

TokenRequestBuilder