Skip to content

Latest commit

 

History

History
174 lines (101 loc) · 4.04 KB

AccountsResource.md

File metadata and controls

174 lines (101 loc) · 4.04 KB

akahu - v1.15.3 / AccountsResource

Class: AccountsResource

Utilities for managing Akahu accounts that have been linked by users.

https://developers.akahu.nz/docs/accessing-account-data

Hierarchy

  • BaseResource

    AccountsResource

Table of contents

Methods

Methods

list

list(token): Promise<Account[]>

List all accounts that have been connected by the user associated with the specified token.

https://developers.akahu.nz/reference/get_accounts

Parameters

Name Type
token string

Returns

Promise<Account[]>


get

get(token, accountId): Promise<Account>

Get a single account that has been connected by the user associated with the specified token.

https://developers.akahu.nz/reference/get_accounts-id

Parameters

Name Type
token string
accountId string

Returns

Promise<Account>


listTransactions

listTransactions(token, accountId, query?): Promise<Paginated<Transaction>>

List transactions for a specified account.

https://developers.akahu.nz/reference/get_accounts-id-transactions

Parameters

Name Type
token string
accountId string
query TransactionQueryParams

Returns

Promise<Paginated<Transaction>>


listPendingTransactions

listPendingTransactions(token, accountId): Promise<PendingTransaction[]>

List pending transactions for a specified account.

https://developers.akahu.nz/reference/get_accounts-id-transactions-pending

Parameters

Name Type
token string
accountId string

Returns

Promise<PendingTransaction[]>


revoke

revoke(token, accountId): Promise<void>

Revoke a single account from the specified token.

After this call the token will no longer have access to the specified account or it's associated data, including transactions.

https://developers.akahu.nz/reference/delete_accounts-id

Parameters

Name Type
token string
accountId string

Returns

Promise<void>


refresh

refresh(token, accountId): Promise<void>

Refresh a single account that has been connected by the user associated with the specified token.

https://developers.akahu.nz/reference/post_refresh-id

Parameters

Name Type
token string
accountId string

Returns

Promise<void>


refreshAll

refreshAll(token): Promise<void>

Refresh all accounts that have been connected by the user associated with the specified token.

https://developers.akahu.nz/reference/post_refresh

Parameters

Name Type
token string

Returns

Promise<void>