Account

Account

Service to interact with a customer's account

Constructor

new Account(options)

Creates an instance of the account client

Source:
Parameters:
Name Type Description
options Object

application config

Methods

getAccountBalance() → {Promise}

Get an account's balance

Source:
Parameters:
Name Type Description
parameters.apiUrl string

the API URL

parameters.accessToken string

the oauth bearer token

parameters.accountUid string

the account uid

Returns:
Type:
Promise
  • the http request promise

getAccountIdentifiers() → {Promise}

Get an account's bank identifiers

Source:
Parameters:
Name Type Description
parameters.apiUrl string

the API URL

parameters.accessToken string

the oauth bearer token

parameters.accountUid string

the account uid

Returns:
Type:
Promise
  • the http request promise

getAccounts() → {Promise}

Get an account holder's bank accounts

Source:
Parameters:
Name Type Description
parameters.apiUrl string

the API URL

parameters.accessToken string

the oauth bearer token

Returns:
Type:
Promise
  • the http request promise

getConfirmationOfFunds() → {Promise}

Get whether there are available funds for a requested amount

Source:
Parameters:
Name Type Description
parameters.apiUrl string

the API URL

parameters.accessToken string

the oauth bearer token

parameters.accountUid string

the account uid

parameters.targetAmountInMinorUnits number

the target amount in minor units

Returns:
Type:
Promise
  • the http request promise

getStatementForPeriod() → {Promise}

Download a statement for a given statement period

Source:
Parameters:
Name Type Attributes Description
parameters.apiUrl string

the API URL

parameters.accessToken string

the oauth bearer token

parameters.accountUid string

the account uid

parameters.yearMonth string <optional>

the statement period's year month (yyyy-MM)

parameters.format string <optional>

one of 'application/pdf' or 'text/csv'

parameters.responseType string <optional>

the axios responseType for the request

Returns:
Type:
Promise
  • the http request promise

getStatementForRange() → {Promise}

Download a statement for a given date range

Source:
Parameters:
Name Type Attributes Description
parameters.apiUrl string

the API URL

parameters.accessToken string

the oauth bearer token

parameters.accountUid string

the account uid

parameters.start string

the beginning of the statement date range (yyyy-MM-dd)

parameters.end string <optional>

the end of the statement date range (yyyy-MM-dd)

parameters.format string <optional>

one of 'application/pdf' or 'text/csv'

parameters.responseType string <optional>

the axios responseType for the request

Returns:
Type:
Promise
  • the http request promise

getStatementPeriods() → {Promise}

Get list of statement periods which are available for an account

Source:
Parameters:
Name Type Description
parameters.apiUrl string

the API URL

parameters.accessToken string

the oauth bearer token

parameters.accountUid string

the account uid

Returns:
Type:
Promise
  • the http request promise