@tolt/api 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/errors/ContentTooLargeError.d.ts +7 -0
- package/dist/api/errors/ContentTooLargeError.js +17 -0
- package/dist/api/errors/index.d.ts +1 -0
- package/dist/api/errors/index.js +1 -0
- package/dist/api/resources/clicks/client/Client.d.ts +6 -1
- package/dist/api/resources/clicks/client/Client.js +15 -4
- package/dist/api/resources/clicks/client/requests/GetClicksRequest.d.ts +1 -1
- package/dist/api/resources/clicks/client/requests/ListClicksRequest.d.ts +10 -5
- package/dist/api/resources/clicks/types/ListClicksRequestOrder.d.ts +1 -0
- package/dist/api/resources/clicks/types/ListClicksRequestOrder.js +1 -0
- package/dist/api/resources/clicks/types/ListClicksRequestSort.d.ts +1 -1
- package/dist/api/resources/clicks/types/ListClicksRequestSort.js +1 -1
- package/dist/api/resources/commissions/client/Client.d.ts +29 -7
- package/dist/api/resources/commissions/client/Client.js +56 -16
- package/dist/api/resources/commissions/client/requests/ApproveCommissionsRequest.d.ts +1 -1
- package/dist/api/resources/commissions/client/requests/BulkApproveCommissionsRequest.d.ts +2 -2
- package/dist/api/resources/commissions/client/requests/BulkDeclineCommissionsRequest.d.ts +2 -2
- package/dist/api/resources/commissions/client/requests/DeclineCommissionsRequest.d.ts +1 -1
- package/dist/api/resources/commissions/client/requests/DeleteCommissionsRequest.d.ts +1 -1
- package/dist/api/resources/commissions/client/requests/GetCommissionsRequest.d.ts +1 -1
- package/dist/api/resources/commissions/client/requests/ListCommissionsRequest.d.ts +14 -5
- package/dist/api/resources/commissions/client/requests/UpdateCommissionsRequest.d.ts +19 -4
- package/dist/api/resources/commissions/client/requests/UpdateCommissionsRequest.js +8 -1
- package/dist/api/resources/commissions/client/requests/index.d.ts +1 -1
- package/dist/api/resources/commissions/client/requests/index.js +1 -1
- package/dist/api/resources/commissions/types/ListCommissionsRequestOrder.d.ts +1 -0
- package/dist/api/resources/commissions/types/ListCommissionsRequestOrder.js +1 -0
- package/dist/api/resources/commissions/types/ListCommissionsRequestSort.d.ts +1 -1
- package/dist/api/resources/commissions/types/ListCommissionsRequestSort.js +1 -1
- package/dist/api/resources/customers/client/Client.d.ts +27 -4
- package/dist/api/resources/customers/client/Client.js +42 -9
- package/dist/api/resources/customers/client/requests/CreateCustomersRequest.d.ts +20 -2
- package/dist/api/resources/customers/client/requests/CreateCustomersRequest.js +1 -0
- package/dist/api/resources/customers/client/requests/DeleteCustomersRequest.d.ts +1 -1
- package/dist/api/resources/customers/client/requests/GetCustomersRequest.d.ts +1 -1
- package/dist/api/resources/customers/client/requests/ListCustomersRequest.d.ts +14 -5
- package/dist/api/resources/customers/client/requests/UpdateCustomersRequest.d.ts +15 -2
- package/dist/api/resources/customers/client/requests/UpdateCustomersRequest.js +1 -0
- package/dist/api/resources/customers/types/ListCustomersRequestOrder.d.ts +1 -0
- package/dist/api/resources/customers/types/ListCustomersRequestOrder.js +1 -0
- package/dist/api/resources/customers/types/ListCustomersRequestSort.d.ts +1 -1
- package/dist/api/resources/customers/types/ListCustomersRequestSort.js +1 -1
- package/dist/api/resources/customers/types/ListCustomersRequestStatus.d.ts +1 -0
- package/dist/api/resources/customers/types/ListCustomersRequestStatus.js +1 -0
- package/dist/api/resources/embed/client/Client.d.ts +5 -2
- package/dist/api/resources/embed/client/Client.js +9 -4
- package/dist/api/resources/embed/client/index.d.ts +1 -1
- package/dist/api/resources/embed/client/index.js +1 -1
- package/dist/api/resources/embed/types/CreateTokenEmbedRequest.d.ts +1 -0
- package/dist/api/resources/embed/types/index.d.ts +1 -0
- package/dist/api/resources/embed/types/index.js +1 -0
- package/dist/api/resources/flows/client/Client.d.ts +7 -1
- package/dist/api/resources/flows/client/Client.js +13 -3
- package/dist/api/resources/flows/client/requests/GetFlowsRequest.d.ts +1 -1
- package/dist/api/resources/flows/client/requests/ListFlowsRequest.d.ts +13 -5
- package/dist/api/resources/flows/types/ListFlowsRequestActive.d.ts +1 -0
- package/dist/api/resources/flows/types/ListFlowsRequestActive.js +1 -0
- package/dist/api/resources/flows/types/ListFlowsRequestOrder.d.ts +1 -0
- package/dist/api/resources/flows/types/ListFlowsRequestOrder.js +1 -0
- package/dist/api/resources/flows/types/ListFlowsRequestSort.d.ts +1 -1
- package/dist/api/resources/flows/types/ListFlowsRequestSort.js +1 -1
- package/dist/api/resources/groups/client/Client.d.ts +7 -1
- package/dist/api/resources/groups/client/Client.js +13 -3
- package/dist/api/resources/groups/client/requests/GetGroupsRequest.d.ts +1 -1
- package/dist/api/resources/groups/client/requests/ListGroupsRequest.d.ts +10 -5
- package/dist/api/resources/groups/types/ListGroupsRequestDefault.d.ts +1 -0
- package/dist/api/resources/groups/types/ListGroupsRequestDefault.js +1 -0
- package/dist/api/resources/groups/types/ListGroupsRequestOrder.d.ts +1 -0
- package/dist/api/resources/groups/types/ListGroupsRequestOrder.js +1 -0
- package/dist/api/resources/groups/types/ListGroupsRequestSort.d.ts +1 -1
- package/dist/api/resources/groups/types/ListGroupsRequestSort.js +1 -1
- package/dist/api/resources/index.d.ts +0 -1
- package/dist/api/resources/index.js +0 -1
- package/dist/api/resources/links/client/Client.d.ts +17 -5
- package/dist/api/resources/links/client/Client.js +37 -11
- package/dist/api/resources/links/client/requests/CreateLinksRequest.d.ts +6 -2
- package/dist/api/resources/links/client/requests/DeleteLinksRequest.d.ts +1 -1
- package/dist/api/resources/links/client/requests/GetLinksRequest.d.ts +1 -1
- package/dist/api/resources/links/client/requests/ListLinksRequest.d.ts +12 -5
- package/dist/api/resources/links/client/requests/UpdateLinksRequest.d.ts +6 -2
- package/dist/api/resources/links/types/ListLinksRequestOrder.d.ts +1 -0
- package/dist/api/resources/links/types/ListLinksRequestOrder.js +1 -0
- package/dist/api/resources/links/types/ListLinksRequestSort.d.ts +1 -1
- package/dist/api/resources/links/types/ListLinksRequestSort.js +1 -1
- package/dist/api/resources/partners/client/Client.d.ts +39 -10
- package/dist/api/resources/partners/client/Client.js +66 -21
- package/dist/api/resources/partners/client/requests/ApprovePartnersRequest.d.ts +1 -1
- package/dist/api/resources/partners/client/requests/BulkApprovePartnersRequest.d.ts +2 -2
- package/dist/api/resources/partners/client/requests/BulkRejectPartnersRequest.d.ts +4 -2
- package/dist/api/resources/partners/client/requests/CreatePartnersRequest.d.ts +21 -7
- package/dist/api/resources/partners/client/requests/CreatePartnersRequest.js +1 -0
- package/dist/api/resources/partners/client/requests/GetPartnersRequest.d.ts +1 -1
- package/dist/api/resources/partners/client/requests/ListPartnersRequest.d.ts +11 -5
- package/dist/api/resources/partners/client/requests/RejectPartnersRequest.d.ts +2 -1
- package/dist/api/resources/partners/client/requests/SuspendPartnersRequest.d.ts +2 -1
- package/dist/api/resources/partners/client/requests/UpdatePartnersRequest.d.ts +10 -2
- package/dist/api/resources/partners/types/ListPartnersRequestOrder.d.ts +1 -0
- package/dist/api/resources/partners/types/ListPartnersRequestOrder.js +1 -0
- package/dist/api/resources/partners/types/ListPartnersRequestSort.d.ts +1 -1
- package/dist/api/resources/partners/types/ListPartnersRequestSort.js +1 -1
- package/dist/api/resources/partners/types/ListPartnersRequestStatus.d.ts +1 -0
- package/dist/api/resources/partners/types/ListPartnersRequestStatus.js +1 -0
- package/dist/api/resources/programs/client/Client.d.ts +7 -1
- package/dist/api/resources/programs/client/Client.js +13 -3
- package/dist/api/resources/programs/client/requests/GetProgramsRequest.d.ts +1 -1
- package/dist/api/resources/programs/client/requests/ListProgramsRequest.d.ts +8 -5
- package/dist/api/resources/programs/types/ListProgramsRequestOrder.d.ts +1 -0
- package/dist/api/resources/programs/types/ListProgramsRequestOrder.js +1 -0
- package/dist/api/resources/programs/types/ListProgramsRequestSort.d.ts +1 -1
- package/dist/api/resources/programs/types/ListProgramsRequestSort.js +1 -1
- package/dist/api/resources/promotionCodes/client/Client.d.ts +27 -5
- package/dist/api/resources/promotionCodes/client/Client.js +46 -10
- package/dist/api/resources/promotionCodes/client/requests/CreatePromotionCodesRequest.d.ts +9 -2
- package/dist/api/resources/promotionCodes/client/requests/CreatePromotionCodesRequest.js +1 -0
- package/dist/api/resources/promotionCodes/client/requests/DeletePromotionCodesRequest.d.ts +1 -1
- package/dist/api/resources/promotionCodes/client/requests/GetPromotionCodesRequest.d.ts +1 -1
- package/dist/api/resources/promotionCodes/client/requests/ListPromotionCodesRequest.d.ts +11 -5
- package/dist/api/resources/promotionCodes/client/requests/UpdatePromotionCodesRequest.d.ts +8 -1
- package/dist/api/resources/promotionCodes/client/requests/UpdatePromotionCodesRequest.js +1 -0
- package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestOrder.d.ts +1 -0
- package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestOrder.js +1 -0
- package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestSort.d.ts +1 -1
- package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestSort.js +1 -1
- package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestType.d.ts +1 -0
- package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestType.js +1 -0
- package/dist/api/resources/reports/client/Client.d.ts +15 -0
- package/dist/api/resources/reports/client/Client.js +30 -5
- package/dist/api/resources/reports/client/requests/CustomerStatsReportsRequest.d.ts +3 -0
- package/dist/api/resources/reports/client/requests/LinksReportsRequest.d.ts +8 -0
- package/dist/api/resources/reports/client/requests/OverviewReportsRequest.d.ts +3 -0
- package/dist/api/resources/reports/client/requests/PartnersReportsRequest.d.ts +8 -0
- package/dist/api/resources/reports/client/requests/TimeseriesReportsRequest.d.ts +5 -0
- package/dist/api/resources/reports/types/LinksReportsRequestOrder.d.ts +1 -0
- package/dist/api/resources/reports/types/LinksReportsRequestOrder.js +1 -0
- package/dist/api/resources/reports/types/LinksReportsRequestSort.d.ts +1 -0
- package/dist/api/resources/reports/types/LinksReportsRequestSort.js +1 -0
- package/dist/api/resources/reports/types/PartnersReportsRequestOrder.d.ts +1 -0
- package/dist/api/resources/reports/types/PartnersReportsRequestOrder.js +1 -0
- package/dist/api/resources/reports/types/PartnersReportsRequestSort.d.ts +1 -0
- package/dist/api/resources/reports/types/PartnersReportsRequestSort.js +1 -0
- package/dist/api/resources/reports/types/TimeseriesReportsRequestGranularity.d.ts +1 -0
- package/dist/api/resources/reports/types/TimeseriesReportsRequestGranularity.js +1 -0
- package/dist/api/resources/transactions/client/Client.d.ts +30 -7
- package/dist/api/resources/transactions/client/Client.js +53 -14
- package/dist/api/resources/transactions/client/requests/CreateTransactionsRequest.d.ts +17 -3
- package/dist/api/resources/transactions/client/requests/DeleteTransactionsRequest.d.ts +1 -1
- package/dist/api/resources/transactions/client/requests/GetTransactionsRequest.d.ts +1 -1
- package/dist/api/resources/transactions/client/requests/ListTransactionsRequest.d.ts +12 -5
- package/dist/api/resources/transactions/client/requests/RefundTransactionsRequest.d.ts +1 -1
- package/dist/api/resources/transactions/client/requests/RerunFlowsTransactionsRequest.d.ts +1 -1
- package/dist/api/resources/transactions/client/requests/UpdateTransactionsRequest.d.ts +13 -2
- package/dist/api/resources/transactions/types/ListTransactionsRequestOrder.d.ts +1 -0
- package/dist/api/resources/transactions/types/ListTransactionsRequestOrder.js +1 -0
- package/dist/api/resources/transactions/types/ListTransactionsRequestSort.d.ts +1 -1
- package/dist/api/resources/transactions/types/ListTransactionsRequestSort.js +1 -1
- package/dist/api/types/Commission.d.ts +1 -1
- package/dist/api/types/Customer.d.ts +2 -2
- package/dist/api/types/Error_.d.ts +1 -0
- package/dist/api/types/Error_.js +1 -0
- package/dist/environments.d.ts +2 -2
- package/dist/environments.js +1 -1
- package/package.json +1 -1
- package/dist/api/resources/embed/client/requests/CreateTokenEmbedRequest.d.ts +0 -14
- package/dist/api/resources/embed/client/requests/index.d.ts +0 -1
- package/dist/api/resources/embed/client/requests/index.js +0 -1
- /package/dist/api/resources/embed/{client/requests → types}/CreateTokenEmbedRequest.js +0 -0
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
* {}
|
|
4
4
|
*/
|
|
5
5
|
export interface OverviewReportsRequest {
|
|
6
|
+
/** Limit to one program, by its id (prg_...) as returned when listing programs. */
|
|
6
7
|
program_id?: string;
|
|
8
|
+
/** Earliest day to include, by creation date. Leave it out for no lower bound. */
|
|
7
9
|
start_date?: string;
|
|
10
|
+
/** Latest day to include, by creation date; the whole day counts. Leave it out for no upper bound. */
|
|
8
11
|
end_date?: string;
|
|
9
12
|
}
|
|
@@ -4,12 +4,20 @@ import type * as ToltApi from "../../../../index.js";
|
|
|
4
4
|
* {}
|
|
5
5
|
*/
|
|
6
6
|
export interface PartnersReportsRequest {
|
|
7
|
+
/** Limit to one program, by its id (prg_...) as returned when listing programs. */
|
|
7
8
|
program_id?: string;
|
|
9
|
+
/** Earliest day to include, by creation date (customers by the day they became active). Leave it out for no lower bound. */
|
|
8
10
|
start_date?: string;
|
|
11
|
+
/** Latest day to include, by creation date (customers by the day they became active); the whole day counts. Leave it out for no upper bound. */
|
|
9
12
|
end_date?: string;
|
|
13
|
+
/** Only include transactions and commissions in this currency, such as USD; matching ignores case. Rows without their own currency use their program's. */
|
|
10
14
|
currency?: string;
|
|
15
|
+
/** How many rows to return in one page. */
|
|
11
16
|
limit?: number;
|
|
17
|
+
/** How many rows to skip before this page begins. */
|
|
12
18
|
offset?: number | null;
|
|
19
|
+
/** Metric to rank by, computed over the date window. */
|
|
13
20
|
sort?: ToltApi.PartnersReportsRequestSort;
|
|
21
|
+
/** Ranking direction: desc puts the highest values first. */
|
|
14
22
|
order?: ToltApi.PartnersReportsRequestOrder;
|
|
15
23
|
}
|
|
@@ -4,9 +4,14 @@ import type * as ToltApi from "../../../../index.js";
|
|
|
4
4
|
* {}
|
|
5
5
|
*/
|
|
6
6
|
export interface TimeseriesReportsRequest {
|
|
7
|
+
/** Limit to one program, by its id (prg_...) as returned when listing programs. */
|
|
7
8
|
program_id?: string;
|
|
9
|
+
/** Earliest day to include, by creation date (customers by the day they became active). Leave it out for no lower bound. */
|
|
8
10
|
start_date?: string;
|
|
11
|
+
/** Latest day to include, by creation date (customers by the day they became active); the whole day counts. Leave it out for no upper bound. */
|
|
9
12
|
end_date?: string;
|
|
13
|
+
/** Bucket size of the series; weeks start on Monday, months on the 1st, and each bucket is labeled with its first day. */
|
|
10
14
|
granularity?: ToltApi.TimeseriesReportsRequestGranularity;
|
|
15
|
+
/** Only include transactions and commissions in this currency, such as USD; matching ignores case. Rows without their own currency use their program's. */
|
|
11
16
|
currency?: string;
|
|
12
17
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
/** Bucket size of the series; weeks start on Monday, months on the 1st, and each bucket is labeled with its first day. */
|
|
2
3
|
export const TimeseriesReportsRequestGranularity = {
|
|
3
4
|
Day: "day",
|
|
4
5
|
Week: "week",
|
|
@@ -11,11 +11,14 @@ export declare class TransactionsClient {
|
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<TransactionsClient.Options>;
|
|
12
12
|
constructor(options: TransactionsClient.Options);
|
|
13
13
|
/**
|
|
14
|
+
* Lists transactions. Filter by program, partner, customer or status, and page with cursors.
|
|
15
|
+
*
|
|
14
16
|
* @param {ToltApi.ListTransactionsRequest} request
|
|
15
17
|
* @param {TransactionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
16
18
|
*
|
|
17
19
|
* @throws {@link ToltApi.BadRequestError}
|
|
18
20
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
21
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
19
22
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
20
23
|
* @throws {@link errors.ToltApiError}
|
|
21
24
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
@@ -33,36 +36,48 @@ export declare class TransactionsClient {
|
|
|
33
36
|
*
|
|
34
37
|
* @throws {@link ToltApi.BadRequestError}
|
|
35
38
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
39
|
+
* @throws {@link ToltApi.ConflictError}
|
|
40
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
36
41
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
37
42
|
* @throws {@link errors.ToltApiError}
|
|
38
43
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
39
44
|
*
|
|
40
45
|
* @example
|
|
41
46
|
* await client.transactions.create({
|
|
42
|
-
*
|
|
43
|
-
*
|
|
47
|
+
* product_id: "prod_pro",
|
|
48
|
+
* product_name: "Pro plan",
|
|
49
|
+
* amount: 5000,
|
|
50
|
+
* customer_id: "cus_LBfjvtfct9pVUeLojMHiGnXv",
|
|
51
|
+
* billing_type: "subscription",
|
|
52
|
+
* interval: "month",
|
|
53
|
+
* source: "api"
|
|
44
54
|
* })
|
|
45
55
|
*/
|
|
46
56
|
create(request: ToltApi.CreateTransactionsRequest, requestOptions?: TransactionsClient.RequestOptions): core.HttpResponsePromise<ToltApi.CreateTransactionsResponse>;
|
|
47
57
|
private __create;
|
|
48
58
|
/**
|
|
59
|
+
* Gets a transaction by ID, with its amount, status, billing details, products and the customer it belongs to.
|
|
60
|
+
*
|
|
49
61
|
* @param {ToltApi.GetTransactionsRequest} request
|
|
50
62
|
* @param {TransactionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
51
63
|
*
|
|
52
64
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
53
65
|
* @throws {@link ToltApi.NotFoundError}
|
|
66
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
54
67
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
55
68
|
* @throws {@link errors.ToltApiError}
|
|
56
69
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
57
70
|
*
|
|
58
71
|
* @example
|
|
59
72
|
* await client.transactions.get({
|
|
60
|
-
* id: "
|
|
73
|
+
* id: "txn_fB3egT1sKNVNu3ZYuU1ypYDA"
|
|
61
74
|
* })
|
|
62
75
|
*/
|
|
63
76
|
get(request: ToltApi.GetTransactionsRequest, requestOptions?: TransactionsClient.RequestOptions): core.HttpResponsePromise<ToltApi.GetTransactionsResponse>;
|
|
64
77
|
private __get;
|
|
65
78
|
/**
|
|
79
|
+
* Updates a transaction's amount, status, billing or product details. Refunded transactions cannot be modified.
|
|
80
|
+
*
|
|
66
81
|
* @param {ToltApi.UpdateTransactionsRequest} request
|
|
67
82
|
* @param {TransactionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
68
83
|
*
|
|
@@ -70,31 +85,37 @@ export declare class TransactionsClient {
|
|
|
70
85
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
71
86
|
* @throws {@link ToltApi.NotFoundError}
|
|
72
87
|
* @throws {@link ToltApi.ConflictError}
|
|
88
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
73
89
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
74
90
|
* @throws {@link errors.ToltApiError}
|
|
75
91
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
76
92
|
*
|
|
77
93
|
* @example
|
|
78
94
|
* await client.transactions.update({
|
|
79
|
-
* id: "
|
|
95
|
+
* id: "txn_fB3egT1sKNVNu3ZYuU1ypYDA",
|
|
96
|
+
* amount: 5000,
|
|
97
|
+
* product_name: "Pro plan"
|
|
80
98
|
* })
|
|
81
99
|
*/
|
|
82
100
|
update(request: ToltApi.UpdateTransactionsRequest, requestOptions?: TransactionsClient.RequestOptions): core.HttpResponsePromise<ToltApi.UpdateTransactionsResponse>;
|
|
83
101
|
private __update;
|
|
84
102
|
/**
|
|
103
|
+
* Deletes a transaction. Refunded transactions and transactions that already have commissions cannot be deleted.
|
|
104
|
+
*
|
|
85
105
|
* @param {ToltApi.DeleteTransactionsRequest} request
|
|
86
106
|
* @param {TransactionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
87
107
|
*
|
|
88
108
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
89
109
|
* @throws {@link ToltApi.NotFoundError}
|
|
90
110
|
* @throws {@link ToltApi.ConflictError}
|
|
111
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
91
112
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
92
113
|
* @throws {@link errors.ToltApiError}
|
|
93
114
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
94
115
|
*
|
|
95
116
|
* @example
|
|
96
117
|
* await client.transactions.delete({
|
|
97
|
-
* id: "
|
|
118
|
+
* id: "txn_fB3egT1sKNVNu3ZYuU1ypYDA"
|
|
98
119
|
* })
|
|
99
120
|
*/
|
|
100
121
|
delete(request: ToltApi.DeleteTransactionsRequest, requestOptions?: TransactionsClient.RequestOptions): core.HttpResponsePromise<ToltApi.DeleteTransactionsResponse>;
|
|
@@ -108,13 +129,14 @@ export declare class TransactionsClient {
|
|
|
108
129
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
109
130
|
* @throws {@link ToltApi.NotFoundError}
|
|
110
131
|
* @throws {@link ToltApi.ConflictError}
|
|
132
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
111
133
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
112
134
|
* @throws {@link errors.ToltApiError}
|
|
113
135
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
114
136
|
*
|
|
115
137
|
* @example
|
|
116
138
|
* await client.transactions.refund({
|
|
117
|
-
* id: "
|
|
139
|
+
* id: "txn_fB3egT1sKNVNu3ZYuU1ypYDA"
|
|
118
140
|
* })
|
|
119
141
|
*/
|
|
120
142
|
refund(request: ToltApi.RefundTransactionsRequest, requestOptions?: TransactionsClient.RequestOptions): core.HttpResponsePromise<ToltApi.RefundTransactionsResponse>;
|
|
@@ -128,13 +150,14 @@ export declare class TransactionsClient {
|
|
|
128
150
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
129
151
|
* @throws {@link ToltApi.NotFoundError}
|
|
130
152
|
* @throws {@link ToltApi.ConflictError}
|
|
153
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
131
154
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
132
155
|
* @throws {@link errors.ToltApiError}
|
|
133
156
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
134
157
|
*
|
|
135
158
|
* @example
|
|
136
159
|
* await client.transactions.rerunFlows({
|
|
137
|
-
* id: "
|
|
160
|
+
* id: "txn_fB3egT1sKNVNu3ZYuU1ypYDA"
|
|
138
161
|
* })
|
|
139
162
|
*/
|
|
140
163
|
rerunFlows(request: ToltApi.RerunFlowsTransactionsRequest, requestOptions?: TransactionsClient.RequestOptions): core.HttpResponsePromise<ToltApi.RerunFlowsTransactionsResponse>;
|
|
@@ -12,11 +12,14 @@ export class TransactionsClient {
|
|
|
12
12
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
+
* Lists transactions. Filter by program, partner, customer or status, and page with cursors.
|
|
16
|
+
*
|
|
15
17
|
* @param {ToltApi.ListTransactionsRequest} request
|
|
16
18
|
* @param {TransactionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
17
19
|
*
|
|
18
20
|
* @throws {@link ToltApi.BadRequestError}
|
|
19
21
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
22
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
20
23
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
21
24
|
* @throws {@link errors.ToltApiError}
|
|
22
25
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
@@ -50,7 +53,7 @@ export class TransactionsClient {
|
|
|
50
53
|
const _response = await core.fetcher({
|
|
51
54
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
52
55
|
(await core.Supplier.get(this._options.environment)) ??
|
|
53
|
-
environments.ToltApiEnvironment.
|
|
56
|
+
environments.ToltApiEnvironment.Default, "v2/transactions"),
|
|
54
57
|
method: "GET",
|
|
55
58
|
headers: _headers,
|
|
56
59
|
queryString: core.url
|
|
@@ -73,6 +76,8 @@ export class TransactionsClient {
|
|
|
73
76
|
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
74
77
|
case 401:
|
|
75
78
|
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
79
|
+
case 413:
|
|
80
|
+
throw new ToltApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
76
81
|
case 429:
|
|
77
82
|
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
78
83
|
default:
|
|
@@ -93,14 +98,21 @@ export class TransactionsClient {
|
|
|
93
98
|
*
|
|
94
99
|
* @throws {@link ToltApi.BadRequestError}
|
|
95
100
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
101
|
+
* @throws {@link ToltApi.ConflictError}
|
|
102
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
96
103
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
97
104
|
* @throws {@link errors.ToltApiError}
|
|
98
105
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
99
106
|
*
|
|
100
107
|
* @example
|
|
101
108
|
* await client.transactions.create({
|
|
102
|
-
*
|
|
103
|
-
*
|
|
109
|
+
* product_id: "prod_pro",
|
|
110
|
+
* product_name: "Pro plan",
|
|
111
|
+
* amount: 5000,
|
|
112
|
+
* customer_id: "cus_LBfjvtfct9pVUeLojMHiGnXv",
|
|
113
|
+
* billing_type: "subscription",
|
|
114
|
+
* interval: "month",
|
|
115
|
+
* source: "api"
|
|
104
116
|
* })
|
|
105
117
|
*/
|
|
106
118
|
create(request, requestOptions) {
|
|
@@ -112,7 +124,7 @@ export class TransactionsClient {
|
|
|
112
124
|
const _response = await core.fetcher({
|
|
113
125
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
114
126
|
(await core.Supplier.get(this._options.environment)) ??
|
|
115
|
-
environments.ToltApiEnvironment.
|
|
127
|
+
environments.ToltApiEnvironment.Default, "v2/transactions"),
|
|
116
128
|
method: "POST",
|
|
117
129
|
headers: _headers,
|
|
118
130
|
contentType: "application/json",
|
|
@@ -134,6 +146,10 @@ export class TransactionsClient {
|
|
|
134
146
|
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
135
147
|
case 401:
|
|
136
148
|
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
149
|
+
case 409:
|
|
150
|
+
throw new ToltApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
151
|
+
case 413:
|
|
152
|
+
throw new ToltApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
137
153
|
case 429:
|
|
138
154
|
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
139
155
|
default:
|
|
@@ -147,18 +163,21 @@ export class TransactionsClient {
|
|
|
147
163
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/transactions");
|
|
148
164
|
}
|
|
149
165
|
/**
|
|
166
|
+
* Gets a transaction by ID, with its amount, status, billing details, products and the customer it belongs to.
|
|
167
|
+
*
|
|
150
168
|
* @param {ToltApi.GetTransactionsRequest} request
|
|
151
169
|
* @param {TransactionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
152
170
|
*
|
|
153
171
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
154
172
|
* @throws {@link ToltApi.NotFoundError}
|
|
173
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
155
174
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
156
175
|
* @throws {@link errors.ToltApiError}
|
|
157
176
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
158
177
|
*
|
|
159
178
|
* @example
|
|
160
179
|
* await client.transactions.get({
|
|
161
|
-
* id: "
|
|
180
|
+
* id: "txn_fB3egT1sKNVNu3ZYuU1ypYDA"
|
|
162
181
|
* })
|
|
163
182
|
*/
|
|
164
183
|
get(request, requestOptions) {
|
|
@@ -171,7 +190,7 @@ export class TransactionsClient {
|
|
|
171
190
|
const _response = await core.fetcher({
|
|
172
191
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
173
192
|
(await core.Supplier.get(this._options.environment)) ??
|
|
174
|
-
environments.ToltApiEnvironment.
|
|
193
|
+
environments.ToltApiEnvironment.Default, `v2/transactions/${core.url.encodePathParam(id)}`),
|
|
175
194
|
method: "GET",
|
|
176
195
|
headers: _headers,
|
|
177
196
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
@@ -190,6 +209,8 @@ export class TransactionsClient {
|
|
|
190
209
|
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
191
210
|
case 404:
|
|
192
211
|
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
212
|
+
case 413:
|
|
213
|
+
throw new ToltApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
193
214
|
case 429:
|
|
194
215
|
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
195
216
|
default:
|
|
@@ -203,6 +224,8 @@ export class TransactionsClient {
|
|
|
203
224
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/transactions/{id}");
|
|
204
225
|
}
|
|
205
226
|
/**
|
|
227
|
+
* Updates a transaction's amount, status, billing or product details. Refunded transactions cannot be modified.
|
|
228
|
+
*
|
|
206
229
|
* @param {ToltApi.UpdateTransactionsRequest} request
|
|
207
230
|
* @param {TransactionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
208
231
|
*
|
|
@@ -210,13 +233,16 @@ export class TransactionsClient {
|
|
|
210
233
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
211
234
|
* @throws {@link ToltApi.NotFoundError}
|
|
212
235
|
* @throws {@link ToltApi.ConflictError}
|
|
236
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
213
237
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
214
238
|
* @throws {@link errors.ToltApiError}
|
|
215
239
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
216
240
|
*
|
|
217
241
|
* @example
|
|
218
242
|
* await client.transactions.update({
|
|
219
|
-
* id: "
|
|
243
|
+
* id: "txn_fB3egT1sKNVNu3ZYuU1ypYDA",
|
|
244
|
+
* amount: 5000,
|
|
245
|
+
* product_name: "Pro plan"
|
|
220
246
|
* })
|
|
221
247
|
*/
|
|
222
248
|
update(request, requestOptions) {
|
|
@@ -229,7 +255,7 @@ export class TransactionsClient {
|
|
|
229
255
|
const _response = await core.fetcher({
|
|
230
256
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
231
257
|
(await core.Supplier.get(this._options.environment)) ??
|
|
232
|
-
environments.ToltApiEnvironment.
|
|
258
|
+
environments.ToltApiEnvironment.Default, `v2/transactions/${core.url.encodePathParam(id)}`),
|
|
233
259
|
method: "PUT",
|
|
234
260
|
headers: _headers,
|
|
235
261
|
contentType: "application/json",
|
|
@@ -255,6 +281,8 @@ export class TransactionsClient {
|
|
|
255
281
|
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
256
282
|
case 409:
|
|
257
283
|
throw new ToltApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
284
|
+
case 413:
|
|
285
|
+
throw new ToltApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
258
286
|
case 429:
|
|
259
287
|
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
260
288
|
default:
|
|
@@ -268,19 +296,22 @@ export class TransactionsClient {
|
|
|
268
296
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/v2/transactions/{id}");
|
|
269
297
|
}
|
|
270
298
|
/**
|
|
299
|
+
* Deletes a transaction. Refunded transactions and transactions that already have commissions cannot be deleted.
|
|
300
|
+
*
|
|
271
301
|
* @param {ToltApi.DeleteTransactionsRequest} request
|
|
272
302
|
* @param {TransactionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
273
303
|
*
|
|
274
304
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
275
305
|
* @throws {@link ToltApi.NotFoundError}
|
|
276
306
|
* @throws {@link ToltApi.ConflictError}
|
|
307
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
277
308
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
278
309
|
* @throws {@link errors.ToltApiError}
|
|
279
310
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
280
311
|
*
|
|
281
312
|
* @example
|
|
282
313
|
* await client.transactions.delete({
|
|
283
|
-
* id: "
|
|
314
|
+
* id: "txn_fB3egT1sKNVNu3ZYuU1ypYDA"
|
|
284
315
|
* })
|
|
285
316
|
*/
|
|
286
317
|
delete(request, requestOptions) {
|
|
@@ -293,7 +324,7 @@ export class TransactionsClient {
|
|
|
293
324
|
const _response = await core.fetcher({
|
|
294
325
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
295
326
|
(await core.Supplier.get(this._options.environment)) ??
|
|
296
|
-
environments.ToltApiEnvironment.
|
|
327
|
+
environments.ToltApiEnvironment.Default, `v2/transactions/${core.url.encodePathParam(id)}`),
|
|
297
328
|
method: "DELETE",
|
|
298
329
|
headers: _headers,
|
|
299
330
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
@@ -314,6 +345,8 @@ export class TransactionsClient {
|
|
|
314
345
|
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
315
346
|
case 409:
|
|
316
347
|
throw new ToltApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
348
|
+
case 413:
|
|
349
|
+
throw new ToltApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
317
350
|
case 429:
|
|
318
351
|
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
319
352
|
default:
|
|
@@ -335,13 +368,14 @@ export class TransactionsClient {
|
|
|
335
368
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
336
369
|
* @throws {@link ToltApi.NotFoundError}
|
|
337
370
|
* @throws {@link ToltApi.ConflictError}
|
|
371
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
338
372
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
339
373
|
* @throws {@link errors.ToltApiError}
|
|
340
374
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
341
375
|
*
|
|
342
376
|
* @example
|
|
343
377
|
* await client.transactions.refund({
|
|
344
|
-
* id: "
|
|
378
|
+
* id: "txn_fB3egT1sKNVNu3ZYuU1ypYDA"
|
|
345
379
|
* })
|
|
346
380
|
*/
|
|
347
381
|
refund(request, requestOptions) {
|
|
@@ -354,7 +388,7 @@ export class TransactionsClient {
|
|
|
354
388
|
const _response = await core.fetcher({
|
|
355
389
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
356
390
|
(await core.Supplier.get(this._options.environment)) ??
|
|
357
|
-
environments.ToltApiEnvironment.
|
|
391
|
+
environments.ToltApiEnvironment.Default, `v2/transactions/${core.url.encodePathParam(id)}/refund`),
|
|
358
392
|
method: "POST",
|
|
359
393
|
headers: _headers,
|
|
360
394
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
@@ -375,6 +409,8 @@ export class TransactionsClient {
|
|
|
375
409
|
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
376
410
|
case 409:
|
|
377
411
|
throw new ToltApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
412
|
+
case 413:
|
|
413
|
+
throw new ToltApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
378
414
|
case 429:
|
|
379
415
|
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
380
416
|
default:
|
|
@@ -396,13 +432,14 @@ export class TransactionsClient {
|
|
|
396
432
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
397
433
|
* @throws {@link ToltApi.NotFoundError}
|
|
398
434
|
* @throws {@link ToltApi.ConflictError}
|
|
435
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
399
436
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
400
437
|
* @throws {@link errors.ToltApiError}
|
|
401
438
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
402
439
|
*
|
|
403
440
|
* @example
|
|
404
441
|
* await client.transactions.rerunFlows({
|
|
405
|
-
* id: "
|
|
442
|
+
* id: "txn_fB3egT1sKNVNu3ZYuU1ypYDA"
|
|
406
443
|
* })
|
|
407
444
|
*/
|
|
408
445
|
rerunFlows(request, requestOptions) {
|
|
@@ -415,7 +452,7 @@ export class TransactionsClient {
|
|
|
415
452
|
const _response = await core.fetcher({
|
|
416
453
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
417
454
|
(await core.Supplier.get(this._options.environment)) ??
|
|
418
|
-
environments.ToltApiEnvironment.
|
|
455
|
+
environments.ToltApiEnvironment.Default, `v2/transactions/${core.url.encodePathParam(id)}/rerun-flows`),
|
|
419
456
|
method: "POST",
|
|
420
457
|
headers: _headers,
|
|
421
458
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
@@ -439,6 +476,8 @@ export class TransactionsClient {
|
|
|
439
476
|
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
440
477
|
case 409:
|
|
441
478
|
throw new ToltApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
479
|
+
case 413:
|
|
480
|
+
throw new ToltApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
442
481
|
case 429:
|
|
443
482
|
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
444
483
|
default:
|
|
@@ -1,20 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* product_id: "prod_pro",
|
|
5
|
+
* product_name: "Pro plan",
|
|
6
|
+
* amount: 5000,
|
|
7
|
+
* customer_id: "cus_LBfjvtfct9pVUeLojMHiGnXv",
|
|
8
|
+
* billing_type: "subscription",
|
|
9
|
+
* interval: "month",
|
|
10
|
+
* source: "api"
|
|
6
11
|
* }
|
|
7
12
|
*/
|
|
8
13
|
export interface CreateTransactionsRequest {
|
|
14
|
+
/** When the payment happened, as a timestamp with a time zone, for example 2026-03-01T12:00:00Z. Reports and date filters place the transaction on this date. Defaults to now. */
|
|
9
15
|
created_at?: string;
|
|
16
|
+
/** Id of the purchased product in your billing system. Commission flows can match on it. */
|
|
10
17
|
product_id?: string;
|
|
18
|
+
/** Readable name of the purchased product, such as Pro plan. It is saved as the transaction's product name, which revenue_by_product groups revenue by; flows match on product_id, not on this name. */
|
|
11
19
|
product_name?: string;
|
|
12
|
-
/**
|
|
20
|
+
/** The payment amount in the smallest unit of the program currency (cents for USD); percentage commissions are calculated from it. */
|
|
13
21
|
amount: number;
|
|
22
|
+
/** Id of the customer who paid (cus_...), as returned when listing customers. The transaction goes to that customer's partner and program, and the customer becomes active. */
|
|
14
23
|
customer_id: string;
|
|
24
|
+
/** Kind of payment: subscription for a recurring payment, or one_time. Commission flows can match on it. */
|
|
15
25
|
billing_type?: string;
|
|
26
|
+
/** Id of the payment in your billing system, such as a Stripe charge id. A customer can have only one transaction per charge_id, so retrying a create with the same value returns 409 instead of booking the payment twice. An empty or whitespace-only charge_id is stored as no charge id and is not checked; any other value is stored and compared exactly as sent. */
|
|
16
27
|
charge_id?: string;
|
|
28
|
+
/** Id of the tracked click behind this payment, as returned when listing clicks. Commission flows use its link before falling back to the customer's link. */
|
|
17
29
|
click_id?: string;
|
|
30
|
+
/** Billing period of a subscription payment: month or year. Commission flows can match on it. Flows can also split a yearly payment into monthly commissions. */
|
|
18
31
|
interval?: string;
|
|
32
|
+
/** Where the transaction came from, such as stripe or api. Commissions that flows create from it copy this value. */
|
|
19
33
|
source?: string;
|
|
20
34
|
}
|
|
@@ -4,25 +4,32 @@ import type * as ToltApi from "../../../../index.js";
|
|
|
4
4
|
* {}
|
|
5
5
|
*/
|
|
6
6
|
export interface ListTransactionsRequest {
|
|
7
|
+
/** How many rows to return in one page. */
|
|
7
8
|
limit?: number;
|
|
9
|
+
/** Ranking direction: desc puts the most recently created or updated rows first. */
|
|
8
10
|
order?: ToltApi.ListTransactionsRequestOrder;
|
|
9
|
-
/**
|
|
11
|
+
/** Timestamp to order and page by: created_at follows creation order, updated_at follows each item's most recent change. */
|
|
10
12
|
sort?: ToltApi.ListTransactionsRequestSort;
|
|
11
13
|
/** Continue after a position: the next_cursor of a previous page, or an item id when sorting by created_at. Cannot be combined with ending_before. */
|
|
12
14
|
starting_after?: string;
|
|
13
15
|
/** Page backward from a position: the prev_cursor of a previous page, or an item id when sorting by created_at. Cannot be combined with starting_after. */
|
|
14
16
|
ending_before?: string;
|
|
15
|
-
/**
|
|
17
|
+
/** Start of a window on when items were created: items created at this time or later are included, for example 2026-01-01T00:00:00Z. Leave it out for no lower bound. */
|
|
16
18
|
created_after?: string;
|
|
17
|
-
/**
|
|
19
|
+
/** End of a window on when items were created: only items created before this time are included. Leave it out for no upper bound. */
|
|
18
20
|
created_before?: string;
|
|
19
|
-
/** Only items
|
|
21
|
+
/** Only items last changed at or after this moment; with sort=updated_at, use it to fetch what changed since a previous sync. */
|
|
20
22
|
updated_after?: string;
|
|
21
|
-
/** Only items
|
|
23
|
+
/** Only items last changed before this moment; pair it with updated_after to fetch what changed in a period. */
|
|
22
24
|
updated_before?: string;
|
|
25
|
+
/** Limit to one program, by its id (prg_...) as returned when listing programs. */
|
|
23
26
|
program_id?: string;
|
|
27
|
+
/** Limit to one partner, by its id (part_...) as returned when listing partners. */
|
|
24
28
|
partner_id?: string;
|
|
29
|
+
/** Only transactions from this customer, by Tolt customer id (cus_...) as returned when listing customers. */
|
|
25
30
|
customer_id?: string;
|
|
31
|
+
/** Only transactions in this status, matched exactly, such as paid or refunded. */
|
|
26
32
|
status?: string;
|
|
33
|
+
/** Text matched anywhere in the transaction id or its charge_id, ignoring case. */
|
|
27
34
|
search?: string;
|
|
28
35
|
}
|