-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathreports.ts
More file actions
366 lines (302 loc) · 9.2 KB
/
reports.ts
File metadata and controls
366 lines (302 loc) · 9.2 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../core/resource';
import * as SettlementAPI from './settlement/settlement';
import { Settlement, SettlementListDetailsParams } from './settlement/settlement';
import { CursorPage } from '../../core/pagination';
export class Reports extends APIResource {
settlement: SettlementAPI.Settlement = new SettlementAPI.Settlement(this._client);
}
export type SettlementDetailsCursorPage = CursorPage<SettlementDetail>;
export type NetworkTotalsCursorPage = CursorPage<NetworkTotal>;
export interface NetworkTotal {
/**
* Globally unique identifier.
*/
token: string;
amounts: NetworkTotal.Amounts;
/**
* RFC 3339 timestamp for when the record was created. UTC time zone.
*/
created: string;
/**
* 3-character alphabetic ISO 4217 code.
*/
currency: string;
/**
* The institution that activity occurred on. For Mastercard: ICA (Interbank Card
* Association). For Maestro: institution ID. For Visa: lowest level SRE
* (Settlement Reporting Entity).
*/
institution_id: string;
/**
* Indicates that all settlement records related to this Network Total are
* available in the details endpoint.
*/
is_complete: boolean;
/**
* Card network where the transaction took place. AMEX, VISA, MASTERCARD, MAESTRO,
* or INTERLINK.
*/
network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK';
/**
* Date that the network total record applies to. YYYY-MM-DD format.
*/
report_date: string;
/**
* The institution responsible for settlement. For Mastercard: same as
* `institution_id`. For Maestro: billing ICA. For Visa: Funds Transfer SRE
* (FTSRE).
*/
settlement_institution_id: string;
/**
* Settlement service.
*/
settlement_service: string;
/**
* RFC 3339 timestamp for when the record was last updated. UTC time zone.
*/
updated: string;
/**
* The clearing cycle that the network total record applies to. Mastercard only.
*/
cycle?: number;
}
export namespace NetworkTotal {
export interface Amounts {
/**
* Total settlement amount excluding interchange, in currency's smallest unit.
*/
gross_settlement: number;
/**
* Interchange amount, in currency's smallest unit.
*/
interchange_fees: number;
/**
* `gross_settlement` net of `interchange_fees` and `visa_charges` (if applicable),
* in currency's smallest unit.
*/
net_settlement: number;
/**
* Charges specific to Visa/Interlink, in currency's smallest unit.
*/
visa_charges?: number;
}
}
export interface SettlementDetail {
/**
* Globally unique identifier denoting the Settlement Detail.
*/
token: string;
/**
* Globally unique identifier denoting the account that the associated transaction
* occurred on.
*/
account_token: string;
/**
* Globally unique identifier denoting the card program that the associated
* transaction occurred on.
*/
card_program_token: string;
/**
* Globally unique identifier denoting the card that the associated transaction
* occurred on.
*/
card_token: string;
/**
* Date and time when the transaction first occurred. UTC time zone.
*/
created: string;
/**
* Three-character alphabetic ISO 4217 code.
*/
currency: string;
/**
* The total gross amount of disputes settlements.
*/
disputes_gross_amount: number;
/**
* Globally unique identifiers denoting the Events associated with this settlement.
*/
event_tokens: Array<string>;
/**
* The most granular ID the network settles with (e.g., ICA for Mastercard, FTSRE
* for Visa).
*/
institution: string;
/**
* The total amount of interchange in six-digit extended precision.
*/
interchange_fee_extended_precision: number;
/**
* The total amount of interchange.
*/
interchange_gross_amount: number;
/**
* Card network where the transaction took place.
*/
network: 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA';
/**
* The total gross amount of other fees by type.
*/
other_fees_details: SettlementDetail.OtherFeesDetails;
/**
* Total amount of gross other fees outside of interchange.
*/
other_fees_gross_amount: number;
/**
* Date of when the report was first generated.
*/
report_date: string;
/**
* Date of when money movement is triggered for the transaction. One exception
* applies - for Mastercard dual message settlement, this is the settlement
* advisement date, which is distinct from the date of money movement.
*/
settlement_date: string;
/**
* Globally unique identifier denoting the associated Transaction object.
*/
transaction_token: string;
/**
* The total amount of settlement impacting transactions (excluding interchange,
* fees, and disputes).
*/
transactions_gross_amount: number;
/**
* The type of settlement record.
*/
type:
| 'ADJUSTMENT'
| 'ARBITRATION'
| 'CHARGEBACK'
| 'CLEARING'
| 'COLLABORATION'
| 'FEE'
| 'FINANCIAL'
| 'NON-FINANCIAL'
| 'PREARBITRATION'
| 'REPRESENTMENT';
/**
* Date and time when the transaction first occurred. UTC time zone.
*/
updated: string;
/**
* Network's description of a fee, only present on records with type `FEE`.
*/
fee_description?: string;
}
export namespace SettlementDetail {
/**
* The total gross amount of other fees by type.
*/
export interface OtherFeesDetails {
ISA?: number;
}
}
export interface SettlementReport {
/**
* Date and time when the transaction first occurred. UTC time zone.
*/
created: string;
/**
* @deprecated 3-character alphabetic ISO 4217 code. (This field is deprecated and
* will be removed in a future version of the API.)
*/
currency: string;
details: Array<SettlementSummaryDetails>;
/**
* @deprecated The total gross amount of disputes settlements. (This field is
* deprecated and will be removed in a future version of the API. To compute total
* amounts, Lithic recommends that customers sum the relevant settlement amounts
* found within `details`.)
*/
disputes_gross_amount: number;
/**
* @deprecated The total amount of interchange. (This field is deprecated and will
* be removed in a future version of the API. To compute total amounts, Lithic
* recommends that customers sum the relevant settlement amounts found within
* `details`.)
*/
interchange_gross_amount: number;
/**
* Indicates that all data expected on the given report date is available.
*/
is_complete: boolean;
/**
* @deprecated Total amount of gross other fees outside of interchange. (This field
* is deprecated and will be removed in a future version of the API. To compute
* total amounts, Lithic recommends that customers sum the relevant settlement
* amounts found within `details`.)
*/
other_fees_gross_amount: number;
/**
* Date of when the report was first generated.
*/
report_date: string;
/**
* @deprecated The total net amount of cash moved. (net value of
* settled_gross_amount, interchange, fees). (This field is deprecated and will be
* removed in a future version of the API. To compute total amounts, Lithic
* recommends that customers sum the relevant settlement amounts found within
* `details`.)
*/
settled_net_amount: number;
/**
* @deprecated The total amount of settlement impacting transactions (excluding
* interchange, fees, and disputes). (This field is deprecated and will be removed
* in a future version of the API. To compute total amounts, Lithic recommends that
* customers sum the relevant settlement amounts found within `details`.)
*/
transactions_gross_amount: number;
/**
* Date and time when the transaction first occurred. UTC time zone.
*/
updated: string;
}
export interface SettlementSummaryDetails {
/**
* 3-character alphabetic ISO 4217 code.
*/
currency?: string;
/**
* The total gross amount of disputes settlements.
*/
disputes_gross_amount?: number;
/**
* The most granular ID the network settles with (e.g., ICA for Mastercard, FTSRE
* for Visa).
*/
institution?: string;
/**
* The total amount of interchange.
*/
interchange_gross_amount?: number;
/**
* Card network where the transaction took place
*/
network?: 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA';
/**
* Total amount of gross other fees outside of interchange.
*/
other_fees_gross_amount?: number;
/**
* The total net amount of cash moved. (net value of settled_gross_amount,
* interchange, fees).
*/
settled_net_amount?: number;
/**
* The total amount of settlement impacting transactions (excluding interchange,
* fees, and disputes).
*/
transactions_gross_amount?: number;
}
Reports.Settlement = Settlement;
export declare namespace Reports {
export {
type NetworkTotal as NetworkTotal,
type SettlementDetail as SettlementDetail,
type SettlementReport as SettlementReport,
type SettlementSummaryDetails as SettlementSummaryDetails,
};
export { Settlement as Settlement, type SettlementListDetailsParams as SettlementListDetailsParams };
}