-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathaggregate-balances.ts
109 lines (93 loc) · 3.08 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
109
// 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 card balance across all end-user accounts.
*/
list(
query?: AggregateBalanceListParams,
options?: Core.RequestOptions,
): Core.PagePromise<AggregateBalanceListResponsesSinglePage, AggregateBalanceListResponse>;
list(
options?: Core.RequestOptions,
): Core.PagePromise<AggregateBalanceListResponsesSinglePage, AggregateBalanceListResponse>;
list(
query: AggregateBalanceListParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
): Core.PagePromise<AggregateBalanceListResponsesSinglePage, AggregateBalanceListResponse> {
if (isRequestOptions(query)) {
return this.list({}, query);
}
return this._client.getAPIList('/v1/cards/aggregate_balances', AggregateBalanceListResponsesSinglePage, {
query,
...options,
});
}
}
export class AggregateBalanceListResponsesSinglePage extends SinglePage<AggregateBalanceListResponse> {}
/**
* Card Aggregate Balance across all end-user accounts
*/
export interface AggregateBalanceListResponse {
/**
* 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;
/**
* Globally unique identifier for the card that had its balance updated most
* recently
*/
last_card_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 {
/**
* Cardholder to retrieve aggregate balances for.
*/
account_token?: string;
/**
* Business to retrieve aggregate balances for.
*/
business_account_token?: string;
}
AggregateBalances.AggregateBalanceListResponsesSinglePage = AggregateBalanceListResponsesSinglePage;
export declare namespace AggregateBalances {
export {
type AggregateBalanceListResponse as AggregateBalanceListResponse,
AggregateBalanceListResponsesSinglePage as AggregateBalanceListResponsesSinglePage,
type AggregateBalanceListParams as AggregateBalanceListParams,
};
}