@stigg/typescript 0.1.0-alpha.1 → 0.1.0-alpha.3
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/CHANGELOG.md +20 -0
- package/README.md +31 -0
- package/core/pagination.d.mts +11 -5
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +11 -5
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js +9 -9
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +9 -9
- package/core/pagination.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/v1/coupons.d.mts +100 -86
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +100 -86
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/coupons.js +8 -4
- package/resources/v1/coupons.js.map +1 -1
- package/resources/v1/coupons.mjs +8 -4
- package/resources/v1/coupons.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts +101 -96
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +101 -96
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +11 -7
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +11 -7
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts +2 -2
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts +2 -2
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/payment-method.d.mts +5 -2
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts +5 -2
- package/resources/v1/customers/payment-method.d.ts.map +1 -1
- package/resources/v1/customers/payment-method.js +2 -2
- package/resources/v1/customers/payment-method.mjs +2 -2
- package/resources/v1/customers/usage.d.mts +0 -94
- package/resources/v1/customers/usage.d.mts.map +1 -1
- package/resources/v1/customers/usage.d.ts +0 -94
- package/resources/v1/customers/usage.d.ts.map +1 -1
- package/resources/v1/customers/usage.js +0 -11
- package/resources/v1/customers/usage.js.map +1 -1
- package/resources/v1/customers/usage.mjs +0 -11
- package/resources/v1/customers/usage.mjs.map +1 -1
- package/resources/v1/index.d.mts +3 -3
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +3 -3
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/subscriptions/future-update.d.mts +8 -2
- package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
- package/resources/v1/subscriptions/future-update.d.ts +8 -2
- package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
- package/resources/v1/subscriptions/future-update.js +2 -2
- package/resources/v1/subscriptions/future-update.mjs +2 -2
- package/resources/v1/subscriptions/index.d.mts +1 -1
- package/resources/v1/subscriptions/index.d.mts.map +1 -1
- package/resources/v1/subscriptions/index.d.ts +1 -1
- package/resources/v1/subscriptions/index.d.ts.map +1 -1
- package/resources/v1/subscriptions/index.js.map +1 -1
- package/resources/v1/subscriptions/index.mjs.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +1092 -111
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +1092 -111
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js +12 -8
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +12 -8
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/v1.d.mts +32 -9
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +32 -9
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +2 -2
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +2 -2
- package/resources/v1/v1.mjs.map +1 -1
- package/src/core/pagination.ts +24 -18
- package/src/resources/v1/coupons.ts +223 -212
- package/src/resources/v1/customers/customers.ts +121 -120
- package/src/resources/v1/customers/index.ts +2 -1
- package/src/resources/v1/customers/payment-method.ts +5 -2
- package/src/resources/v1/customers/usage.ts +1 -128
- package/src/resources/v1/index.ts +3 -0
- package/src/resources/v1/subscriptions/future-update.ts +8 -2
- package/src/resources/v1/subscriptions/index.ts +1 -0
- package/src/resources/v1/subscriptions/subscriptions.ts +2201 -153
- package/src/resources/v1/v1.ts +32 -3
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/core/pagination.ts
CHANGED
|
@@ -109,22 +109,31 @@ export class PagePromise<
|
|
|
109
109
|
|
|
110
110
|
export interface MyCursorIDPageResponse<Item> {
|
|
111
111
|
data: Array<Item>;
|
|
112
|
+
|
|
113
|
+
pagination: MyCursorIDPageResponse.Pagination;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export namespace MyCursorIDPageResponse {
|
|
117
|
+
export interface Pagination {
|
|
118
|
+
next?: string;
|
|
119
|
+
|
|
120
|
+
prev?: string;
|
|
121
|
+
}
|
|
112
122
|
}
|
|
113
123
|
|
|
114
124
|
export interface MyCursorIDPageParams {
|
|
115
|
-
|
|
125
|
+
after?: string;
|
|
116
126
|
|
|
117
|
-
|
|
127
|
+
before?: string;
|
|
118
128
|
|
|
119
129
|
limit?: number;
|
|
120
130
|
}
|
|
121
131
|
|
|
122
|
-
export class MyCursorIDPage<Item extends
|
|
123
|
-
extends AbstractPage<Item>
|
|
124
|
-
implements MyCursorIDPageResponse<Item>
|
|
125
|
-
{
|
|
132
|
+
export class MyCursorIDPage<Item> extends AbstractPage<Item> implements MyCursorIDPageResponse<Item> {
|
|
126
133
|
data: Array<Item>;
|
|
127
134
|
|
|
135
|
+
pagination: MyCursorIDPageResponse.Pagination;
|
|
136
|
+
|
|
128
137
|
constructor(
|
|
129
138
|
client: Stigg,
|
|
130
139
|
response: Response,
|
|
@@ -134,6 +143,7 @@ export class MyCursorIDPage<Item extends { cursor_id: string }>
|
|
|
134
143
|
super(client, response, body, options);
|
|
135
144
|
|
|
136
145
|
this.data = body.data || [];
|
|
146
|
+
this.pagination = body.pagination || {};
|
|
137
147
|
}
|
|
138
148
|
|
|
139
149
|
getPaginatedItems(): Item[] {
|
|
@@ -141,14 +151,10 @@ export class MyCursorIDPage<Item extends { cursor_id: string }>
|
|
|
141
151
|
}
|
|
142
152
|
|
|
143
153
|
nextPageRequestOptions(): PageRequestOptions | null {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
);
|
|
149
|
-
if (isForwards) {
|
|
150
|
-
const cursorID = data[data.length - 1]?.cursor_id;
|
|
151
|
-
if (!cursorID) {
|
|
154
|
+
if ((this.options.query as Record<string, unknown>)?.['before']) {
|
|
155
|
+
// in reverse
|
|
156
|
+
const prev = this.pagination?.prev;
|
|
157
|
+
if (!prev) {
|
|
152
158
|
return null;
|
|
153
159
|
}
|
|
154
160
|
|
|
@@ -156,13 +162,13 @@ export class MyCursorIDPage<Item extends { cursor_id: string }>
|
|
|
156
162
|
...this.options,
|
|
157
163
|
query: {
|
|
158
164
|
...maybeObj(this.options.query),
|
|
159
|
-
|
|
165
|
+
before: prev,
|
|
160
166
|
},
|
|
161
167
|
};
|
|
162
168
|
}
|
|
163
169
|
|
|
164
|
-
const
|
|
165
|
-
if (!
|
|
170
|
+
const cursor = this.pagination?.next;
|
|
171
|
+
if (!cursor) {
|
|
166
172
|
return null;
|
|
167
173
|
}
|
|
168
174
|
|
|
@@ -170,7 +176,7 @@ export class MyCursorIDPage<Item extends { cursor_id: string }>
|
|
|
170
176
|
...this.options,
|
|
171
177
|
query: {
|
|
172
178
|
...maybeObj(this.options.query),
|
|
173
|
-
|
|
179
|
+
after: cursor,
|
|
174
180
|
},
|
|
175
181
|
};
|
|
176
182
|
}
|
|
@@ -2,40 +2,55 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../core/pagination';
|
|
5
6
|
import { RequestOptions } from '../../internal/request-options';
|
|
6
7
|
import { path } from '../../internal/utils/path';
|
|
7
8
|
|
|
8
9
|
export class Coupons extends APIResource {
|
|
9
10
|
/**
|
|
10
|
-
* Create
|
|
11
|
+
* Create coupon
|
|
11
12
|
*/
|
|
12
13
|
create(body: CouponCreateParams, options?: RequestOptions): APIPromise<CouponCreateResponse> {
|
|
13
14
|
return this._client.post('/api/v1/coupons', { body, ...options });
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
|
-
* Get a single
|
|
18
|
+
* Get a single coupon by ID
|
|
18
19
|
*/
|
|
19
20
|
retrieve(id: string, options?: RequestOptions): APIPromise<CouponRetrieveResponse> {
|
|
20
21
|
return this._client.get(path`/api/v1/coupons/${id}`, options);
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
|
-
* Get a list of
|
|
25
|
+
* Get a list of coupons
|
|
25
26
|
*/
|
|
26
27
|
list(
|
|
27
28
|
query: CouponListParams | null | undefined = {},
|
|
28
29
|
options?: RequestOptions,
|
|
29
|
-
):
|
|
30
|
-
return this._client.
|
|
30
|
+
): PagePromise<CouponListResponsesMyCursorIDPage, CouponListResponse> {
|
|
31
|
+
return this._client.getAPIList('/api/v1/coupons', MyCursorIDPage<CouponListResponse>, {
|
|
32
|
+
query,
|
|
33
|
+
...options,
|
|
34
|
+
});
|
|
31
35
|
}
|
|
32
36
|
}
|
|
33
37
|
|
|
38
|
+
export type CouponListResponsesMyCursorIDPage = MyCursorIDPage<CouponListResponse>;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Response object
|
|
42
|
+
*/
|
|
34
43
|
export interface CouponCreateResponse {
|
|
44
|
+
/**
|
|
45
|
+
* Discount instrument with percentage or fixed amount
|
|
46
|
+
*/
|
|
35
47
|
data: CouponCreateResponse.Data;
|
|
36
48
|
}
|
|
37
49
|
|
|
38
50
|
export namespace CouponCreateResponse {
|
|
51
|
+
/**
|
|
52
|
+
* Discount instrument with percentage or fixed amount
|
|
53
|
+
*/
|
|
39
54
|
export interface Data {
|
|
40
55
|
/**
|
|
41
56
|
* The unique identifier for the entity
|
|
@@ -104,6 +119,9 @@ export namespace CouponCreateResponse {
|
|
|
104
119
|
}
|
|
105
120
|
|
|
106
121
|
export namespace Data {
|
|
122
|
+
/**
|
|
123
|
+
* Monetary amount with currency
|
|
124
|
+
*/
|
|
107
125
|
export interface AmountsOff {
|
|
108
126
|
/**
|
|
109
127
|
* The price amount
|
|
@@ -229,17 +247,25 @@ export namespace CouponCreateResponse {
|
|
|
229
247
|
| 'ugx'
|
|
230
248
|
| 'pyg'
|
|
231
249
|
| 'xof'
|
|
232
|
-
| 'xpf'
|
|
233
|
-
| null;
|
|
250
|
+
| 'xpf';
|
|
234
251
|
}
|
|
235
252
|
}
|
|
236
253
|
}
|
|
237
254
|
|
|
255
|
+
/**
|
|
256
|
+
* Response object
|
|
257
|
+
*/
|
|
238
258
|
export interface CouponRetrieveResponse {
|
|
259
|
+
/**
|
|
260
|
+
* Discount instrument with percentage or fixed amount
|
|
261
|
+
*/
|
|
239
262
|
data: CouponRetrieveResponse.Data;
|
|
240
263
|
}
|
|
241
264
|
|
|
242
265
|
export namespace CouponRetrieveResponse {
|
|
266
|
+
/**
|
|
267
|
+
* Discount instrument with percentage or fixed amount
|
|
268
|
+
*/
|
|
243
269
|
export interface Data {
|
|
244
270
|
/**
|
|
245
271
|
* The unique identifier for the entity
|
|
@@ -308,6 +334,9 @@ export namespace CouponRetrieveResponse {
|
|
|
308
334
|
}
|
|
309
335
|
|
|
310
336
|
export namespace Data {
|
|
337
|
+
/**
|
|
338
|
+
* Monetary amount with currency
|
|
339
|
+
*/
|
|
311
340
|
export interface AmountsOff {
|
|
312
341
|
/**
|
|
313
342
|
* The price amount
|
|
@@ -433,218 +462,211 @@ export namespace CouponRetrieveResponse {
|
|
|
433
462
|
| 'ugx'
|
|
434
463
|
| 'pyg'
|
|
435
464
|
| 'xof'
|
|
436
|
-
| 'xpf'
|
|
437
|
-
| null;
|
|
465
|
+
| 'xpf';
|
|
438
466
|
}
|
|
439
467
|
}
|
|
440
468
|
}
|
|
441
469
|
|
|
470
|
+
/**
|
|
471
|
+
* Discount instrument with percentage or fixed amount
|
|
472
|
+
*/
|
|
442
473
|
export interface CouponListResponse {
|
|
443
|
-
|
|
444
|
-
|
|
474
|
+
/**
|
|
475
|
+
* The unique identifier for the entity
|
|
476
|
+
*/
|
|
477
|
+
id: string;
|
|
445
478
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
*/
|
|
451
|
-
id: string;
|
|
479
|
+
/**
|
|
480
|
+
* Fixed amount discounts in different currencies
|
|
481
|
+
*/
|
|
482
|
+
amountsOff: Array<CouponListResponse.AmountsOff> | null;
|
|
452
483
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
484
|
+
/**
|
|
485
|
+
* The unique identifier for the entity in the billing provider
|
|
486
|
+
*/
|
|
487
|
+
billingId: string | null;
|
|
457
488
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
489
|
+
/**
|
|
490
|
+
* The URL to the entity in the billing provider
|
|
491
|
+
*/
|
|
492
|
+
billingLinkUrl: string | null;
|
|
462
493
|
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
494
|
+
/**
|
|
495
|
+
* Timestamp of when the record was created
|
|
496
|
+
*/
|
|
497
|
+
createdAt: string;
|
|
467
498
|
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
499
|
+
/**
|
|
500
|
+
* Description of the coupon
|
|
501
|
+
*/
|
|
502
|
+
description: string | null;
|
|
472
503
|
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
504
|
+
/**
|
|
505
|
+
* Duration of the coupon validity in months
|
|
506
|
+
*/
|
|
507
|
+
durationInMonths: number | null;
|
|
477
508
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
509
|
+
/**
|
|
510
|
+
* Name of the coupon
|
|
511
|
+
*/
|
|
512
|
+
name: string;
|
|
482
513
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
514
|
+
/**
|
|
515
|
+
* Percentage discount off the original price
|
|
516
|
+
*/
|
|
517
|
+
percentOff: number | null;
|
|
487
518
|
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
519
|
+
/**
|
|
520
|
+
* The source of the coupon
|
|
521
|
+
*/
|
|
522
|
+
source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE' | null;
|
|
492
523
|
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
524
|
+
/**
|
|
525
|
+
* Current status of the coupon
|
|
526
|
+
*/
|
|
527
|
+
status: 'ACTIVE' | 'ARCHIVED';
|
|
497
528
|
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
529
|
+
/**
|
|
530
|
+
* Type of the coupon (percentage or fixed amount)
|
|
531
|
+
*/
|
|
532
|
+
type: 'FIXED' | 'PERCENTAGE';
|
|
502
533
|
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
534
|
+
/**
|
|
535
|
+
* Timestamp of when the record was last updated
|
|
536
|
+
*/
|
|
537
|
+
updatedAt: string;
|
|
538
|
+
}
|
|
507
539
|
|
|
540
|
+
export namespace CouponListResponse {
|
|
541
|
+
/**
|
|
542
|
+
* Monetary amount with currency
|
|
543
|
+
*/
|
|
544
|
+
export interface AmountsOff {
|
|
508
545
|
/**
|
|
509
|
-
*
|
|
546
|
+
* The price amount
|
|
510
547
|
*/
|
|
511
|
-
|
|
548
|
+
amount: number;
|
|
512
549
|
|
|
513
550
|
/**
|
|
514
|
-
*
|
|
551
|
+
* The price currency
|
|
515
552
|
*/
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
| 'wst'
|
|
634
|
-
| 'xaf'
|
|
635
|
-
| 'xcd'
|
|
636
|
-
| 'yer'
|
|
637
|
-
| 'zar'
|
|
638
|
-
| 'zmw'
|
|
639
|
-
| 'clp'
|
|
640
|
-
| 'djf'
|
|
641
|
-
| 'gnf'
|
|
642
|
-
| 'ugx'
|
|
643
|
-
| 'pyg'
|
|
644
|
-
| 'xof'
|
|
645
|
-
| 'xpf'
|
|
646
|
-
| null;
|
|
647
|
-
}
|
|
553
|
+
currency:
|
|
554
|
+
| 'usd'
|
|
555
|
+
| 'aed'
|
|
556
|
+
| 'all'
|
|
557
|
+
| 'amd'
|
|
558
|
+
| 'ang'
|
|
559
|
+
| 'aud'
|
|
560
|
+
| 'awg'
|
|
561
|
+
| 'azn'
|
|
562
|
+
| 'bam'
|
|
563
|
+
| 'bbd'
|
|
564
|
+
| 'bdt'
|
|
565
|
+
| 'bgn'
|
|
566
|
+
| 'bif'
|
|
567
|
+
| 'bmd'
|
|
568
|
+
| 'bnd'
|
|
569
|
+
| 'bsd'
|
|
570
|
+
| 'bwp'
|
|
571
|
+
| 'byn'
|
|
572
|
+
| 'bzd'
|
|
573
|
+
| 'brl'
|
|
574
|
+
| 'cad'
|
|
575
|
+
| 'cdf'
|
|
576
|
+
| 'chf'
|
|
577
|
+
| 'cny'
|
|
578
|
+
| 'czk'
|
|
579
|
+
| 'dkk'
|
|
580
|
+
| 'dop'
|
|
581
|
+
| 'dzd'
|
|
582
|
+
| 'egp'
|
|
583
|
+
| 'etb'
|
|
584
|
+
| 'eur'
|
|
585
|
+
| 'fjd'
|
|
586
|
+
| 'gbp'
|
|
587
|
+
| 'gel'
|
|
588
|
+
| 'gip'
|
|
589
|
+
| 'gmd'
|
|
590
|
+
| 'gyd'
|
|
591
|
+
| 'hkd'
|
|
592
|
+
| 'hrk'
|
|
593
|
+
| 'htg'
|
|
594
|
+
| 'idr'
|
|
595
|
+
| 'ils'
|
|
596
|
+
| 'inr'
|
|
597
|
+
| 'isk'
|
|
598
|
+
| 'jmd'
|
|
599
|
+
| 'jpy'
|
|
600
|
+
| 'kes'
|
|
601
|
+
| 'kgs'
|
|
602
|
+
| 'khr'
|
|
603
|
+
| 'kmf'
|
|
604
|
+
| 'krw'
|
|
605
|
+
| 'kyd'
|
|
606
|
+
| 'kzt'
|
|
607
|
+
| 'lbp'
|
|
608
|
+
| 'lkr'
|
|
609
|
+
| 'lrd'
|
|
610
|
+
| 'lsl'
|
|
611
|
+
| 'mad'
|
|
612
|
+
| 'mdl'
|
|
613
|
+
| 'mga'
|
|
614
|
+
| 'mkd'
|
|
615
|
+
| 'mmk'
|
|
616
|
+
| 'mnt'
|
|
617
|
+
| 'mop'
|
|
618
|
+
| 'mro'
|
|
619
|
+
| 'mvr'
|
|
620
|
+
| 'mwk'
|
|
621
|
+
| 'mxn'
|
|
622
|
+
| 'myr'
|
|
623
|
+
| 'mzn'
|
|
624
|
+
| 'nad'
|
|
625
|
+
| 'ngn'
|
|
626
|
+
| 'nok'
|
|
627
|
+
| 'npr'
|
|
628
|
+
| 'nzd'
|
|
629
|
+
| 'pgk'
|
|
630
|
+
| 'php'
|
|
631
|
+
| 'pkr'
|
|
632
|
+
| 'pln'
|
|
633
|
+
| 'qar'
|
|
634
|
+
| 'ron'
|
|
635
|
+
| 'rsd'
|
|
636
|
+
| 'rub'
|
|
637
|
+
| 'rwf'
|
|
638
|
+
| 'sar'
|
|
639
|
+
| 'sbd'
|
|
640
|
+
| 'scr'
|
|
641
|
+
| 'sek'
|
|
642
|
+
| 'sgd'
|
|
643
|
+
| 'sle'
|
|
644
|
+
| 'sll'
|
|
645
|
+
| 'sos'
|
|
646
|
+
| 'szl'
|
|
647
|
+
| 'thb'
|
|
648
|
+
| 'tjs'
|
|
649
|
+
| 'top'
|
|
650
|
+
| 'try'
|
|
651
|
+
| 'ttd'
|
|
652
|
+
| 'tzs'
|
|
653
|
+
| 'uah'
|
|
654
|
+
| 'uzs'
|
|
655
|
+
| 'vnd'
|
|
656
|
+
| 'vuv'
|
|
657
|
+
| 'wst'
|
|
658
|
+
| 'xaf'
|
|
659
|
+
| 'xcd'
|
|
660
|
+
| 'yer'
|
|
661
|
+
| 'zar'
|
|
662
|
+
| 'zmw'
|
|
663
|
+
| 'clp'
|
|
664
|
+
| 'djf'
|
|
665
|
+
| 'gnf'
|
|
666
|
+
| 'ugx'
|
|
667
|
+
| 'pyg'
|
|
668
|
+
| 'xof'
|
|
669
|
+
| 'xpf';
|
|
648
670
|
}
|
|
649
671
|
}
|
|
650
672
|
|
|
@@ -686,6 +708,9 @@ export interface CouponCreateParams {
|
|
|
686
708
|
}
|
|
687
709
|
|
|
688
710
|
export namespace CouponCreateParams {
|
|
711
|
+
/**
|
|
712
|
+
* Monetary amount with currency
|
|
713
|
+
*/
|
|
689
714
|
export interface AmountsOff {
|
|
690
715
|
/**
|
|
691
716
|
* The price amount
|
|
@@ -815,28 +840,14 @@ export namespace CouponCreateParams {
|
|
|
815
840
|
}
|
|
816
841
|
}
|
|
817
842
|
|
|
818
|
-
export interface CouponListParams {
|
|
819
|
-
/**
|
|
820
|
-
* Ending before this UUID for pagination
|
|
821
|
-
*/
|
|
822
|
-
endingBefore?: string;
|
|
823
|
-
|
|
824
|
-
/**
|
|
825
|
-
* Items per page
|
|
826
|
-
*/
|
|
827
|
-
limit?: number;
|
|
828
|
-
|
|
829
|
-
/**
|
|
830
|
-
* Starting after this UUID for pagination
|
|
831
|
-
*/
|
|
832
|
-
startingAfter?: string;
|
|
833
|
-
}
|
|
843
|
+
export interface CouponListParams extends MyCursorIDPageParams {}
|
|
834
844
|
|
|
835
845
|
export declare namespace Coupons {
|
|
836
846
|
export {
|
|
837
847
|
type CouponCreateResponse as CouponCreateResponse,
|
|
838
848
|
type CouponRetrieveResponse as CouponRetrieveResponse,
|
|
839
849
|
type CouponListResponse as CouponListResponse,
|
|
850
|
+
type CouponListResponsesMyCursorIDPage as CouponListResponsesMyCursorIDPage,
|
|
840
851
|
type CouponCreateParams as CouponCreateParams,
|
|
841
852
|
type CouponListParams as CouponListParams,
|
|
842
853
|
};
|