-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathbalances.ts
More file actions
109 lines (91 loc) · 2.73 KB
/
balances.ts
File metadata and controls
109 lines (91 loc) · 2.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../core/resource';
import { PagePromise, SinglePage } from '../core/pagination';
import { RequestOptions } from '../internal/request-options';
export class Balances extends APIResource {
/**
* Get the balances for a program, business, or a given end-user account
*/
list(
query: BalanceListParams | null | undefined = {},
options?: RequestOptions,
): PagePromise<BalancesSinglePage, Balance> {
return this._client.getAPIList('/v1/balances', SinglePage<Balance>, { query, ...options });
}
}
export type BalancesSinglePage = SinglePage<Balance>;
/**
* Balance
*/
export interface Balance {
/**
* Funds available for spend in the currency's smallest unit (e.g., cents for USD)
*/
available_amount: number;
/**
* Date and time for when the balance was first created.
*/
created: string;
/**
* 3-character alphabetic ISO 4217 code for the local currency of the balance.
*/
currency: string;
/**
* Globally unique identifier for the financial account that holds this balance.
*/
financial_account_token: string;
/**
* Type of financial account.
*/
financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY';
/**
* Globally unique identifier for the last financial transaction event that
* impacted this balance.
*/
last_transaction_event_token: string;
/**
* Globally unique identifier for the last financial transaction that impacted this
* balance.
*/
last_transaction_token: string;
/**
* Funds not available for spend due to card authorizations or pending ACH release.
* Shown in the currency's smallest unit (e.g., cents for USD).
*/
pending_amount: number;
/**
* The sum of available and pending balance in the currency's smallest unit (e.g.,
* cents for USD).
*/
total_amount: number;
/**
* Date and time for when the balance was last updated.
*/
updated: string;
}
export interface BalanceListParams {
/**
* List balances for all financial accounts of a given account_token.
*/
account_token?: string;
/**
* UTC date and time of the balances to retrieve. Defaults to latest available
* balances
*/
balance_date?: string;
/**
* List balances for all financial accounts of a given business_account_token.
*/
business_account_token?: string;
/**
* List balances for a given Financial Account type.
*/
financial_account_type?: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY';
}
export declare namespace Balances {
export {
type Balance as Balance,
type BalancesSinglePage as BalancesSinglePage,
type BalanceListParams as BalanceListParams,
};
}