starkbank
Version:
SDK to facilitate Node integrations with Stark Bank
47 lines (42 loc) • 1.9 kB
TypeScript
declare module 'starkbank' {
export class Balance {
/**
*
* Balance object
*
* @description The Balance object displays the current balance of the workspace,
* which is the result of the sum of all transactions within this
* workspace. The balance is never generated by the user, but it
* can be retrieved to see the information available.
*
* Attributes (return-only):
* @param id [string]: unique id returned when Balance is created. ex: '5656565656565656'
* @param amount [integer]: current balance amount of the workspace in cents. ex: 200 (= R$ 2.00)
* @param currency [string]: currency of the current workspace. Expect others to be added eventually. ex: 'BRL'
* @param updated [string]: update datetime for the balance. ex: '2020-03-10 10:30:00.000'
*
*/
readonly id : string
readonly amount : number
readonly currency : string
readonly updated : string
constructor(id?: string | null, amount?: number | null, currency?: string | null, updated?: string | null);
}
export namespace balance {
/**
*
* Retrieve the Balance object
*
* @description Receive the Balance object linked to your workspace in the Stark Bank API
*
* Parameters (optional):
* @param user [Project object]: Project object. Not necessary if starkbank.user was set before function call
* @param user [Organization/Project object]: Organization or Project object. Not necessary if starkbank.user was set before function call
*
* Return:
* @returns Balance object with updated attributes
*
*/
export function get(params?: { user?: Project | Organization | null}): Promise<Balance>;
}
}