Skip to content

BkperApp

Extends

  • BkperApp

Properties

AccountType

AccountType: typeof AccountType;

Inherited from

Bkper.BkperApp.AccountType

BalanceType

BalanceType: typeof BalanceType;

Inherited from

Bkper.BkperApp.BalanceType

BotResponseType

BotResponseType: typeof BotResponseType;

Inherited from

Bkper.BkperApp.BotResponseType

DecimalSeparator

DecimalSeparator: typeof DecimalSeparator;

Inherited from

Bkper.BkperApp.DecimalSeparator

Month

Month: typeof Month;

Inherited from

Bkper.BkperApp.Month

Periodicity

Periodicity: typeof Periodicity;

Inherited from

Bkper.BkperApp.Periodicity

Permission

Permission: typeof Permission;

Inherited from

Bkper.BkperApp.Permission

TransactionStatus

TransactionStatus: typeof TransactionStatus;

Inherited from

Bkper.BkperApp.TransactionStatus

Methods

getBook()

getBook(id): Book;

Gets the [[Book]] with the specified bookId from url param.

This is the main Entry Point to start interacting with the bkper-gs library.

Example:

var book = BkperApp.getBook("agtzfmJrcGVyLWhyZHITCxIGTGVkZ2VyGICAgIDggqALDA");
book.record("#fuel for my Land Rover 126.50 28/01/2013");

Parameters

ParameterType
idstring

Returns

Book

Inherited from

Bkper.BkperApp.getBook

getBooks()

getBooks(): Book[];

Gets all [[Books]] the user has access.

Returns

Book[]

Inherited from

Bkper.BkperApp.getBooks

newAmount()

newAmount(n): Amount;

Create a new [[Amount]] wrapping a given number, or arbitrary-precision math calculations.

Parameters

ParameterType
nstring | number | Amount

Returns

Amount

Inherited from

Bkper.BkperApp.newAmount

normalizeName()

normalizeName(name): string;

Normalize a name

Parameters

ParameterType
namestring

Returns

string

Inherited from

Bkper.BkperApp.normalizeName

setAgentId()

setAgentId(agentId): void;

Sets the agent ID to identify the calling agent for attribution purposes.

This ID is sent via the bkper-agent-id header with each API request, allowing the server to attribute actions to the correct agent.

Parameters

ParameterType
agentIdstring | null

Returns

void

Inherited from

Bkper.BkperApp.setAgentId

setApiKey()

setApiKey(key): void;

Sets the API key to identify the agent.

API keys are intended for agent identification only, not for authentication. Learn more

See how to create your api key here.

Parameters

ParameterType
keystring | null

Returns

void

Inherited from

Bkper.BkperApp.setApiKey

setOAuthTokenProvider()

setOAuthTokenProvider(tokenProvider): void;

Sets the [[OAuthTokenProvider]].

If none set, the default built-in ScriptApp will be used.

Parameters

ParameterType
tokenProviderOAuthTokenProvider

Returns

void

Inherited from

Bkper.BkperApp.setOAuthTokenProvider