-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathaggregate-balances.ts
108 lines (92 loc) · 2.97 KB
/
aggregate-balances.ts
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
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../resource';
import { isRequestOptions } from '../core';
import * as Core from '../core';
import { SinglePage } from '../pagination';
export class AggregateBalances extends APIResource {
/**
* Get the aggregated balance across all end-user accounts by financial account
* type
*/
list(
query?: AggregateBalanceListParams,
options?: Core.RequestOptions,
): Core.PagePromise<AggregateBalancesSinglePage, AggregateBalance>;
list(options?: Core.RequestOptions): Core.PagePromise<AggregateBalancesSinglePage, AggregateBalance>;
list(
query: AggregateBalanceListParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
): Core.PagePromise<AggregateBalancesSinglePage, AggregateBalance> {
if (isRequestOptions(query)) {
return this.list({}, query);
}
return this._client.getAPIList('/v1/aggregate_balances', AggregateBalancesSinglePage, {
query,
...options,
});
}
}
export class AggregateBalancesSinglePage extends SinglePage<AggregateBalance> {}
/**
* Aggregate Balance across all end-user accounts
*/
export interface AggregateBalance {
/**
* 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-digit alphabetic ISO 4217 code for the local currency of the balance.
*/
currency: string;
/**
* Type of financial account
*/
financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE';
/**
* Globally unique identifier for the financial account that had its balance
* updated most recently
*/
last_financial_account_token: string;
/**
* Globally unique identifier for the last transaction event that impacted this
* balance
*/
last_transaction_event_token: string;
/**
* Globally unique identifier for the last 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 AggregateBalanceListParams {
/**
* Get the aggregate balance for a given Financial Account type.
*/
financial_account_type?: 'ISSUING' | 'OPERATING' | 'RESERVE';
}
AggregateBalances.AggregateBalancesSinglePage = AggregateBalancesSinglePage;
export declare namespace AggregateBalances {
export {
type AggregateBalance as AggregateBalance,
AggregateBalancesSinglePage as AggregateBalancesSinglePage,
type AggregateBalanceListParams as AggregateBalanceListParams,
};
}