Member
Extends:
Represents a Token member.
Constructor Summary
Public Constructor | ||
public |
constructor(options: object) |
Member Summary
Private Members | ||
private |
_client: * |
|
private |
|
Method Summary
Public Methods | ||
public |
cancelToken(token: Token | string): Promise<TokenOperationResult> Cancels a token. |
|
public |
createCustomization(logo: BlobPayload, colors: object, consentText: string, name: string, appName: string): Promise<string> Creates a customization. |
|
public |
forAccessToken(accessTokenId: string): Representable Creates a representable that acts as another member via an access token. |
|
public |
getAccessTokens(offset: string, limit: number): Promise<object> Looks up all access tokens. |
|
public |
getAccount(accountId: string): Promise<Account> Looks up a member's account by ID. |
|
public |
getAccounts(): Promise<Array<Account>> Looks up the member's accounts. |
|
public |
Downloads a blob from the server. |
|
public |
getProfile(id: string): Promise<Profile> Gets a member's public profile. |
|
public |
getProfilePicture(id: string, size: ProfilePictureSize): Promise<Blob> Gets a member's public profile picture. |
|
public |
Looks up a token by its ID. |
|
public |
getTransfer(transferId: string): Promise<Transfer> Looks up a transfer. |
|
public |
getTransferTokens(offset: string, limit: number): Promise<object> Looks up all transfer tokens. |
|
public |
Looks up all of the member's transfers. |
|
public |
redeemToken(token: Token | string, amount: number, currency: string, description: string, destinations: Array<TransferEndpoint>, refId: string): Promise<Transfer> Redeems a token. |
|
public |
setProfile(profile: Profile): Promise<Profile> Replaces the authenticated member's public profile. |
|
public |
setProfilePicture(type: string, data: ArrayBuffer | string): Promise<void> Uploads the authenticated member's public profile. |
|
public |
storeTokenRequest(tokenRequest: TokenRequestBuilder): Promise<TokenRequest> Stores a request for a token. |
Private Methods | ||
private |
_resolveToken(token: string | Token): Promise<Token> |
Public Constructors
Public Methods
public cancelToken(token: Token | string): Promise<TokenOperationResult> source
Cancels a token.
Params:
Name | Type | Attribute | Description |
token | Token | string | token to cancel, can be tokenId |
public createCustomization(logo: BlobPayload, colors: object, consentText: string, name: string, appName: string): Promise<string> source
Creates a customization.
public forAccessToken(accessTokenId: string): Representable source
Creates a representable that acts as another member via an access token.
Params:
Name | Type | Attribute | Description |
accessTokenId | string | ID of the access token |
public getAccessTokens(offset: string, limit: number): Promise<object> source
Looks up all access tokens.
public getAccount(accountId: string): Promise<Account> source
Looks up a member's account by ID.
Params:
Name | Type | Attribute | Description |
accountId | string | accountId |
public getBlob(blobId: string): Promise<Blob> source
Downloads a blob from the server.
Params:
Name | Type | Attribute | Description |
blobId | string | ID of the blob |
public getProfile(id: string): Promise<Profile> source
Gets a member's public profile.
Params:
Name | Type | Attribute | Description |
id | string | member ID whose profile to get |
public getProfilePicture(id: string, size: ProfilePictureSize): Promise<Blob> source
Gets a member's public profile picture.
Params:
Name | Type | Attribute | Description |
id | string | member ID whose picture to get |
|
size | ProfilePictureSize | desired size category SMALL/MEDIUM/LARGE/ORIGINAL |
public getToken(tokenId: string): Promise<Token> source
Looks up a token by its ID.
Params:
Name | Type | Attribute | Description |
tokenId | string | ID of the token |
public getTransfer(transferId: string): Promise<Transfer> source
Looks up a transfer.
Params:
Name | Type | Attribute | Description |
transferId | string | ID to look up |
public getTransferTokens(offset: string, limit: number): Promise<object> source
Looks up all transfer tokens.
public getTransfers(tokenId: string, offset: string, limit: number): Promise<object> source
Looks up all of the member's transfers.
public redeemToken(token: Token | string, amount: number, currency: string, description: string, destinations: Array<TransferEndpoint>, refId: string): Promise<Transfer> source
Redeems a token.
Params:
Name | Type | Attribute | Description |
token | Token | string | token to redeem. Can also be a tokenId |
|
amount | number | amount to redeem |
|
currency | string | currency to redeem |
|
description | string | optional transfer description |
|
destinations | Array<TransferEndpoint> |
|
transfer destinations |
refId | string | ID that will be set on created Transfer Token uses this to detect duplicates caller might use this to recognize the transfer if param empty, transfer will have random refId |
public setProfile(profile: Profile): Promise<Profile> source
Replaces the authenticated member's public profile.
Params:
Name | Type | Attribute | Description |
profile | Profile | profile to set |
public setProfilePicture(type: string, data: ArrayBuffer | string): Promise<void> source
Uploads the authenticated member's public profile.
Params:
Name | Type | Attribute | Description |
type | string | MIME type |
|
data | ArrayBuffer | string | data in bytes, can be base64 string |
public storeTokenRequest(tokenRequest: TokenRequestBuilder): Promise<TokenRequest> source
Stores a request for a token. Called by a merchant or a TPP that wants access from a user.
Params:
Name | Type | Attribute | Description |
tokenRequest | TokenRequestBuilder | token request to store |