@whop/sdk 0.0.9 → 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.
- package/CHANGELOG.md +34 -0
- package/client.d.mts +11 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +11 -5
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/app-builds.d.mts +4 -0
- package/resources/app-builds.d.mts.map +1 -1
- package/resources/app-builds.d.ts +4 -0
- package/resources/app-builds.d.ts.map +1 -1
- package/resources/index.d.mts +4 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +20 -0
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +20 -0
- package/resources/invoices.d.ts.map +1 -1
- package/resources/payment-methods.d.mts +163 -0
- package/resources/payment-methods.d.mts.map +1 -0
- package/resources/payment-methods.d.ts +163 -0
- package/resources/payment-methods.d.ts.map +1 -0
- package/resources/payment-methods.js +42 -0
- package/resources/payment-methods.js.map +1 -0
- package/resources/payment-methods.mjs +38 -0
- package/resources/payment-methods.mjs.map +1 -0
- package/resources/payments.d.mts +255 -1
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +255 -1
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +33 -0
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +33 -0
- package/resources/payments.mjs.map +1 -1
- package/resources/setup-intents.d.mts +363 -0
- package/resources/setup-intents.d.mts.map +1 -0
- package/resources/setup-intents.d.ts +363 -0
- package/resources/setup-intents.d.ts.map +1 -0
- package/resources/setup-intents.js +46 -0
- package/resources/setup-intents.js.map +1 -0
- package/resources/setup-intents.mjs +42 -0
- package/resources/setup-intents.mjs.map +1 -0
- package/resources/shared.d.mts +48 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +48 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/webhooks.d.mts +72 -2
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +72 -2
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +47 -1
- package/src/resources/app-builds.ts +5 -0
- package/src/resources/index.ts +20 -0
- package/src/resources/invoices.ts +24 -0
- package/src/resources/payment-methods.ts +213 -0
- package/src/resources/payments.ts +306 -0
- package/src/resources/setup-intents.ts +439 -0
- package/src/resources/shared.ts +57 -0
- package/src/resources/webhooks.ts +91 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/resources/payments.js
CHANGED
|
@@ -6,6 +6,39 @@ const resource_1 = require("../core/resource.js");
|
|
|
6
6
|
const pagination_1 = require("../core/pagination.js");
|
|
7
7
|
const path_1 = require("../internal/utils/path.js");
|
|
8
8
|
class Payments extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Charge an existing member off-session using one of their stored payment methods.
|
|
11
|
+
* You can provide an existing plan, or create a new one in-line. This endpoint
|
|
12
|
+
* will respond with a payment object immediately, but the payment is processed
|
|
13
|
+
* asynchronously in the background. Use webhooks to be notified when the payment
|
|
14
|
+
* succeeds or fails.
|
|
15
|
+
*
|
|
16
|
+
* Required permissions:
|
|
17
|
+
*
|
|
18
|
+
* - `payment:charge`
|
|
19
|
+
* - `plan:create`
|
|
20
|
+
* - `access_pass:create`
|
|
21
|
+
* - `access_pass:update`
|
|
22
|
+
* - `plan:basic:read`
|
|
23
|
+
* - `access_pass:basic:read`
|
|
24
|
+
* - `member:email:read`
|
|
25
|
+
* - `member:basic:read`
|
|
26
|
+
* - `member:phone:read`
|
|
27
|
+
* - `promo_code:basic:read`
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const payment = await client.payments.create({
|
|
32
|
+
* company_id: 'biz_xxxxxxxxxxxxxx',
|
|
33
|
+
* member_id: 'mber_xxxxxxxxxxxxx',
|
|
34
|
+
* payment_method_id: 'pmt_xxxxxxxxxxxxxx',
|
|
35
|
+
* plan: { currency: 'usd' },
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
create(body, options) {
|
|
40
|
+
return this._client.post('/payments', { body, ...options });
|
|
41
|
+
}
|
|
9
42
|
/**
|
|
10
43
|
* Retrieves a payment by ID
|
|
11
44
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payments.js","sourceRoot":"","sources":["../src/resources/payments.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;
|
|
1
|
+
{"version":3,"file":"payments.js","sourceRoot":"","sources":["../src/resources/payments.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,IAAI,CACF,KAAwB,EACxB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,CAAA,uBAA+B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtG,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,MAAM,CACJ,EAAU,EACV,OAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,CAAC,EAAU,EAAE,OAAwB;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,CAAC,EAAU,EAAE,OAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;CACF;AApKD,4BAoKC"}
|
package/resources/payments.mjs
CHANGED
|
@@ -3,6 +3,39 @@ import { APIResource } from "../core/resource.mjs";
|
|
|
3
3
|
import { CursorPage } from "../core/pagination.mjs";
|
|
4
4
|
import { path } from "../internal/utils/path.mjs";
|
|
5
5
|
export class Payments extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Charge an existing member off-session using one of their stored payment methods.
|
|
8
|
+
* You can provide an existing plan, or create a new one in-line. This endpoint
|
|
9
|
+
* will respond with a payment object immediately, but the payment is processed
|
|
10
|
+
* asynchronously in the background. Use webhooks to be notified when the payment
|
|
11
|
+
* succeeds or fails.
|
|
12
|
+
*
|
|
13
|
+
* Required permissions:
|
|
14
|
+
*
|
|
15
|
+
* - `payment:charge`
|
|
16
|
+
* - `plan:create`
|
|
17
|
+
* - `access_pass:create`
|
|
18
|
+
* - `access_pass:update`
|
|
19
|
+
* - `plan:basic:read`
|
|
20
|
+
* - `access_pass:basic:read`
|
|
21
|
+
* - `member:email:read`
|
|
22
|
+
* - `member:basic:read`
|
|
23
|
+
* - `member:phone:read`
|
|
24
|
+
* - `promo_code:basic:read`
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const payment = await client.payments.create({
|
|
29
|
+
* company_id: 'biz_xxxxxxxxxxxxxx',
|
|
30
|
+
* member_id: 'mber_xxxxxxxxxxxxx',
|
|
31
|
+
* payment_method_id: 'pmt_xxxxxxxxxxxxxx',
|
|
32
|
+
* plan: { currency: 'usd' },
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
create(body, options) {
|
|
37
|
+
return this._client.post('/payments', { body, ...options });
|
|
38
|
+
}
|
|
6
39
|
/**
|
|
7
40
|
* Retrieves a payment by ID
|
|
8
41
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payments.mjs","sourceRoot":"","sources":["../src/resources/payments.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"payments.mjs","sourceRoot":"","sources":["../src/resources/payments.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,IAAI,CACF,KAAwB,EACxB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,CAAA,UAA+B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtG,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,MAAM,CACJ,EAAU,EACV,OAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,CAAC,EAAU,EAAE,OAAwB;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,CAAC,EAAU,EAAE,OAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;CACF"}
|
|
@@ -0,0 +1,363 @@
|
|
|
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 SetupIntents extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* A setup intent is an object used to securely collect and store a member’s
|
|
10
|
+
* payment method for future use without charging them immediately. It handles
|
|
11
|
+
* authentication steps up front so future off-session payments can be completed
|
|
12
|
+
* smoothly. This ensures the payment method is verified and ready for later
|
|
13
|
+
* billing.
|
|
14
|
+
*
|
|
15
|
+
* Required permissions:
|
|
16
|
+
*
|
|
17
|
+
* - `payment:setup_intent:read`
|
|
18
|
+
* - `member:basic:read`
|
|
19
|
+
* - `member:email:read`
|
|
20
|
+
*/
|
|
21
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<SetupIntent>;
|
|
22
|
+
/**
|
|
23
|
+
* A setup intent is an object used to securely collect and store a member’s
|
|
24
|
+
* payment method for future use without charging them immediately. It handles
|
|
25
|
+
* authentication steps up front so future off-session payments can be completed
|
|
26
|
+
* smoothly. This ensures the payment method is verified and ready for later
|
|
27
|
+
* billing.
|
|
28
|
+
*
|
|
29
|
+
* Required permissions:
|
|
30
|
+
*
|
|
31
|
+
* - `payment:setup_intent:read`
|
|
32
|
+
* - `member:basic:read`
|
|
33
|
+
* - `member:email:read`
|
|
34
|
+
*/
|
|
35
|
+
list(query: SetupIntentListParams, options?: RequestOptions): PagePromise<SetupIntentListResponsesCursorPage, SetupIntentListResponse>;
|
|
36
|
+
}
|
|
37
|
+
export type SetupIntentListResponsesCursorPage = CursorPage<SetupIntentListResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* An object representing a setup intent, which is a flow for allowing a customer
|
|
40
|
+
* to add a payment method to their account without making a purchase.
|
|
41
|
+
*/
|
|
42
|
+
export interface SetupIntent {
|
|
43
|
+
/**
|
|
44
|
+
* The setup intent ID
|
|
45
|
+
*/
|
|
46
|
+
id: string;
|
|
47
|
+
/**
|
|
48
|
+
* The checkout configuration associated with the setup intent
|
|
49
|
+
*/
|
|
50
|
+
checkout_configuration: SetupIntent.CheckoutConfiguration | null;
|
|
51
|
+
/**
|
|
52
|
+
* The company of the setup intent
|
|
53
|
+
*/
|
|
54
|
+
company: SetupIntent.Company | null;
|
|
55
|
+
/**
|
|
56
|
+
* The datetime the payment was created
|
|
57
|
+
*/
|
|
58
|
+
created_at: string;
|
|
59
|
+
/**
|
|
60
|
+
* The error message, if any.
|
|
61
|
+
*/
|
|
62
|
+
error_message: string | null;
|
|
63
|
+
/**
|
|
64
|
+
* The member connected to the setup intent
|
|
65
|
+
*/
|
|
66
|
+
member: SetupIntent.Member | null;
|
|
67
|
+
/**
|
|
68
|
+
* The metadata associated with the setup intent
|
|
69
|
+
*/
|
|
70
|
+
metadata: {
|
|
71
|
+
[key: string]: unknown;
|
|
72
|
+
} | null;
|
|
73
|
+
/**
|
|
74
|
+
* The payment method created during the setup, if available.
|
|
75
|
+
*/
|
|
76
|
+
payment_method: SetupIntent.PaymentMethod | null;
|
|
77
|
+
/**
|
|
78
|
+
* The status of the setup intent
|
|
79
|
+
*/
|
|
80
|
+
status: SetupIntentStatus;
|
|
81
|
+
}
|
|
82
|
+
export declare namespace SetupIntent {
|
|
83
|
+
/**
|
|
84
|
+
* The checkout configuration associated with the setup intent
|
|
85
|
+
*/
|
|
86
|
+
interface CheckoutConfiguration {
|
|
87
|
+
/**
|
|
88
|
+
* The ID of the checkout configuration
|
|
89
|
+
*/
|
|
90
|
+
id: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* The company of the setup intent
|
|
94
|
+
*/
|
|
95
|
+
interface Company {
|
|
96
|
+
/**
|
|
97
|
+
* The ID (tag) of the company.
|
|
98
|
+
*/
|
|
99
|
+
id: string;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The member connected to the setup intent
|
|
103
|
+
*/
|
|
104
|
+
interface Member {
|
|
105
|
+
/**
|
|
106
|
+
* The ID of the member
|
|
107
|
+
*/
|
|
108
|
+
id: string;
|
|
109
|
+
/**
|
|
110
|
+
* The user for this member, if any.
|
|
111
|
+
*/
|
|
112
|
+
user: Member.User | null;
|
|
113
|
+
}
|
|
114
|
+
namespace Member {
|
|
115
|
+
/**
|
|
116
|
+
* The user for this member, if any.
|
|
117
|
+
*/
|
|
118
|
+
interface User {
|
|
119
|
+
/**
|
|
120
|
+
* The internal ID of the user account.
|
|
121
|
+
*/
|
|
122
|
+
id: string;
|
|
123
|
+
/**
|
|
124
|
+
* The digital mailing address of the user.
|
|
125
|
+
*/
|
|
126
|
+
email: string | null;
|
|
127
|
+
/**
|
|
128
|
+
* The user's full name.
|
|
129
|
+
*/
|
|
130
|
+
name: string | null;
|
|
131
|
+
/**
|
|
132
|
+
* The whop username.
|
|
133
|
+
*/
|
|
134
|
+
username: string;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* The payment method created during the setup, if available.
|
|
139
|
+
*/
|
|
140
|
+
interface PaymentMethod {
|
|
141
|
+
/**
|
|
142
|
+
* The ID of the payment method
|
|
143
|
+
*/
|
|
144
|
+
id: string;
|
|
145
|
+
/**
|
|
146
|
+
* The card data associated with the payment method, if its a debit or credit card.
|
|
147
|
+
*/
|
|
148
|
+
card: PaymentMethod.Card | null;
|
|
149
|
+
/**
|
|
150
|
+
* The date and time the payment method was created
|
|
151
|
+
*/
|
|
152
|
+
created_at: string;
|
|
153
|
+
/**
|
|
154
|
+
* The payment method type of the payment method
|
|
155
|
+
*/
|
|
156
|
+
payment_method_type: PaymentsAPI.PaymentMethodTypes;
|
|
157
|
+
}
|
|
158
|
+
namespace PaymentMethod {
|
|
159
|
+
/**
|
|
160
|
+
* The card data associated with the payment method, if its a debit or credit card.
|
|
161
|
+
*/
|
|
162
|
+
interface Card {
|
|
163
|
+
/**
|
|
164
|
+
* Possible card brands that a payment token can have
|
|
165
|
+
*/
|
|
166
|
+
brand: PaymentsAPI.CardBrands | null;
|
|
167
|
+
/**
|
|
168
|
+
* Card expiration month, like 03 for March.
|
|
169
|
+
*/
|
|
170
|
+
exp_month: number | null;
|
|
171
|
+
/**
|
|
172
|
+
* Card expiration year, like 27 for 2027.
|
|
173
|
+
*/
|
|
174
|
+
exp_year: number | null;
|
|
175
|
+
/**
|
|
176
|
+
* Last four digits of the card.
|
|
177
|
+
*/
|
|
178
|
+
last4: string | null;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* The status of the setup intent.
|
|
184
|
+
*/
|
|
185
|
+
export type SetupIntentStatus = 'processing' | 'succeeded' | 'canceled' | 'requires_action';
|
|
186
|
+
/**
|
|
187
|
+
* An object representing a setup intent, which is a flow for allowing a customer
|
|
188
|
+
* to add a payment method to their account without making a purchase.
|
|
189
|
+
*/
|
|
190
|
+
export interface SetupIntentListResponse {
|
|
191
|
+
/**
|
|
192
|
+
* The setup intent ID
|
|
193
|
+
*/
|
|
194
|
+
id: string;
|
|
195
|
+
/**
|
|
196
|
+
* The checkout configuration associated with the setup intent
|
|
197
|
+
*/
|
|
198
|
+
checkout_configuration: SetupIntentListResponse.CheckoutConfiguration | null;
|
|
199
|
+
/**
|
|
200
|
+
* The company of the setup intent
|
|
201
|
+
*/
|
|
202
|
+
company: SetupIntentListResponse.Company | null;
|
|
203
|
+
/**
|
|
204
|
+
* The datetime the payment was created
|
|
205
|
+
*/
|
|
206
|
+
created_at: string;
|
|
207
|
+
/**
|
|
208
|
+
* The error message, if any.
|
|
209
|
+
*/
|
|
210
|
+
error_message: string | null;
|
|
211
|
+
/**
|
|
212
|
+
* The member connected to the setup intent
|
|
213
|
+
*/
|
|
214
|
+
member: SetupIntentListResponse.Member | null;
|
|
215
|
+
/**
|
|
216
|
+
* The metadata associated with the setup intent
|
|
217
|
+
*/
|
|
218
|
+
metadata: {
|
|
219
|
+
[key: string]: unknown;
|
|
220
|
+
} | null;
|
|
221
|
+
/**
|
|
222
|
+
* The payment method created during the setup, if available.
|
|
223
|
+
*/
|
|
224
|
+
payment_method: SetupIntentListResponse.PaymentMethod | null;
|
|
225
|
+
/**
|
|
226
|
+
* The status of the setup intent
|
|
227
|
+
*/
|
|
228
|
+
status: SetupIntentStatus;
|
|
229
|
+
}
|
|
230
|
+
export declare namespace SetupIntentListResponse {
|
|
231
|
+
/**
|
|
232
|
+
* The checkout configuration associated with the setup intent
|
|
233
|
+
*/
|
|
234
|
+
interface CheckoutConfiguration {
|
|
235
|
+
/**
|
|
236
|
+
* The ID of the checkout configuration
|
|
237
|
+
*/
|
|
238
|
+
id: string;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* The company of the setup intent
|
|
242
|
+
*/
|
|
243
|
+
interface Company {
|
|
244
|
+
/**
|
|
245
|
+
* The ID (tag) of the company.
|
|
246
|
+
*/
|
|
247
|
+
id: string;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* The member connected to the setup intent
|
|
251
|
+
*/
|
|
252
|
+
interface Member {
|
|
253
|
+
/**
|
|
254
|
+
* The ID of the member
|
|
255
|
+
*/
|
|
256
|
+
id: string;
|
|
257
|
+
/**
|
|
258
|
+
* The user for this member, if any.
|
|
259
|
+
*/
|
|
260
|
+
user: Member.User | null;
|
|
261
|
+
}
|
|
262
|
+
namespace Member {
|
|
263
|
+
/**
|
|
264
|
+
* The user for this member, if any.
|
|
265
|
+
*/
|
|
266
|
+
interface User {
|
|
267
|
+
/**
|
|
268
|
+
* The internal ID of the user account.
|
|
269
|
+
*/
|
|
270
|
+
id: string;
|
|
271
|
+
/**
|
|
272
|
+
* The digital mailing address of the user.
|
|
273
|
+
*/
|
|
274
|
+
email: string | null;
|
|
275
|
+
/**
|
|
276
|
+
* The user's full name.
|
|
277
|
+
*/
|
|
278
|
+
name: string | null;
|
|
279
|
+
/**
|
|
280
|
+
* The whop username.
|
|
281
|
+
*/
|
|
282
|
+
username: string;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* The payment method created during the setup, if available.
|
|
287
|
+
*/
|
|
288
|
+
interface PaymentMethod {
|
|
289
|
+
/**
|
|
290
|
+
* The ID of the payment method
|
|
291
|
+
*/
|
|
292
|
+
id: string;
|
|
293
|
+
/**
|
|
294
|
+
* The card data associated with the payment method, if its a debit or credit card.
|
|
295
|
+
*/
|
|
296
|
+
card: PaymentMethod.Card | null;
|
|
297
|
+
/**
|
|
298
|
+
* The date and time the payment method was created
|
|
299
|
+
*/
|
|
300
|
+
created_at: string;
|
|
301
|
+
/**
|
|
302
|
+
* The payment method type of the payment method
|
|
303
|
+
*/
|
|
304
|
+
payment_method_type: PaymentsAPI.PaymentMethodTypes;
|
|
305
|
+
}
|
|
306
|
+
namespace PaymentMethod {
|
|
307
|
+
/**
|
|
308
|
+
* The card data associated with the payment method, if its a debit or credit card.
|
|
309
|
+
*/
|
|
310
|
+
interface Card {
|
|
311
|
+
/**
|
|
312
|
+
* Possible card brands that a payment token can have
|
|
313
|
+
*/
|
|
314
|
+
brand: PaymentsAPI.CardBrands | null;
|
|
315
|
+
/**
|
|
316
|
+
* Card expiration month, like 03 for March.
|
|
317
|
+
*/
|
|
318
|
+
exp_month: number | null;
|
|
319
|
+
/**
|
|
320
|
+
* Card expiration year, like 27 for 2027.
|
|
321
|
+
*/
|
|
322
|
+
exp_year: number | null;
|
|
323
|
+
/**
|
|
324
|
+
* Last four digits of the card.
|
|
325
|
+
*/
|
|
326
|
+
last4: string | null;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
export interface SetupIntentListParams extends CursorPageParams {
|
|
331
|
+
/**
|
|
332
|
+
* The ID of the company to list setup intents for
|
|
333
|
+
*/
|
|
334
|
+
company_id: string;
|
|
335
|
+
/**
|
|
336
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
337
|
+
*/
|
|
338
|
+
before?: string | null;
|
|
339
|
+
/**
|
|
340
|
+
* The minimum creation date to filter by
|
|
341
|
+
*/
|
|
342
|
+
created_after?: string | null;
|
|
343
|
+
/**
|
|
344
|
+
* The maximum creation date to filter by
|
|
345
|
+
*/
|
|
346
|
+
created_before?: string | null;
|
|
347
|
+
/**
|
|
348
|
+
* The direction of the sort.
|
|
349
|
+
*/
|
|
350
|
+
direction?: Shared.Direction | null;
|
|
351
|
+
/**
|
|
352
|
+
* Returns the first _n_ elements from the list.
|
|
353
|
+
*/
|
|
354
|
+
first?: number | null;
|
|
355
|
+
/**
|
|
356
|
+
* Returns the last _n_ elements from the list.
|
|
357
|
+
*/
|
|
358
|
+
last?: number | null;
|
|
359
|
+
}
|
|
360
|
+
export declare namespace SetupIntents {
|
|
361
|
+
export { type SetupIntent as SetupIntent, type SetupIntentStatus as SetupIntentStatus, type SetupIntentListResponse as SetupIntentListResponse, type SetupIntentListResponsesCursorPage as SetupIntentListResponsesCursorPage, type SetupIntentListParams as SetupIntentListParams, };
|
|
362
|
+
}
|
|
363
|
+
//# sourceMappingURL=setup-intents.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-intents.d.mts","sourceRoot":"","sources":["../src/resources/setup-intents.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,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAIvE;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,KAAK,EAAE,qBAAqB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,kCAAkC,EAAE,uBAAuB,CAAC;CAM5E;AAED,MAAM,MAAM,kCAAkC,GAAG,UAAU,CAAC,u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