@whop/sdk 0.0.15 → 0.0.16
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 +14 -0
- package/client.d.mts +7 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -4
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/courses.d.mts +33 -0
- package/resources/courses.d.mts.map +1 -1
- package/resources/courses.d.ts +33 -0
- package/resources/courses.d.ts.map +1 -1
- package/resources/index.d.mts +3 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/payment-methods.d.mts +202 -54
- package/resources/payment-methods.d.mts.map +1 -1
- package/resources/payment-methods.d.ts +202 -54
- package/resources/payment-methods.d.ts.map +1 -1
- package/resources/payments.d.mts +55 -1
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +55 -1
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +23 -0
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +23 -0
- package/resources/payments.mjs.map +1 -1
- package/resources/payout-methods.d.mts +78 -0
- package/resources/payout-methods.d.mts.map +1 -0
- package/resources/payout-methods.d.ts +78 -0
- package/resources/payout-methods.d.ts.map +1 -0
- package/resources/payout-methods.js +23 -0
- package/resources/payout-methods.js.map +1 -0
- package/resources/payout-methods.mjs +19 -0
- package/resources/payout-methods.mjs.map +1 -0
- package/resources/shared.d.mts +30 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +30 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/withdrawals.d.mts +170 -1
- package/resources/withdrawals.d.mts.map +1 -1
- package/resources/withdrawals.d.ts +170 -1
- package/resources/withdrawals.d.ts.map +1 -1
- package/resources/withdrawals.js +38 -0
- package/resources/withdrawals.js.map +1 -1
- package/resources/withdrawals.mjs +38 -0
- package/resources/withdrawals.mjs.map +1 -1
- package/src/client.ts +25 -0
- package/src/resources/courses.ts +38 -0
- package/src/resources/index.ts +11 -0
- package/src/resources/payment-methods.ts +236 -54
- package/src/resources/payments.ts +105 -0
- package/src/resources/payout-methods.ts +105 -0
- package/src/resources/shared.ts +34 -0
- package/src/resources/withdrawals.ts +247 -0
- 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
|
@@ -53,108 +53,290 @@ export class PaymentMethods extends APIResource {
|
|
|
53
53
|
export type PaymentMethodListResponsesCursorPage = CursorPage<PaymentMethodListResponse>;
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
* A
|
|
57
|
-
* card, bank account, PayPal wallet, etc.
|
|
56
|
+
* A payment method with no additional properties
|
|
58
57
|
*/
|
|
59
|
-
export
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
id: string;
|
|
58
|
+
export type PaymentMethodRetrieveResponse =
|
|
59
|
+
| PaymentMethodRetrieveResponse.BasePaymentMethod
|
|
60
|
+
| PaymentMethodRetrieveResponse.CardPaymentMethod
|
|
61
|
+
| PaymentMethodRetrieveResponse.UsBankAccountPaymentMethod;
|
|
64
62
|
|
|
63
|
+
export namespace PaymentMethodRetrieveResponse {
|
|
65
64
|
/**
|
|
66
|
-
*
|
|
65
|
+
* A payment method with no additional properties
|
|
67
66
|
*/
|
|
68
|
-
|
|
67
|
+
export interface BasePaymentMethod {
|
|
68
|
+
/**
|
|
69
|
+
* The ID of the payment method
|
|
70
|
+
*/
|
|
71
|
+
id: string;
|
|
69
72
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
/**
|
|
74
|
+
* When the payment method was created
|
|
75
|
+
*/
|
|
76
|
+
created_at: string;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The type of the payment method
|
|
80
|
+
*/
|
|
81
|
+
payment_method_type: PaymentsAPI.PaymentMethodTypes;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The typename of this object
|
|
85
|
+
*/
|
|
86
|
+
typename: 'BasePaymentMethod';
|
|
87
|
+
}
|
|
74
88
|
|
|
75
89
|
/**
|
|
76
|
-
* The
|
|
90
|
+
* The card for the payment method
|
|
77
91
|
*/
|
|
78
|
-
|
|
79
|
-
|
|
92
|
+
export interface CardPaymentMethod {
|
|
93
|
+
/**
|
|
94
|
+
* The ID of the payment method
|
|
95
|
+
*/
|
|
96
|
+
id: string;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* The card details associated with this payment method
|
|
100
|
+
*/
|
|
101
|
+
card: CardPaymentMethod.Card;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* When the payment method was created
|
|
105
|
+
*/
|
|
106
|
+
created_at: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The type of the payment method
|
|
110
|
+
*/
|
|
111
|
+
payment_method_type: PaymentsAPI.PaymentMethodTypes;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The typename of this object
|
|
115
|
+
*/
|
|
116
|
+
typename: 'CardPaymentMethod';
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export namespace CardPaymentMethod {
|
|
120
|
+
/**
|
|
121
|
+
* The card details associated with this payment method
|
|
122
|
+
*/
|
|
123
|
+
export interface Card {
|
|
124
|
+
/**
|
|
125
|
+
* Possible card brands that a payment token can have
|
|
126
|
+
*/
|
|
127
|
+
brand: PaymentsAPI.CardBrands | null;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Card expiration month, like 03 for March.
|
|
131
|
+
*/
|
|
132
|
+
exp_month: number | null;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Card expiration year, like 27 for 2027.
|
|
136
|
+
*/
|
|
137
|
+
exp_year: number | null;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Last four digits of the card.
|
|
141
|
+
*/
|
|
142
|
+
last4: string | null;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
80
145
|
|
|
81
|
-
export namespace PaymentMethodRetrieveResponse {
|
|
82
146
|
/**
|
|
83
|
-
* The
|
|
147
|
+
* The bank account for the payment method
|
|
84
148
|
*/
|
|
85
|
-
export interface
|
|
149
|
+
export interface UsBankAccountPaymentMethod {
|
|
150
|
+
/**
|
|
151
|
+
* The ID of the payment method
|
|
152
|
+
*/
|
|
153
|
+
id: string;
|
|
154
|
+
|
|
86
155
|
/**
|
|
87
|
-
*
|
|
156
|
+
* When the payment method was created
|
|
88
157
|
*/
|
|
89
|
-
|
|
158
|
+
created_at: string;
|
|
90
159
|
|
|
91
160
|
/**
|
|
92
|
-
*
|
|
161
|
+
* The type of the payment method
|
|
93
162
|
*/
|
|
94
|
-
|
|
163
|
+
payment_method_type: PaymentsAPI.PaymentMethodTypes;
|
|
95
164
|
|
|
96
165
|
/**
|
|
97
|
-
*
|
|
166
|
+
* The typename of this object
|
|
98
167
|
*/
|
|
99
|
-
|
|
168
|
+
typename: 'UsBankAccountPaymentMethod';
|
|
100
169
|
|
|
101
170
|
/**
|
|
102
|
-
*
|
|
171
|
+
* The bank details associated with this payment method
|
|
103
172
|
*/
|
|
104
|
-
|
|
173
|
+
us_bank_account: UsBankAccountPaymentMethod.UsBankAccount;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export namespace UsBankAccountPaymentMethod {
|
|
177
|
+
/**
|
|
178
|
+
* The bank details associated with this payment method
|
|
179
|
+
*/
|
|
180
|
+
export interface UsBankAccount {
|
|
181
|
+
/**
|
|
182
|
+
* The type of account
|
|
183
|
+
*/
|
|
184
|
+
account_type: string;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* The name of the bank
|
|
188
|
+
*/
|
|
189
|
+
bank_name: string;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* The last 4 digits of the account number
|
|
193
|
+
*/
|
|
194
|
+
last4: string;
|
|
195
|
+
}
|
|
105
196
|
}
|
|
106
197
|
}
|
|
107
198
|
|
|
108
199
|
/**
|
|
109
|
-
* A
|
|
110
|
-
* card, bank account, PayPal wallet, etc.
|
|
200
|
+
* A payment method with no additional properties
|
|
111
201
|
*/
|
|
112
|
-
export
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
id: string;
|
|
202
|
+
export type PaymentMethodListResponse =
|
|
203
|
+
| PaymentMethodListResponse.BasePaymentMethod
|
|
204
|
+
| PaymentMethodListResponse.CardPaymentMethod
|
|
205
|
+
| PaymentMethodListResponse.UsBankAccountPaymentMethod;
|
|
117
206
|
|
|
207
|
+
export namespace PaymentMethodListResponse {
|
|
118
208
|
/**
|
|
119
|
-
*
|
|
209
|
+
* A payment method with no additional properties
|
|
120
210
|
*/
|
|
121
|
-
|
|
211
|
+
export interface BasePaymentMethod {
|
|
212
|
+
/**
|
|
213
|
+
* The ID of the payment method
|
|
214
|
+
*/
|
|
215
|
+
id: string;
|
|
122
216
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
217
|
+
/**
|
|
218
|
+
* When the payment method was created
|
|
219
|
+
*/
|
|
220
|
+
created_at: string;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* The type of the payment method
|
|
224
|
+
*/
|
|
225
|
+
payment_method_type: PaymentsAPI.PaymentMethodTypes;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* The typename of this object
|
|
229
|
+
*/
|
|
230
|
+
typename: 'BasePaymentMethod';
|
|
231
|
+
}
|
|
127
232
|
|
|
128
233
|
/**
|
|
129
|
-
* The
|
|
234
|
+
* The card for the payment method
|
|
130
235
|
*/
|
|
131
|
-
|
|
132
|
-
|
|
236
|
+
export interface CardPaymentMethod {
|
|
237
|
+
/**
|
|
238
|
+
* The ID of the payment method
|
|
239
|
+
*/
|
|
240
|
+
id: string;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* The card details associated with this payment method
|
|
244
|
+
*/
|
|
245
|
+
card: CardPaymentMethod.Card;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* When the payment method was created
|
|
249
|
+
*/
|
|
250
|
+
created_at: string;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* The type of the payment method
|
|
254
|
+
*/
|
|
255
|
+
payment_method_type: PaymentsAPI.PaymentMethodTypes;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* The typename of this object
|
|
259
|
+
*/
|
|
260
|
+
typename: 'CardPaymentMethod';
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export namespace CardPaymentMethod {
|
|
264
|
+
/**
|
|
265
|
+
* The card details associated with this payment method
|
|
266
|
+
*/
|
|
267
|
+
export interface Card {
|
|
268
|
+
/**
|
|
269
|
+
* Possible card brands that a payment token can have
|
|
270
|
+
*/
|
|
271
|
+
brand: PaymentsAPI.CardBrands | null;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Card expiration month, like 03 for March.
|
|
275
|
+
*/
|
|
276
|
+
exp_month: number | null;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Card expiration year, like 27 for 2027.
|
|
280
|
+
*/
|
|
281
|
+
exp_year: number | null;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Last four digits of the card.
|
|
285
|
+
*/
|
|
286
|
+
last4: string | null;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
133
289
|
|
|
134
|
-
export namespace PaymentMethodListResponse {
|
|
135
290
|
/**
|
|
136
|
-
* The
|
|
291
|
+
* The bank account for the payment method
|
|
137
292
|
*/
|
|
138
|
-
export interface
|
|
293
|
+
export interface UsBankAccountPaymentMethod {
|
|
294
|
+
/**
|
|
295
|
+
* The ID of the payment method
|
|
296
|
+
*/
|
|
297
|
+
id: string;
|
|
298
|
+
|
|
139
299
|
/**
|
|
140
|
-
*
|
|
300
|
+
* When the payment method was created
|
|
141
301
|
*/
|
|
142
|
-
|
|
302
|
+
created_at: string;
|
|
143
303
|
|
|
144
304
|
/**
|
|
145
|
-
*
|
|
305
|
+
* The type of the payment method
|
|
146
306
|
*/
|
|
147
|
-
|
|
307
|
+
payment_method_type: PaymentsAPI.PaymentMethodTypes;
|
|
148
308
|
|
|
149
309
|
/**
|
|
150
|
-
*
|
|
310
|
+
* The typename of this object
|
|
151
311
|
*/
|
|
152
|
-
|
|
312
|
+
typename: 'UsBankAccountPaymentMethod';
|
|
153
313
|
|
|
154
314
|
/**
|
|
155
|
-
*
|
|
315
|
+
* The bank details associated with this payment method
|
|
156
316
|
*/
|
|
157
|
-
|
|
317
|
+
us_bank_account: UsBankAccountPaymentMethod.UsBankAccount;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export namespace UsBankAccountPaymentMethod {
|
|
321
|
+
/**
|
|
322
|
+
* The bank details associated with this payment method
|
|
323
|
+
*/
|
|
324
|
+
export interface UsBankAccount {
|
|
325
|
+
/**
|
|
326
|
+
* The type of account
|
|
327
|
+
*/
|
|
328
|
+
account_type: string;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* The name of the bank
|
|
332
|
+
*/
|
|
333
|
+
bank_name: string;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* The last 4 digits of the account number
|
|
337
|
+
*/
|
|
338
|
+
last4: string;
|
|
339
|
+
}
|
|
158
340
|
}
|
|
159
341
|
}
|
|
160
342
|
|
|
@@ -97,6 +97,34 @@ export class Payments extends APIResource {
|
|
|
97
97
|
return this._client.getAPIList('/payments', CursorPage<PaymentListResponse>, { query, ...options });
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
/**
|
|
101
|
+
* Lists fees for a payment
|
|
102
|
+
*
|
|
103
|
+
* Required permissions:
|
|
104
|
+
*
|
|
105
|
+
* - `payment:basic:read`
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```ts
|
|
109
|
+
* // Automatically fetches more pages as needed.
|
|
110
|
+
* for await (const paymentListFeesResponse of client.payments.listFees(
|
|
111
|
+
* 'pay_xxxxxxxxxxxxxx',
|
|
112
|
+
* )) {
|
|
113
|
+
* // ...
|
|
114
|
+
* }
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
listFees(
|
|
118
|
+
id: string,
|
|
119
|
+
query: PaymentListFeesParams | null | undefined = {},
|
|
120
|
+
options?: RequestOptions,
|
|
121
|
+
): PagePromise<PaymentListFeesResponsesCursorPage, PaymentListFeesResponse> {
|
|
122
|
+
return this._client.getAPIList(path`/payments/${id}/fees`, CursorPage<PaymentListFeesResponse>, {
|
|
123
|
+
query,
|
|
124
|
+
...options,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
100
128
|
/**
|
|
101
129
|
* Refunds a payment
|
|
102
130
|
*
|
|
@@ -176,6 +204,8 @@ export class Payments extends APIResource {
|
|
|
176
204
|
|
|
177
205
|
export type PaymentListResponsesCursorPage = CursorPage<PaymentListResponse>;
|
|
178
206
|
|
|
207
|
+
export type PaymentListFeesResponsesCursorPage = CursorPage<PaymentListFeesResponse>;
|
|
208
|
+
|
|
179
209
|
/**
|
|
180
210
|
* The reason why a specific payment was billed
|
|
181
211
|
*/
|
|
@@ -709,6 +739,61 @@ export namespace PaymentListResponse {
|
|
|
709
739
|
}
|
|
710
740
|
}
|
|
711
741
|
|
|
742
|
+
/**
|
|
743
|
+
* Represents a fee related to a payment
|
|
744
|
+
*/
|
|
745
|
+
export interface PaymentListFeesResponse {
|
|
746
|
+
/**
|
|
747
|
+
* The value or amount to display for the fee.
|
|
748
|
+
*/
|
|
749
|
+
amount: number;
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* The currency of the fee.
|
|
753
|
+
*/
|
|
754
|
+
currency: Shared.Currency;
|
|
755
|
+
|
|
756
|
+
/**
|
|
757
|
+
* The label to display for the fee.
|
|
758
|
+
*/
|
|
759
|
+
name: string;
|
|
760
|
+
|
|
761
|
+
/**
|
|
762
|
+
* The specific origin of the fee, if applicable.
|
|
763
|
+
*/
|
|
764
|
+
type:
|
|
765
|
+
| 'stripe_domestic_processing_fee'
|
|
766
|
+
| 'stripe_international_processing_fee'
|
|
767
|
+
| 'stripe_fixed_processing_fee'
|
|
768
|
+
| 'stripe_billing_fee'
|
|
769
|
+
| 'stripe_radar_fee'
|
|
770
|
+
| 'sales_tax_remittance'
|
|
771
|
+
| 'sales_tax_remittance_reversal'
|
|
772
|
+
| 'stripe_sales_tax_fee'
|
|
773
|
+
| 'whop_processing_fee'
|
|
774
|
+
| 'marketplace_affiliate_fee'
|
|
775
|
+
| 'affiliate_fee'
|
|
776
|
+
| 'crypto_fee'
|
|
777
|
+
| 'stripe_standard_processing_fee'
|
|
778
|
+
| 'paypal_fee'
|
|
779
|
+
| 'stripe_payout_fee'
|
|
780
|
+
| 'dispute_fee'
|
|
781
|
+
| 'dispute_alert_fee'
|
|
782
|
+
| 'apple_processing_fee'
|
|
783
|
+
| 'buyer_fee'
|
|
784
|
+
| 'sezzle_processing_fee'
|
|
785
|
+
| 'splitit_processing_fee'
|
|
786
|
+
| 'platform_balance_processing_fee'
|
|
787
|
+
| 'payment_processing_percentage_fee'
|
|
788
|
+
| 'payment_processing_fixed_fee'
|
|
789
|
+
| 'cross_border_percentage_fee'
|
|
790
|
+
| 'fx_percentage_fee'
|
|
791
|
+
| 'orchestration_percentage_fee'
|
|
792
|
+
| 'three_ds_fixed_fee'
|
|
793
|
+
| 'billing_percentage_fee'
|
|
794
|
+
| 'revshare_percentage_fee';
|
|
795
|
+
}
|
|
796
|
+
|
|
712
797
|
export type PaymentCreateParams =
|
|
713
798
|
| PaymentCreateParams.CreatePaymentInputWithPlan
|
|
714
799
|
| PaymentCreateParams.CreatePaymentInputWithPlanID;
|
|
@@ -999,6 +1084,23 @@ export interface PaymentListParams extends CursorPageParams {
|
|
|
999
1084
|
substatuses?: Array<Shared.FriendlyReceiptStatus> | null;
|
|
1000
1085
|
}
|
|
1001
1086
|
|
|
1087
|
+
export interface PaymentListFeesParams extends CursorPageParams {
|
|
1088
|
+
/**
|
|
1089
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
1090
|
+
*/
|
|
1091
|
+
before?: string | null;
|
|
1092
|
+
|
|
1093
|
+
/**
|
|
1094
|
+
* Returns the first _n_ elements from the list.
|
|
1095
|
+
*/
|
|
1096
|
+
first?: number | null;
|
|
1097
|
+
|
|
1098
|
+
/**
|
|
1099
|
+
* Returns the last _n_ elements from the list.
|
|
1100
|
+
*/
|
|
1101
|
+
last?: number | null;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1002
1104
|
export interface PaymentRefundParams {
|
|
1003
1105
|
/**
|
|
1004
1106
|
* An amount if the refund is supposed to be partial.
|
|
@@ -1012,9 +1114,12 @@ export declare namespace Payments {
|
|
|
1012
1114
|
type CardBrands as CardBrands,
|
|
1013
1115
|
type PaymentMethodTypes as PaymentMethodTypes,
|
|
1014
1116
|
type PaymentListResponse as PaymentListResponse,
|
|
1117
|
+
type PaymentListFeesResponse as PaymentListFeesResponse,
|
|
1015
1118
|
type PaymentListResponsesCursorPage as PaymentListResponsesCursorPage,
|
|
1119
|
+
type PaymentListFeesResponsesCursorPage as PaymentListFeesResponsesCursorPage,
|
|
1016
1120
|
type PaymentCreateParams as PaymentCreateParams,
|
|
1017
1121
|
type PaymentListParams as PaymentListParams,
|
|
1122
|
+
type PaymentListFeesParams as PaymentListFeesParams,
|
|
1018
1123
|
type PaymentRefundParams as PaymentRefundParams,
|
|
1019
1124
|
};
|
|
1020
1125
|
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
export class PayoutMethods extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Lists payout destinations for a company
|
|
10
|
+
*
|
|
11
|
+
* Required permissions:
|
|
12
|
+
*
|
|
13
|
+
* - `payout:destination:read`
|
|
14
|
+
*/
|
|
15
|
+
list(
|
|
16
|
+
query: PayoutMethodListParams,
|
|
17
|
+
options?: RequestOptions,
|
|
18
|
+
): PagePromise<PayoutMethodListResponsesCursorPage, PayoutMethodListResponse> {
|
|
19
|
+
return this._client.getAPIList('/payout_methods', CursorPage<PayoutMethodListResponse>, {
|
|
20
|
+
query,
|
|
21
|
+
...options,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type PayoutMethodListResponsesCursorPage = CursorPage<PayoutMethodListResponse>;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An object representing an user's setup payout destination.
|
|
30
|
+
*/
|
|
31
|
+
export interface PayoutMethodListResponse {
|
|
32
|
+
/**
|
|
33
|
+
* The ID of the payout token
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The currency code of the payout destination. This is the currency that payouts
|
|
39
|
+
* will be made in for this token.
|
|
40
|
+
*/
|
|
41
|
+
currency: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The payout destination associated with the payout token
|
|
45
|
+
*/
|
|
46
|
+
destination: PayoutMethodListResponse.Destination | null;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* An optional nickname for the payout token to help the user identify it. This is
|
|
50
|
+
* not used by the provider and is only for the user's reference.
|
|
51
|
+
*/
|
|
52
|
+
nickname: string | null;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export namespace PayoutMethodListResponse {
|
|
56
|
+
/**
|
|
57
|
+
* The payout destination associated with the payout token
|
|
58
|
+
*/
|
|
59
|
+
export interface Destination {
|
|
60
|
+
/**
|
|
61
|
+
* The category of the payout destination
|
|
62
|
+
*/
|
|
63
|
+
category: 'crypto' | 'rtp' | 'next_day_bank' | 'bank_wire' | 'digital_wallet' | 'unknown';
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The country code of the payout destination
|
|
67
|
+
*/
|
|
68
|
+
country_code: string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The name of the payer associated with the payout destination
|
|
72
|
+
*/
|
|
73
|
+
name: string;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface PayoutMethodListParams extends CursorPageParams {
|
|
78
|
+
/**
|
|
79
|
+
* The company ID to list payout methods for.
|
|
80
|
+
*/
|
|
81
|
+
company_id: string;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
85
|
+
*/
|
|
86
|
+
before?: string | null;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Returns the first _n_ elements from the list.
|
|
90
|
+
*/
|
|
91
|
+
first?: number | null;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Returns the last _n_ elements from the list.
|
|
95
|
+
*/
|
|
96
|
+
last?: number | null;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export declare namespace PayoutMethods {
|
|
100
|
+
export {
|
|
101
|
+
type PayoutMethodListResponse as PayoutMethodListResponse,
|
|
102
|
+
type PayoutMethodListResponsesCursorPage as PayoutMethodListResponsesCursorPage,
|
|
103
|
+
type PayoutMethodListParams as PayoutMethodListParams,
|
|
104
|
+
};
|
|
105
|
+
}
|
package/src/resources/shared.ts
CHANGED
|
@@ -796,12 +796,29 @@ export namespace CourseLessonInteraction {
|
|
|
796
796
|
*/
|
|
797
797
|
id: string;
|
|
798
798
|
|
|
799
|
+
/**
|
|
800
|
+
* The chapter this lesson belongs to
|
|
801
|
+
*/
|
|
802
|
+
chapter: Lesson.Chapter;
|
|
803
|
+
|
|
799
804
|
/**
|
|
800
805
|
* The title of the lesson
|
|
801
806
|
*/
|
|
802
807
|
title: string;
|
|
803
808
|
}
|
|
804
809
|
|
|
810
|
+
export namespace Lesson {
|
|
811
|
+
/**
|
|
812
|
+
* The chapter this lesson belongs to
|
|
813
|
+
*/
|
|
814
|
+
export interface Chapter {
|
|
815
|
+
/**
|
|
816
|
+
* The ID of the chapter. Looks like chap_XXX
|
|
817
|
+
*/
|
|
818
|
+
id: string;
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
|
|
805
822
|
/**
|
|
806
823
|
* The user who interacted with the lesson
|
|
807
824
|
*/
|
|
@@ -863,12 +880,29 @@ export namespace CourseLessonInteractionListItem {
|
|
|
863
880
|
*/
|
|
864
881
|
id: string;
|
|
865
882
|
|
|
883
|
+
/**
|
|
884
|
+
* The chapter this lesson belongs to
|
|
885
|
+
*/
|
|
886
|
+
chapter: Lesson.Chapter;
|
|
887
|
+
|
|
866
888
|
/**
|
|
867
889
|
* The title of the lesson
|
|
868
890
|
*/
|
|
869
891
|
title: string;
|
|
870
892
|
}
|
|
871
893
|
|
|
894
|
+
export namespace Lesson {
|
|
895
|
+
/**
|
|
896
|
+
* The chapter this lesson belongs to
|
|
897
|
+
*/
|
|
898
|
+
export interface Chapter {
|
|
899
|
+
/**
|
|
900
|
+
* The ID of the chapter. Looks like chap_XXX
|
|
901
|
+
*/
|
|
902
|
+
id: string;
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
|
|
872
906
|
/**
|
|
873
907
|
* The user who interacted with the lesson
|
|
874
908
|
*/
|