@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.
- package/CHANGELOG.md +14 -0
- package/client.d.mts +3 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -3
- package/client.d.ts.map +1 -1
- package/client.js +3 -3
- package/client.js.map +1 -1
- package/client.mjs +3 -3
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- 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 +23 -23
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +23 -23
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +6 -4
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +6 -4
- package/resources/payments.mjs.map +1 -1
- package/resources/setup-intents.d.mts +32 -28
- package/resources/setup-intents.d.mts.map +1 -1
- package/resources/setup-intents.d.ts +32 -28
- package/resources/setup-intents.d.ts.map +1 -1
- package/resources/setup-intents.js +10 -2
- package/resources/setup-intents.js.map +1 -1
- package/resources/setup-intents.mjs +10 -2
- package/resources/setup-intents.mjs.map +1 -1
- package/resources/shared.d.mts +13 -15
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +13 -15
- package/resources/shared.d.ts.map +1 -1
- package/src/client.ts +15 -15
- package/src/resources/index.ts +7 -7
- package/src/resources/invoices.ts +24 -0
- package/src/resources/payment-methods.ts +213 -0
- package/src/resources/payments.ts +23 -23
- package/src/resources/setup-intents.ts +32 -28
- package/src/resources/shared.ts +13 -15
- 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/resources/payment-tokens.d.mts +0 -157
- package/resources/payment-tokens.d.mts.map +0 -1
- package/resources/payment-tokens.d.ts +0 -157
- package/resources/payment-tokens.d.ts.map +0 -1
- package/resources/payment-tokens.js +0 -34
- package/resources/payment-tokens.js.map +0 -1
- package/resources/payment-tokens.mjs +0 -30
- package/resources/payment-tokens.mjs.map +0 -1
- package/src/resources/payment-tokens.ts +0 -207
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../core/resource';
|
|
4
|
-
import * as PaymentsAPI from './payments';
|
|
5
|
-
import * as Shared from './shared';
|
|
6
|
-
import { APIPromise } from '../core/api-promise';
|
|
7
|
-
import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
|
|
8
|
-
import { RequestOptions } from '../internal/request-options';
|
|
9
|
-
import { path } from '../internal/utils/path';
|
|
10
|
-
|
|
11
|
-
export class PaymentTokens extends APIResource {
|
|
12
|
-
/**
|
|
13
|
-
* Retrieves a PaymentToken by ID
|
|
14
|
-
*
|
|
15
|
-
* Required permissions:
|
|
16
|
-
*
|
|
17
|
-
* - `member:payment_methods:read`
|
|
18
|
-
*/
|
|
19
|
-
retrieve(
|
|
20
|
-
id: string,
|
|
21
|
-
query: PaymentTokenRetrieveParams,
|
|
22
|
-
options?: RequestOptions,
|
|
23
|
-
): APIPromise<PaymentTokenRetrieveResponse> {
|
|
24
|
-
return this._client.get(path`/payment_tokens/${id}`, { query, ...options });
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Lists PaymentTokens
|
|
29
|
-
*
|
|
30
|
-
* Required permissions:
|
|
31
|
-
*
|
|
32
|
-
* - `member:payment_methods:read`
|
|
33
|
-
*/
|
|
34
|
-
list(
|
|
35
|
-
query: PaymentTokenListParams,
|
|
36
|
-
options?: RequestOptions,
|
|
37
|
-
): PagePromise<PaymentTokenListResponsesCursorPage, PaymentTokenListResponse> {
|
|
38
|
-
return this._client.getAPIList('/payment_tokens', CursorPage<PaymentTokenListResponse>, {
|
|
39
|
-
query,
|
|
40
|
-
...options,
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export type PaymentTokenListResponsesCursorPage = CursorPage<PaymentTokenListResponse>;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* A payment token used to process payments.
|
|
49
|
-
*/
|
|
50
|
-
export interface PaymentTokenRetrieveResponse {
|
|
51
|
-
/**
|
|
52
|
-
* The ID of the payment token
|
|
53
|
-
*/
|
|
54
|
-
id: string;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* The card data associated with the payment token, if its a debit or credit card
|
|
58
|
-
* token.
|
|
59
|
-
*/
|
|
60
|
-
card: PaymentTokenRetrieveResponse.Card | null;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* The date and time the payment token was created
|
|
64
|
-
*/
|
|
65
|
-
created_at: string;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* The payment method type of the payment token
|
|
69
|
-
*/
|
|
70
|
-
payment_method_type: PaymentsAPI.PaymentMethodTypes;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export namespace PaymentTokenRetrieveResponse {
|
|
74
|
-
/**
|
|
75
|
-
* The card data associated with the payment token, if its a debit or credit card
|
|
76
|
-
* token.
|
|
77
|
-
*/
|
|
78
|
-
export interface Card {
|
|
79
|
-
/**
|
|
80
|
-
* Possible card brands that a payment token can have
|
|
81
|
-
*/
|
|
82
|
-
brand: PaymentsAPI.CardBrands | null;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Card expiration month, like 03 for March.
|
|
86
|
-
*/
|
|
87
|
-
exp_month: number | null;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Card expiration year, like 27 for 2027.
|
|
91
|
-
*/
|
|
92
|
-
exp_year: number | null;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Last four digits of the card.
|
|
96
|
-
*/
|
|
97
|
-
last4: string | null;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* A payment token used to process payments.
|
|
103
|
-
*/
|
|
104
|
-
export interface PaymentTokenListResponse {
|
|
105
|
-
/**
|
|
106
|
-
* The ID of the payment token
|
|
107
|
-
*/
|
|
108
|
-
id: string;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* The card data associated with the payment token, if its a debit or credit card
|
|
112
|
-
* token.
|
|
113
|
-
*/
|
|
114
|
-
card: PaymentTokenListResponse.Card | null;
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* The date and time the payment token was created
|
|
118
|
-
*/
|
|
119
|
-
created_at: string;
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* The payment method type of the payment token
|
|
123
|
-
*/
|
|
124
|
-
payment_method_type: PaymentsAPI.PaymentMethodTypes;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export namespace PaymentTokenListResponse {
|
|
128
|
-
/**
|
|
129
|
-
* The card data associated with the payment token, if its a debit or credit card
|
|
130
|
-
* token.
|
|
131
|
-
*/
|
|
132
|
-
export interface Card {
|
|
133
|
-
/**
|
|
134
|
-
* Possible card brands that a payment token can have
|
|
135
|
-
*/
|
|
136
|
-
brand: PaymentsAPI.CardBrands | null;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Card expiration month, like 03 for March.
|
|
140
|
-
*/
|
|
141
|
-
exp_month: number | null;
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Card expiration year, like 27 for 2027.
|
|
145
|
-
*/
|
|
146
|
-
exp_year: number | null;
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Last four digits of the card.
|
|
150
|
-
*/
|
|
151
|
-
last4: string | null;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export interface PaymentTokenRetrieveParams {
|
|
156
|
-
/**
|
|
157
|
-
* The ID of the Member associated with the PaymentToken
|
|
158
|
-
*/
|
|
159
|
-
member_id: string;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export interface PaymentTokenListParams extends CursorPageParams {
|
|
163
|
-
/**
|
|
164
|
-
* The ID of the Member to list payment tokens for
|
|
165
|
-
*/
|
|
166
|
-
member_id: string;
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Returns the elements in the list that come before the specified cursor.
|
|
170
|
-
*/
|
|
171
|
-
before?: string | null;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* The minimum creation date to filter by
|
|
175
|
-
*/
|
|
176
|
-
created_after?: string | null;
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* The maximum creation date to filter by
|
|
180
|
-
*/
|
|
181
|
-
created_before?: string | null;
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* The direction of the sort.
|
|
185
|
-
*/
|
|
186
|
-
direction?: Shared.Direction | null;
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Returns the first _n_ elements from the list.
|
|
190
|
-
*/
|
|
191
|
-
first?: number | null;
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Returns the last _n_ elements from the list.
|
|
195
|
-
*/
|
|
196
|
-
last?: number | null;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
export declare namespace PaymentTokens {
|
|
200
|
-
export {
|
|
201
|
-
type PaymentTokenRetrieveResponse as PaymentTokenRetrieveResponse,
|
|
202
|
-
type PaymentTokenListResponse as PaymentTokenListResponse,
|
|
203
|
-
type PaymentTokenListResponsesCursorPage as PaymentTokenListResponsesCursorPage,
|
|
204
|
-
type PaymentTokenRetrieveParams as PaymentTokenRetrieveParams,
|
|
205
|
-
type PaymentTokenListParams as PaymentTokenListParams,
|
|
206
|
-
};
|
|
207
|
-
}
|