@whop/sdk 0.0.10 → 0.0.11

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.
Files changed (71) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +3 -3
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +3 -3
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -3
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/index.d.mts +1 -1
  12. package/resources/index.d.mts.map +1 -1
  13. package/resources/index.d.ts +1 -1
  14. package/resources/index.d.ts.map +1 -1
  15. package/resources/index.js +3 -3
  16. package/resources/index.js.map +1 -1
  17. package/resources/index.mjs +1 -1
  18. package/resources/index.mjs.map +1 -1
  19. package/resources/invoices.d.mts +20 -0
  20. package/resources/invoices.d.mts.map +1 -1
  21. package/resources/invoices.d.ts +20 -0
  22. package/resources/invoices.d.ts.map +1 -1
  23. package/resources/payment-methods.d.mts +163 -0
  24. package/resources/payment-methods.d.mts.map +1 -0
  25. package/resources/payment-methods.d.ts +163 -0
  26. package/resources/payment-methods.d.ts.map +1 -0
  27. package/resources/payment-methods.js +42 -0
  28. package/resources/payment-methods.js.map +1 -0
  29. package/resources/payment-methods.mjs +38 -0
  30. package/resources/payment-methods.mjs.map +1 -0
  31. package/resources/payments.d.mts +23 -23
  32. package/resources/payments.d.mts.map +1 -1
  33. package/resources/payments.d.ts +23 -23
  34. package/resources/payments.d.ts.map +1 -1
  35. package/resources/payments.js +6 -4
  36. package/resources/payments.js.map +1 -1
  37. package/resources/payments.mjs +6 -4
  38. package/resources/payments.mjs.map +1 -1
  39. package/resources/setup-intents.d.mts +32 -28
  40. package/resources/setup-intents.d.mts.map +1 -1
  41. package/resources/setup-intents.d.ts +32 -28
  42. package/resources/setup-intents.d.ts.map +1 -1
  43. package/resources/setup-intents.js +10 -2
  44. package/resources/setup-intents.js.map +1 -1
  45. package/resources/setup-intents.mjs +10 -2
  46. package/resources/setup-intents.mjs.map +1 -1
  47. package/resources/shared.d.mts +13 -15
  48. package/resources/shared.d.mts.map +1 -1
  49. package/resources/shared.d.ts +13 -15
  50. package/resources/shared.d.ts.map +1 -1
  51. package/src/client.ts +15 -15
  52. package/src/resources/index.ts +7 -7
  53. package/src/resources/invoices.ts +24 -0
  54. package/src/resources/payment-methods.ts +213 -0
  55. package/src/resources/payments.ts +23 -23
  56. package/src/resources/setup-intents.ts +32 -28
  57. package/src/resources/shared.ts +13 -15
  58. package/src/version.ts +1 -1
  59. package/version.d.mts +1 -1
  60. package/version.d.ts +1 -1
  61. package/version.js +1 -1
  62. package/version.mjs +1 -1
  63. package/resources/payment-tokens.d.mts +0 -157
  64. package/resources/payment-tokens.d.mts.map +0 -1
  65. package/resources/payment-tokens.d.ts +0 -157
  66. package/resources/payment-tokens.d.ts.map +0 -1
  67. package/resources/payment-tokens.js +0 -34
  68. package/resources/payment-tokens.js.map +0 -1
  69. package/resources/payment-tokens.mjs +0 -30
  70. package/resources/payment-tokens.mjs.map +0 -1
  71. package/src/resources/payment-tokens.ts +0 -207
@@ -10,7 +10,11 @@ import { path } from '../internal/utils/path';
10
10
 
11
11
  export class SetupIntents extends APIResource {
12
12
  /**
13
- * Retrieves a Setup Intent by ID
13
+ * A setup intent is an object used to securely collect and store a member’s
14
+ * payment method for future use without charging them immediately. It handles
15
+ * authentication steps up front so future off-session payments can be completed
16
+ * smoothly. This ensures the payment method is verified and ready for later
17
+ * billing.
14
18
  *
15
19
  * Required permissions:
16
20
  *
@@ -23,7 +27,11 @@ export class SetupIntents extends APIResource {
23
27
  }
24
28
 
25
29
  /**
26
- * Lists Setup Intents
30
+ * A setup intent is an object used to securely collect and store a member’s
31
+ * payment method for future use without charging them immediately. It handles
32
+ * authentication steps up front so future off-session payments can be completed
33
+ * smoothly. This ensures the payment method is verified and ready for later
34
+ * billing.
27
35
  *
28
36
  * Required permissions:
29
37
  *
@@ -85,9 +93,9 @@ export interface SetupIntent {
85
93
  metadata: { [key: string]: unknown } | null;
86
94
 
87
95
  /**
88
- * The payment token created during the setup, if available.
96
+ * The payment method created during the setup, if available.
89
97
  */
90
- payment_token: SetupIntent.PaymentToken | null;
98
+ payment_method: SetupIntent.PaymentMethod | null;
91
99
 
92
100
  /**
93
101
  * The status of the setup intent
@@ -159,35 +167,33 @@ export namespace SetupIntent {
159
167
  }
160
168
 
161
169
  /**
162
- * The payment token created during the setup, if available.
170
+ * The payment method created during the setup, if available.
163
171
  */
164
- export interface PaymentToken {
172
+ export interface PaymentMethod {
165
173
  /**
166
- * The ID of the payment token
174
+ * The ID of the payment method
167
175
  */
168
176
  id: string;
169
177
 
170
178
  /**
171
- * The card data associated with the payment token, if its a debit or credit card
172
- * token.
179
+ * The card data associated with the payment method, if its a debit or credit card.
173
180
  */
174
- card: PaymentToken.Card | null;
181
+ card: PaymentMethod.Card | null;
175
182
 
176
183
  /**
177
- * The date and time the payment token was created
184
+ * The date and time the payment method was created
178
185
  */
179
186
  created_at: string;
180
187
 
181
188
  /**
182
- * The payment method type of the payment token
189
+ * The payment method type of the payment method
183
190
  */
184
191
  payment_method_type: PaymentsAPI.PaymentMethodTypes;
185
192
  }
186
193
 
187
- export namespace PaymentToken {
194
+ export namespace PaymentMethod {
188
195
  /**
189
- * The card data associated with the payment token, if its a debit or credit card
190
- * token.
196
+ * The card data associated with the payment method, if its a debit or credit card.
191
197
  */
192
198
  export interface Card {
193
199
  /**
@@ -259,9 +265,9 @@ export interface SetupIntentListResponse {
259
265
  metadata: { [key: string]: unknown } | null;
260
266
 
261
267
  /**
262
- * The payment token created during the setup, if available.
268
+ * The payment method created during the setup, if available.
263
269
  */
264
- payment_token: SetupIntentListResponse.PaymentToken | null;
270
+ payment_method: SetupIntentListResponse.PaymentMethod | null;
265
271
 
266
272
  /**
267
273
  * The status of the setup intent
@@ -333,35 +339,33 @@ export namespace SetupIntentListResponse {
333
339
  }
334
340
 
335
341
  /**
336
- * The payment token created during the setup, if available.
342
+ * The payment method created during the setup, if available.
337
343
  */
338
- export interface PaymentToken {
344
+ export interface PaymentMethod {
339
345
  /**
340
- * The ID of the payment token
346
+ * The ID of the payment method
341
347
  */
342
348
  id: string;
343
349
 
344
350
  /**
345
- * The card data associated with the payment token, if its a debit or credit card
346
- * token.
351
+ * The card data associated with the payment method, if its a debit or credit card.
347
352
  */
348
- card: PaymentToken.Card | null;
353
+ card: PaymentMethod.Card | null;
349
354
 
350
355
  /**
351
- * The date and time the payment token was created
356
+ * The date and time the payment method was created
352
357
  */
353
358
  created_at: string;
354
359
 
355
360
  /**
356
- * The payment method type of the payment token
361
+ * The payment method type of the payment method
357
362
  */
358
363
  payment_method_type: PaymentsAPI.PaymentMethodTypes;
359
364
  }
360
365
 
361
- export namespace PaymentToken {
366
+ export namespace PaymentMethod {
362
367
  /**
363
- * The card data associated with the payment token, if its a debit or credit card
364
- * token.
368
+ * The card data associated with the payment method, if its a debit or credit card.
365
369
  */
366
370
  export interface Card {
367
371
  /**
@@ -2169,14 +2169,14 @@ export interface Payment {
2169
2169
  paid_at: string | null;
2170
2170
 
2171
2171
  /**
2172
- * The different types of payment methods that can be used.
2172
+ * The payment method used for the payment, if available.
2173
2173
  */
2174
- payment_method_type: PaymentsAPI.PaymentMethodTypes | null;
2174
+ payment_method: Payment.PaymentMethod | null;
2175
2175
 
2176
2176
  /**
2177
- * The payment token used for the payment, if available.
2177
+ * The different types of payment methods that can be used.
2178
2178
  */
2179
- payment_token: Payment.PaymentToken | null;
2179
+ payment_method_type: PaymentsAPI.PaymentMethodTypes | null;
2180
2180
 
2181
2181
  /**
2182
2182
  * The plan attached to this payment.
@@ -2345,35 +2345,33 @@ export namespace Payment {
2345
2345
  }
2346
2346
 
2347
2347
  /**
2348
- * The payment token used for the payment, if available.
2348
+ * The payment method used for the payment, if available.
2349
2349
  */
2350
- export interface PaymentToken {
2350
+ export interface PaymentMethod {
2351
2351
  /**
2352
- * The ID of the payment token
2352
+ * The ID of the payment method
2353
2353
  */
2354
2354
  id: string;
2355
2355
 
2356
2356
  /**
2357
- * The card data associated with the payment token, if its a debit or credit card
2358
- * token.
2357
+ * The card data associated with the payment method, if its a debit or credit card.
2359
2358
  */
2360
- card: PaymentToken.Card | null;
2359
+ card: PaymentMethod.Card | null;
2361
2360
 
2362
2361
  /**
2363
- * The date and time the payment token was created
2362
+ * The date and time the payment method was created
2364
2363
  */
2365
2364
  created_at: string;
2366
2365
 
2367
2366
  /**
2368
- * The payment method type of the payment token
2367
+ * The payment method type of the payment method
2369
2368
  */
2370
2369
  payment_method_type: PaymentsAPI.PaymentMethodTypes;
2371
2370
  }
2372
2371
 
2373
- export namespace PaymentToken {
2372
+ export namespace PaymentMethod {
2374
2373
  /**
2375
- * The card data associated with the payment token, if its a debit or credit card
2376
- * token.
2374
+ * The card data associated with the payment method, if its a debit or credit card.
2377
2375
  */
2378
2376
  export interface Card {
2379
2377
  /**
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.0.10'; // x-release-please-version
1
+ export const VERSION = '0.0.11'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.0.10";
1
+ export declare const VERSION = "0.0.11";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.0.10";
1
+ export declare const VERSION = "0.0.11";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.0.10'; // x-release-please-version
4
+ exports.VERSION = '0.0.11'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.0.10'; // x-release-please-version
1
+ export const VERSION = '0.0.11'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
@@ -1,157 +0,0 @@
1
- import { APIResource } from "../core/resource.mjs";
2
- import * as PaymentsAPI from "./payments.mjs";
3
- import * as Shared from "./shared.mjs";
4
- import { APIPromise } from "../core/api-promise.mjs";
5
- import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.mjs";
6
- import { RequestOptions } from "../internal/request-options.mjs";
7
- export declare class PaymentTokens extends APIResource {
8
- /**
9
- * Retrieves a PaymentToken by ID
10
- *
11
- * Required permissions:
12
- *
13
- * - `member:payment_methods:read`
14
- */
15
- retrieve(id: string, query: PaymentTokenRetrieveParams, options?: RequestOptions): APIPromise<PaymentTokenRetrieveResponse>;
16
- /**
17
- * Lists PaymentTokens
18
- *
19
- * Required permissions:
20
- *
21
- * - `member:payment_methods:read`
22
- */
23
- list(query: PaymentTokenListParams, options?: RequestOptions): PagePromise<PaymentTokenListResponsesCursorPage, PaymentTokenListResponse>;
24
- }
25
- export type PaymentTokenListResponsesCursorPage = CursorPage<PaymentTokenListResponse>;
26
- /**
27
- * A payment token used to process payments.
28
- */
29
- export interface PaymentTokenRetrieveResponse {
30
- /**
31
- * The ID of the payment token
32
- */
33
- id: string;
34
- /**
35
- * The card data associated with the payment token, if its a debit or credit card
36
- * token.
37
- */
38
- card: PaymentTokenRetrieveResponse.Card | null;
39
- /**
40
- * The date and time the payment token was created
41
- */
42
- created_at: string;
43
- /**
44
- * The payment method type of the payment token
45
- */
46
- payment_method_type: PaymentsAPI.PaymentMethodTypes;
47
- }
48
- export declare namespace PaymentTokenRetrieveResponse {
49
- /**
50
- * The card data associated with the payment token, if its a debit or credit card
51
- * token.
52
- */
53
- interface Card {
54
- /**
55
- * Possible card brands that a payment token can have
56
- */
57
- brand: PaymentsAPI.CardBrands | null;
58
- /**
59
- * Card expiration month, like 03 for March.
60
- */
61
- exp_month: number | null;
62
- /**
63
- * Card expiration year, like 27 for 2027.
64
- */
65
- exp_year: number | null;
66
- /**
67
- * Last four digits of the card.
68
- */
69
- last4: string | null;
70
- }
71
- }
72
- /**
73
- * A payment token used to process payments.
74
- */
75
- export interface PaymentTokenListResponse {
76
- /**
77
- * The ID of the payment token
78
- */
79
- id: string;
80
- /**
81
- * The card data associated with the payment token, if its a debit or credit card
82
- * token.
83
- */
84
- card: PaymentTokenListResponse.Card | null;
85
- /**
86
- * The date and time the payment token was created
87
- */
88
- created_at: string;
89
- /**
90
- * The payment method type of the payment token
91
- */
92
- payment_method_type: PaymentsAPI.PaymentMethodTypes;
93
- }
94
- export declare namespace PaymentTokenListResponse {
95
- /**
96
- * The card data associated with the payment token, if its a debit or credit card
97
- * token.
98
- */
99
- interface Card {
100
- /**
101
- * Possible card brands that a payment token can have
102
- */
103
- brand: PaymentsAPI.CardBrands | null;
104
- /**
105
- * Card expiration month, like 03 for March.
106
- */
107
- exp_month: number | null;
108
- /**
109
- * Card expiration year, like 27 for 2027.
110
- */
111
- exp_year: number | null;
112
- /**
113
- * Last four digits of the card.
114
- */
115
- last4: string | null;
116
- }
117
- }
118
- export interface PaymentTokenRetrieveParams {
119
- /**
120
- * The ID of the Member associated with the PaymentToken
121
- */
122
- member_id: string;
123
- }
124
- export interface PaymentTokenListParams extends CursorPageParams {
125
- /**
126
- * The ID of the Member to list payment tokens for
127
- */
128
- member_id: string;
129
- /**
130
- * Returns the elements in the list that come before the specified cursor.
131
- */
132
- before?: string | null;
133
- /**
134
- * The minimum creation date to filter by
135
- */
136
- created_after?: string | null;
137
- /**
138
- * The maximum creation date to filter by
139
- */
140
- created_before?: string | null;
141
- /**
142
- * The direction of the sort.
143
- */
144
- direction?: Shared.Direction | null;
145
- /**
146
- * Returns the first _n_ elements from the list.
147
- */
148
- first?: number | null;
149
- /**
150
- * Returns the last _n_ elements from the list.
151
- */
152
- last?: number | null;
153
- }
154
- export declare namespace PaymentTokens {
155
- export { type PaymentTokenRetrieveResponse as PaymentTokenRetrieveResponse, type PaymentTokenListResponse as PaymentTokenListResponse, type PaymentTokenListResponsesCursorPage as PaymentTokenListResponsesCursorPage, type PaymentTokenRetrieveParams as PaymentTokenRetrieveParams, type PaymentTokenListParams as PaymentTokenListParams, };
156
- }
157
- //# sourceMappingURL=payment-tokens.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-tokens.d.mts","sourceRoot":"","sources":["../src/resources/payment-tokens.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;OAMG;IACH,QAAQ,CACN,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,0BAA0B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAI3C;;;;;;OAMG;IACH,IAAI,CACF,KAAK,EAAE,sBAAsB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,mCAAmC,EAAE,wBAAwB,CAAC;CAM9E;AAED,MAAM,MAAM,mCAAmC,GAAG,UAAU,CAAC,wBAAwB,CAAC,CAAC;AAEvF;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,IAAI,EAAE,4BAA4B,CAAC,IAAI,GAAG,IAAI,CAAC;IAE/C;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,mBAAmB,EAAE,WAAW,CAAC,kBAAkB,CAAC;CACrD;AAED,yBAAiB,4BAA4B,CAAC;IAC5C;;;OAGG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,KAAK,EAAE,WAAW,CAAC,UAAU,GAAG,IAAI,CAAC;QAErC;;WAEG;QACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QAEzB;;WAEG;QACH,QAAQ,EAAE,MAAM,GAAG,IAAI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,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -1,157 +0,0 @@
1
- import { APIResource } from "../core/resource.js";
2
- import * as PaymentsAPI from "./payments.js";
3
- import * as Shared from "./shared.js";
4
- import { APIPromise } from "../core/api-promise.js";
5
- import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.js";
6
- import { RequestOptions } from "../internal/request-options.js";
7
- export declare class PaymentTokens extends APIResource {
8
- /**
9
- * Retrieves a PaymentToken by ID
10
- *
11
- * Required permissions:
12
- *
13
- * - `member:payment_methods:read`
14
- */
15
- retrieve(id: string, query: PaymentTokenRetrieveParams, options?: RequestOptions): APIPromise<PaymentTokenRetrieveResponse>;
16
- /**
17
- * Lists PaymentTokens
18
- *
19
- * Required permissions:
20
- *
21
- * - `member:payment_methods:read`
22
- */
23
- list(query: PaymentTokenListParams, options?: RequestOptions): PagePromise<PaymentTokenListResponsesCursorPage, PaymentTokenListResponse>;
24
- }
25
- export type PaymentTokenListResponsesCursorPage = CursorPage<PaymentTokenListResponse>;
26
- /**
27
- * A payment token used to process payments.
28
- */
29
- export interface PaymentTokenRetrieveResponse {
30
- /**
31
- * The ID of the payment token
32
- */
33
- id: string;
34
- /**
35
- * The card data associated with the payment token, if its a debit or credit card
36
- * token.
37
- */
38
- card: PaymentTokenRetrieveResponse.Card | null;
39
- /**
40
- * The date and time the payment token was created
41
- */
42
- created_at: string;
43
- /**
44
- * The payment method type of the payment token
45
- */
46
- payment_method_type: PaymentsAPI.PaymentMethodTypes;
47
- }
48
- export declare namespace PaymentTokenRetrieveResponse {
49
- /**
50
- * The card data associated with the payment token, if its a debit or credit card
51
- * token.
52
- */
53
- interface Card {
54
- /**
55
- * Possible card brands that a payment token can have
56
- */
57
- brand: PaymentsAPI.CardBrands | null;
58
- /**
59
- * Card expiration month, like 03 for March.
60
- */
61
- exp_month: number | null;
62
- /**
63
- * Card expiration year, like 27 for 2027.
64
- */
65
- exp_year: number | null;
66
- /**
67
- * Last four digits of the card.
68
- */
69
- last4: string | null;
70
- }
71
- }
72
- /**
73
- * A payment token used to process payments.
74
- */
75
- export interface PaymentTokenListResponse {
76
- /**
77
- * The ID of the payment token
78
- */
79
- id: string;
80
- /**
81
- * The card data associated with the payment token, if its a debit or credit card
82
- * token.
83
- */
84
- card: PaymentTokenListResponse.Card | null;
85
- /**
86
- * The date and time the payment token was created
87
- */
88
- created_at: string;
89
- /**
90
- * The payment method type of the payment token
91
- */
92
- payment_method_type: PaymentsAPI.PaymentMethodTypes;
93
- }
94
- export declare namespace PaymentTokenListResponse {
95
- /**
96
- * The card data associated with the payment token, if its a debit or credit card
97
- * token.
98
- */
99
- interface Card {
100
- /**
101
- * Possible card brands that a payment token can have
102
- */
103
- brand: PaymentsAPI.CardBrands | null;
104
- /**
105
- * Card expiration month, like 03 for March.
106
- */
107
- exp_month: number | null;
108
- /**
109
- * Card expiration year, like 27 for 2027.
110
- */
111
- exp_year: number | null;
112
- /**
113
- * Last four digits of the card.
114
- */
115
- last4: string | null;
116
- }
117
- }
118
- export interface PaymentTokenRetrieveParams {
119
- /**
120
- * The ID of the Member associated with the PaymentToken
121
- */
122
- member_id: string;
123
- }
124
- export interface PaymentTokenListParams extends CursorPageParams {
125
- /**
126
- * The ID of the Member to list payment tokens for
127
- */
128
- member_id: string;
129
- /**
130
- * Returns the elements in the list that come before the specified cursor.
131
- */
132
- before?: string | null;
133
- /**
134
- * The minimum creation date to filter by
135
- */
136
- created_after?: string | null;
137
- /**
138
- * The maximum creation date to filter by
139
- */
140
- created_before?: string | null;
141
- /**
142
- * The direction of the sort.
143
- */
144
- direction?: Shared.Direction | null;
145
- /**
146
- * Returns the first _n_ elements from the list.
147
- */
148
- first?: number | null;
149
- /**
150
- * Returns the last _n_ elements from the list.
151
- */
152
- last?: number | null;
153
- }
154
- export declare namespace PaymentTokens {
155
- export { type PaymentTokenRetrieveResponse as PaymentTokenRetrieveResponse, type PaymentTokenListResponse as PaymentTokenListResponse, type PaymentTokenListResponsesCursorPage as PaymentTokenListResponsesCursorPage, type PaymentTokenRetrieveParams as PaymentTokenRetrieveParams, type PaymentTokenListParams as PaymentTokenListParams, };
156
- }
157
- //# sourceMappingURL=payment-tokens.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-tokens.d.ts","sourceRoot":"","sources":["../src/resources/payment-tokens.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;OAMG;IACH,QAAQ,CACN,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,0BAA0B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAI3C;;;;;;OAMG;IACH,IAAI,CACF,KAAK,EAAE,sBAAsB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,mCAAmC,EAAE,wBAAwB,CAAC;CAM9E;AAED,MAAM,MAAM,mCAAmC,GAAG,UAAU,CAAC,wBAAwB,CAAC,CAAC;AAEvF;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,IAAI,EAAE,4BAA4B,CAAC,IAAI,GAAG,IAAI,CAAC;IAE/C;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,mBAAmB,EAAE,WAAW,CAAC,kBAAkB,CAAC;CACrD;AAED,yBAAiB,4BAA4B,CAAC;IAC5C;;;OAGG;IACH,UAAiB,IAAI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IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -1,34 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.PaymentTokens = void 0;
5
- const resource_1 = require("../core/resource.js");
6
- const pagination_1 = require("../core/pagination.js");
7
- const path_1 = require("../internal/utils/path.js");
8
- class PaymentTokens extends resource_1.APIResource {
9
- /**
10
- * Retrieves a PaymentToken by ID
11
- *
12
- * Required permissions:
13
- *
14
- * - `member:payment_methods:read`
15
- */
16
- retrieve(id, query, options) {
17
- return this._client.get((0, path_1.path) `/payment_tokens/${id}`, { query, ...options });
18
- }
19
- /**
20
- * Lists PaymentTokens
21
- *
22
- * Required permissions:
23
- *
24
- * - `member:payment_methods:read`
25
- */
26
- list(query, options) {
27
- return this._client.getAPIList('/payment_tokens', (pagination_1.CursorPage), {
28
- query,
29
- ...options,
30
- });
31
- }
32
- }
33
- exports.PaymentTokens = PaymentTokens;
34
- //# sourceMappingURL=payment-tokens.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-tokens.js","sourceRoot":"","sources":["../src/resources/payment-tokens.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;;OAMG;IACH,QAAQ,CACN,EAAU,EACV,KAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,mBAAmB,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;OAMG;IACH,IAAI,CACF,KAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAA,uBAAoC,CAAA,EAAE;YACtF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAhCD,sCAgCC"}
@@ -1,30 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../core/resource.mjs";
3
- import { CursorPage } from "../core/pagination.mjs";
4
- import { path } from "../internal/utils/path.mjs";
5
- export class PaymentTokens extends APIResource {
6
- /**
7
- * Retrieves a PaymentToken by ID
8
- *
9
- * Required permissions:
10
- *
11
- * - `member:payment_methods:read`
12
- */
13
- retrieve(id, query, options) {
14
- return this._client.get(path `/payment_tokens/${id}`, { query, ...options });
15
- }
16
- /**
17
- * Lists PaymentTokens
18
- *
19
- * Required permissions:
20
- *
21
- * - `member:payment_methods:read`
22
- */
23
- list(query, options) {
24
- return this._client.getAPIList('/payment_tokens', (CursorPage), {
25
- query,
26
- ...options,
27
- });
28
- }
29
- }
30
- //# sourceMappingURL=payment-tokens.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-tokens.mjs","sourceRoot":"","sources":["../src/resources/payment-tokens.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;;;;OAMG;IACH,QAAQ,CACN,EAAU,EACV,KAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,mBAAmB,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;OAMG;IACH,IAAI,CACF,KAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAA,UAAoC,CAAA,EAAE;YACtF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}