-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsettlement.ts
52 lines (46 loc) · 1.75 KB
/
settlement.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
// 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 * as ReportsAPI from './reports';
import { SettlementDetailsCursorPage } from './reports';
import { type CursorPageParams } from '../../pagination';
export class Settlement extends APIResource {
/**
* List details.
*/
listDetails(
reportDate: string,
query?: SettlementListDetailsParams,
options?: Core.RequestOptions,
): Core.PagePromise<SettlementDetailsCursorPage, ReportsAPI.SettlementDetail>;
listDetails(
reportDate: string,
options?: Core.RequestOptions,
): Core.PagePromise<SettlementDetailsCursorPage, ReportsAPI.SettlementDetail>;
listDetails(
reportDate: string,
query: SettlementListDetailsParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
): Core.PagePromise<SettlementDetailsCursorPage, ReportsAPI.SettlementDetail> {
if (isRequestOptions(query)) {
return this.listDetails(reportDate, {}, query);
}
return this._client.getAPIList(
`/v1/reports/settlement/details/${reportDate}`,
SettlementDetailsCursorPage,
{ query, ...options },
);
}
/**
* Get the settlement report for a specified report date.
*/
summary(reportDate: string, options?: Core.RequestOptions): Core.APIPromise<ReportsAPI.SettlementReport> {
return this._client.get(`/v1/reports/settlement/summary/${reportDate}`, options);
}
}
export interface SettlementListDetailsParams extends CursorPageParams {}
export declare namespace Settlement {
export { type SettlementListDetailsParams as SettlementListDetailsParams };
}
export { SettlementDetailsCursorPage };