@whop/sdk 0.0.7 → 0.0.9

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 (162) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/client.d.mts +19 -10
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +19 -10
  5. package/client.d.ts.map +1 -1
  6. package/client.js +9 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/account-links.d.mts +59 -0
  12. package/resources/account-links.d.mts.map +1 -0
  13. package/resources/account-links.d.ts +59 -0
  14. package/resources/account-links.d.ts.map +1 -0
  15. package/resources/account-links.js +27 -0
  16. package/resources/account-links.js.map +1 -0
  17. package/resources/account-links.mjs +23 -0
  18. package/resources/account-links.mjs.map +1 -0
  19. package/resources/app-builds.d.mts +8 -0
  20. package/resources/app-builds.d.mts.map +1 -1
  21. package/resources/app-builds.d.ts +8 -0
  22. package/resources/app-builds.d.ts.map +1 -1
  23. package/resources/apps.d.mts +18 -2
  24. package/resources/apps.d.mts.map +1 -1
  25. package/resources/apps.d.ts +18 -2
  26. package/resources/apps.d.ts.map +1 -1
  27. package/resources/authorized-users.d.mts +8 -0
  28. package/resources/authorized-users.d.mts.map +1 -1
  29. package/resources/authorized-users.d.ts +8 -0
  30. package/resources/authorized-users.d.ts.map +1 -1
  31. package/resources/checkout-configurations.d.mts +173 -8
  32. package/resources/checkout-configurations.d.mts.map +1 -1
  33. package/resources/checkout-configurations.d.ts +173 -8
  34. package/resources/checkout-configurations.d.ts.map +1 -1
  35. package/resources/checkout-configurations.js +1 -0
  36. package/resources/checkout-configurations.js.map +1 -1
  37. package/resources/checkout-configurations.mjs +1 -0
  38. package/resources/checkout-configurations.mjs.map +1 -1
  39. package/resources/companies.d.mts +8 -0
  40. package/resources/companies.d.mts.map +1 -1
  41. package/resources/companies.d.ts +8 -0
  42. package/resources/companies.d.ts.map +1 -1
  43. package/resources/course-lessons.d.mts +199 -1
  44. package/resources/course-lessons.d.mts.map +1 -1
  45. package/resources/course-lessons.d.ts +199 -1
  46. package/resources/course-lessons.d.ts.map +1 -1
  47. package/resources/course-lessons.js +40 -0
  48. package/resources/course-lessons.js.map +1 -1
  49. package/resources/course-lessons.mjs +40 -0
  50. package/resources/course-lessons.mjs.map +1 -1
  51. package/resources/courses.d.mts +8 -0
  52. package/resources/courses.d.mts.map +1 -1
  53. package/resources/courses.d.ts +8 -0
  54. package/resources/courses.d.ts.map +1 -1
  55. package/resources/disputes.d.mts +8 -0
  56. package/resources/disputes.d.mts.map +1 -1
  57. package/resources/disputes.d.ts +8 -0
  58. package/resources/disputes.d.ts.map +1 -1
  59. package/resources/entries.d.mts +8 -0
  60. package/resources/entries.d.mts.map +1 -1
  61. package/resources/entries.d.ts +8 -0
  62. package/resources/entries.d.ts.map +1 -1
  63. package/resources/experiences.d.mts +8 -0
  64. package/resources/experiences.d.mts.map +1 -1
  65. package/resources/experiences.d.ts +8 -0
  66. package/resources/experiences.d.ts.map +1 -1
  67. package/resources/forum-posts.d.mts +7 -3
  68. package/resources/forum-posts.d.mts.map +1 -1
  69. package/resources/forum-posts.d.ts +7 -3
  70. package/resources/forum-posts.d.ts.map +1 -1
  71. package/resources/index.d.mts +8 -5
  72. package/resources/index.d.mts.map +1 -1
  73. package/resources/index.d.ts +8 -5
  74. package/resources/index.d.ts.map +1 -1
  75. package/resources/index.js +7 -1
  76. package/resources/index.js.map +1 -1
  77. package/resources/index.mjs +3 -0
  78. package/resources/index.mjs.map +1 -1
  79. package/resources/invoices.d.mts +8 -0
  80. package/resources/invoices.d.mts.map +1 -1
  81. package/resources/invoices.d.ts +8 -0
  82. package/resources/invoices.d.ts.map +1 -1
  83. package/resources/payments.d.mts +1 -1
  84. package/resources/payments.d.mts.map +1 -1
  85. package/resources/payments.d.ts +1 -1
  86. package/resources/payments.d.ts.map +1 -1
  87. package/resources/plans.d.mts +9 -11
  88. package/resources/plans.d.mts.map +1 -1
  89. package/resources/plans.d.ts +9 -11
  90. package/resources/plans.d.ts.map +1 -1
  91. package/resources/products.d.mts +8 -26
  92. package/resources/products.d.mts.map +1 -1
  93. package/resources/products.d.ts +8 -26
  94. package/resources/products.d.ts.map +1 -1
  95. package/resources/promo-codes.d.mts +8 -0
  96. package/resources/promo-codes.d.mts.map +1 -1
  97. package/resources/promo-codes.d.ts +8 -0
  98. package/resources/promo-codes.d.ts.map +1 -1
  99. package/resources/refunds.d.mts +303 -0
  100. package/resources/refunds.d.mts.map +1 -0
  101. package/resources/refunds.d.ts +303 -0
  102. package/resources/refunds.d.ts.map +1 -0
  103. package/resources/refunds.js +34 -0
  104. package/resources/refunds.js.map +1 -0
  105. package/resources/refunds.mjs +30 -0
  106. package/resources/refunds.mjs.map +1 -0
  107. package/resources/reviews.d.mts +8 -0
  108. package/resources/reviews.d.mts.map +1 -1
  109. package/resources/reviews.d.ts +8 -0
  110. package/resources/reviews.d.ts.map +1 -1
  111. package/resources/shared.d.mts +43 -2
  112. package/resources/shared.d.mts.map +1 -1
  113. package/resources/shared.d.ts +43 -2
  114. package/resources/shared.d.ts.map +1 -1
  115. package/resources/transfers.d.mts +8 -0
  116. package/resources/transfers.d.mts.map +1 -1
  117. package/resources/transfers.d.ts +8 -0
  118. package/resources/transfers.d.ts.map +1 -1
  119. package/resources/webhooks.d.mts +382 -2
  120. package/resources/webhooks.d.mts.map +1 -1
  121. package/resources/webhooks.d.ts +382 -2
  122. package/resources/webhooks.d.ts.map +1 -1
  123. package/resources/webhooks.js.map +1 -1
  124. package/resources/webhooks.mjs.map +1 -1
  125. package/resources/withdrawals.d.mts +233 -0
  126. package/resources/withdrawals.d.mts.map +1 -0
  127. package/resources/withdrawals.d.ts +233 -0
  128. package/resources/withdrawals.d.ts.map +1 -0
  129. package/resources/withdrawals.js +31 -0
  130. package/resources/withdrawals.js.map +1 -0
  131. package/resources/withdrawals.mjs +27 -0
  132. package/resources/withdrawals.mjs.map +1 -0
  133. package/src/client.ts +77 -0
  134. package/src/resources/account-links.ts +73 -0
  135. package/src/resources/app-builds.ts +10 -0
  136. package/src/resources/apps.ts +22 -0
  137. package/src/resources/authorized-users.ts +10 -0
  138. package/src/resources/checkout-configurations.ts +199 -8
  139. package/src/resources/companies.ts +10 -0
  140. package/src/resources/course-lessons.ts +250 -0
  141. package/src/resources/courses.ts +10 -0
  142. package/src/resources/disputes.ts +10 -0
  143. package/src/resources/entries.ts +10 -0
  144. package/src/resources/experiences.ts +10 -0
  145. package/src/resources/forum-posts.ts +8 -2
  146. package/src/resources/index.ts +32 -0
  147. package/src/resources/invoices.ts +10 -0
  148. package/src/resources/payments.ts +1 -0
  149. package/src/resources/plans.ts +11 -13
  150. package/src/resources/products.ts +10 -32
  151. package/src/resources/promo-codes.ts +10 -0
  152. package/src/resources/refunds.ts +393 -0
  153. package/src/resources/reviews.ts +10 -0
  154. package/src/resources/shared.ts +49 -2
  155. package/src/resources/transfers.ts +10 -0
  156. package/src/resources/webhooks.ts +463 -1
  157. package/src/resources/withdrawals.ts +361 -0
  158. package/src/version.ts +1 -1
  159. package/version.d.mts +1 -1
  160. package/version.d.ts +1 -1
  161. package/version.js +1 -1
  162. package/version.mjs +1 -1
@@ -0,0 +1,303 @@
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 Refunds extends APIResource {
8
+ /**
9
+ * Retrieves a Refund by ID
10
+ *
11
+ * Required permissions:
12
+ *
13
+ * - `payment:basic:read`
14
+ * - `member:email:read`
15
+ * - `member:basic:read`
16
+ * - `member:phone:read`
17
+ */
18
+ retrieve(id: string, options?: RequestOptions): APIPromise<RefundRetrieveResponse>;
19
+ /**
20
+ * Lists Refunds for a payment.
21
+ *
22
+ * Required permissions:
23
+ *
24
+ * - `payment:basic:read`
25
+ */
26
+ list(query: RefundListParams, options?: RequestOptions): PagePromise<RefundListResponsesCursorPage, RefundListResponse>;
27
+ }
28
+ export type RefundListResponsesCursorPage = CursorPage<RefundListResponse>;
29
+ /**
30
+ * The different payment providers.
31
+ */
32
+ export type PaymentProvider = 'stripe' | 'coinbase' | 'paypal' | 'apple' | 'sezzle' | 'splitit' | 'platform_balance' | 'multi_psp';
33
+ /**
34
+ * The status of the refund reference.
35
+ */
36
+ export type RefundReferenceStatus = 'available' | 'pending' | 'unavailable';
37
+ /**
38
+ * The type of refund reference that was made available by the payment provider.
39
+ */
40
+ export type RefundReferenceType = 'acquirer_reference_number' | 'retrieval_reference_number' | 'system_trace_audit_number';
41
+ /**
42
+ * The different statuses for a Refund object
43
+ */
44
+ export type RefundStatus = 'pending' | 'requires_action' | 'succeeded' | 'failed' | 'canceled';
45
+ /**
46
+ * An object representing a refund made on a payment.
47
+ */
48
+ export interface RefundRetrieveResponse {
49
+ /**
50
+ * The ID of the refund.
51
+ */
52
+ id: string;
53
+ /**
54
+ * The amount of the refund.
55
+ */
56
+ amount: number;
57
+ /**
58
+ * The time the refund was created.
59
+ */
60
+ created_at: string;
61
+ /**
62
+ * The currency of the refund.
63
+ */
64
+ currency: Shared.Currency;
65
+ /**
66
+ * The payment associated with the refund.
67
+ */
68
+ payment: RefundRetrieveResponse.Payment | null;
69
+ /**
70
+ * The provider of the refund.
71
+ */
72
+ provider: PaymentProvider;
73
+ /**
74
+ * The time the refund was created by the provider.
75
+ */
76
+ provider_created_at: string | null;
77
+ /**
78
+ * The status of the refund reference.
79
+ */
80
+ reference_status: RefundReferenceStatus | null;
81
+ /**
82
+ * The type of refund reference that was made available by the payment provider.
83
+ */
84
+ reference_type: RefundReferenceType | null;
85
+ /**
86
+ * The value of the reference.
87
+ */
88
+ reference_value: string | null;
89
+ /**
90
+ * The status of the refund.
91
+ */
92
+ status: RefundStatus;
93
+ }
94
+ export declare namespace RefundRetrieveResponse {
95
+ /**
96
+ * The payment associated with the refund.
97
+ */
98
+ interface Payment {
99
+ /**
100
+ * The payment ID
101
+ */
102
+ id: string;
103
+ /**
104
+ * The reason why a specific payment was billed
105
+ */
106
+ billing_reason: PaymentsAPI.BillingReasons | null;
107
+ /**
108
+ * Possible card brands that a payment token can have
109
+ */
110
+ card_brand: PaymentsAPI.CardBrands | null;
111
+ /**
112
+ * The last 4 digits of the card used to make the payment.
113
+ */
114
+ card_last4: string | null;
115
+ /**
116
+ * The datetime the payment was created
117
+ */
118
+ created_at: string;
119
+ /**
120
+ * The available currencies on the platform
121
+ */
122
+ currency: Shared.Currency | null;
123
+ /**
124
+ * When an alert came in that this transaction will be disputed
125
+ */
126
+ dispute_alerted_at: string | null;
127
+ /**
128
+ * The member attached to this payment.
129
+ */
130
+ member: Payment.Member | null;
131
+ /**
132
+ * The membership attached to this payment.
133
+ */
134
+ membership: Payment.Membership | null;
135
+ /**
136
+ * The datetime the payment was paid
137
+ */
138
+ paid_at: string | null;
139
+ /**
140
+ * The different types of payment methods that can be used.
141
+ */
142
+ payment_method_type: PaymentsAPI.PaymentMethodTypes | null;
143
+ /**
144
+ * The subtotal to show to the creator (excluding buyer fees).
145
+ */
146
+ subtotal: number | null;
147
+ /**
148
+ * The total to show to the creator (excluding buyer fees).
149
+ */
150
+ total: number | null;
151
+ /**
152
+ * The total in USD to show to the creator (excluding buyer fees).
153
+ */
154
+ usd_total: number | null;
155
+ /**
156
+ * The user that made this payment.
157
+ */
158
+ user: Payment.User | null;
159
+ }
160
+ namespace Payment {
161
+ /**
162
+ * The member attached to this payment.
163
+ */
164
+ interface Member {
165
+ /**
166
+ * The ID of the member
167
+ */
168
+ id: string;
169
+ /**
170
+ * The phone number for the member, if available.
171
+ */
172
+ phone: string | null;
173
+ }
174
+ /**
175
+ * The membership attached to this payment.
176
+ */
177
+ interface Membership {
178
+ /**
179
+ * The internal ID of the membership.
180
+ */
181
+ id: string;
182
+ /**
183
+ * The state of the membership.
184
+ */
185
+ status: Shared.MembershipStatus;
186
+ }
187
+ /**
188
+ * The user that made this payment.
189
+ */
190
+ interface User {
191
+ /**
192
+ * The internal ID of the user.
193
+ */
194
+ id: string;
195
+ /**
196
+ * The email of the user
197
+ */
198
+ email: string | null;
199
+ /**
200
+ * The name of the user from their Whop account.
201
+ */
202
+ name: string | null;
203
+ /**
204
+ * The username of the user from their Whop account.
205
+ */
206
+ username: string;
207
+ }
208
+ }
209
+ }
210
+ /**
211
+ * An object representing a refund made on a payment.
212
+ */
213
+ export interface RefundListResponse {
214
+ /**
215
+ * The ID of the refund.
216
+ */
217
+ id: string;
218
+ /**
219
+ * The amount of the refund.
220
+ */
221
+ amount: number;
222
+ /**
223
+ * The time the refund was created.
224
+ */
225
+ created_at: string;
226
+ /**
227
+ * The currency of the refund.
228
+ */
229
+ currency: Shared.Currency;
230
+ /**
231
+ * The payment associated with the refund.
232
+ */
233
+ payment: RefundListResponse.Payment | null;
234
+ /**
235
+ * The provider of the refund.
236
+ */
237
+ provider: PaymentProvider;
238
+ /**
239
+ * The time the refund was created by the provider.
240
+ */
241
+ provider_created_at: string | null;
242
+ /**
243
+ * The status of the refund reference.
244
+ */
245
+ reference_status: RefundReferenceStatus | null;
246
+ /**
247
+ * The type of refund reference that was made available by the payment provider.
248
+ */
249
+ reference_type: RefundReferenceType | null;
250
+ /**
251
+ * The value of the reference.
252
+ */
253
+ reference_value: string | null;
254
+ /**
255
+ * The status of the refund.
256
+ */
257
+ status: RefundStatus;
258
+ }
259
+ export declare namespace RefundListResponse {
260
+ /**
261
+ * The payment associated with the refund.
262
+ */
263
+ interface Payment {
264
+ /**
265
+ * The payment ID
266
+ */
267
+ id: string;
268
+ }
269
+ }
270
+ export interface RefundListParams extends CursorPageParams {
271
+ /**
272
+ * The ID of the payment to list refunds for
273
+ */
274
+ payment_id: string;
275
+ /**
276
+ * Returns the elements in the list that come before the specified cursor.
277
+ */
278
+ before?: string | null;
279
+ /**
280
+ * The minimum creation date to filter by
281
+ */
282
+ created_after?: string | null;
283
+ /**
284
+ * The maximum creation date to filter by
285
+ */
286
+ created_before?: string | null;
287
+ /**
288
+ * The direction of the sort.
289
+ */
290
+ direction?: Shared.Direction | null;
291
+ /**
292
+ * Returns the first _n_ elements from the list.
293
+ */
294
+ first?: number | null;
295
+ /**
296
+ * Returns the last _n_ elements from the list.
297
+ */
298
+ last?: number | null;
299
+ }
300
+ export declare namespace Refunds {
301
+ export { type PaymentProvider as PaymentProvider, type RefundReferenceStatus as RefundReferenceStatus, type RefundReferenceType as RefundReferenceType, type RefundStatus as RefundStatus, type RefundRetrieveResponse as RefundRetrieveResponse, type RefundListResponse as RefundListResponse, type RefundListResponsesCursorPage as RefundListResponsesCursorPage, type RefundListParams as RefundListParams, };
302
+ }
303
+ //# sourceMappingURL=refunds.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refunds.d.mts","sourceRoot":"","sources":["../src/resources/refunds.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,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAIlF;;;;;;OAMG;IACH,IAAI,CACF,KAAK,EAAE,gBAAgB,EACvB,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,6BAA6B,EAAE,kBAAkB,CAAC;CAGlE;AAED,MAAM,MAAM,6BAA6B,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,SAA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AAI,eAAe,EACvC,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
@@ -0,0 +1,303 @@
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 Refunds extends APIResource {
8
+ /**
9
+ * Retrieves a Refund by ID
10
+ *
11
+ * Required permissions:
12
+ *
13
+ * - `payment:basic:read`
14
+ * - `member:email:read`
15
+ * - `member:basic:read`
16
+ * - `member:phone:read`
17
+ */
18
+ retrieve(id: string, options?: RequestOptions): APIPromise<RefundRetrieveResponse>;
19
+ /**
20
+ * Lists Refunds for a payment.
21
+ *
22
+ * Required permissions:
23
+ *
24
+ * - `payment:basic:read`
25
+ */
26
+ list(query: RefundListParams, options?: RequestOptions): PagePromise<RefundListResponsesCursorPage, RefundListResponse>;
27
+ }
28
+ export type RefundListResponsesCursorPage = CursorPage<RefundListResponse>;
29
+ /**
30
+ * The different payment providers.
31
+ */
32
+ export type PaymentProvider = 'stripe' | 'coinbase' | 'paypal' | 'apple' | 'sezzle' | 'splitit' | 'platform_balance' | 'multi_psp';
33
+ /**
34
+ * The status of the refund reference.
35
+ */
36
+ export type RefundReferenceStatus = 'available' | 'pending' | 'unavailable';
37
+ /**
38
+ * The type of refund reference that was made available by the payment provider.
39
+ */
40
+ export type RefundReferenceType = 'acquirer_reference_number' | 'retrieval_reference_number' | 'system_trace_audit_number';
41
+ /**
42
+ * The different statuses for a Refund object
43
+ */
44
+ export type RefundStatus = 'pending' | 'requires_action' | 'succeeded' | 'failed' | 'canceled';
45
+ /**
46
+ * An object representing a refund made on a payment.
47
+ */
48
+ export interface RefundRetrieveResponse {
49
+ /**
50
+ * The ID of the refund.
51
+ */
52
+ id: string;
53
+ /**
54
+ * The amount of the refund.
55
+ */
56
+ amount: number;
57
+ /**
58
+ * The time the refund was created.
59
+ */
60
+ created_at: string;
61
+ /**
62
+ * The currency of the refund.
63
+ */
64
+ currency: Shared.Currency;
65
+ /**
66
+ * The payment associated with the refund.
67
+ */
68
+ payment: RefundRetrieveResponse.Payment | null;
69
+ /**
70
+ * The provider of the refund.
71
+ */
72
+ provider: PaymentProvider;
73
+ /**
74
+ * The time the refund was created by the provider.
75
+ */
76
+ provider_created_at: string | null;
77
+ /**
78
+ * The status of the refund reference.
79
+ */
80
+ reference_status: RefundReferenceStatus | null;
81
+ /**
82
+ * The type of refund reference that was made available by the payment provider.
83
+ */
84
+ reference_type: RefundReferenceType | null;
85
+ /**
86
+ * The value of the reference.
87
+ */
88
+ reference_value: string | null;
89
+ /**
90
+ * The status of the refund.
91
+ */
92
+ status: RefundStatus;
93
+ }
94
+ export declare namespace RefundRetrieveResponse {
95
+ /**
96
+ * The payment associated with the refund.
97
+ */
98
+ interface Payment {
99
+ /**
100
+ * The payment ID
101
+ */
102
+ id: string;
103
+ /**
104
+ * The reason why a specific payment was billed
105
+ */
106
+ billing_reason: PaymentsAPI.BillingReasons | null;
107
+ /**
108
+ * Possible card brands that a payment token can have
109
+ */
110
+ card_brand: PaymentsAPI.CardBrands | null;
111
+ /**
112
+ * The last 4 digits of the card used to make the payment.
113
+ */
114
+ card_last4: string | null;
115
+ /**
116
+ * The datetime the payment was created
117
+ */
118
+ created_at: string;
119
+ /**
120
+ * The available currencies on the platform
121
+ */
122
+ currency: Shared.Currency | null;
123
+ /**
124
+ * When an alert came in that this transaction will be disputed
125
+ */
126
+ dispute_alerted_at: string | null;
127
+ /**
128
+ * The member attached to this payment.
129
+ */
130
+ member: Payment.Member | null;
131
+ /**
132
+ * The membership attached to this payment.
133
+ */
134
+ membership: Payment.Membership | null;
135
+ /**
136
+ * The datetime the payment was paid
137
+ */
138
+ paid_at: string | null;
139
+ /**
140
+ * The different types of payment methods that can be used.
141
+ */
142
+ payment_method_type: PaymentsAPI.PaymentMethodTypes | null;
143
+ /**
144
+ * The subtotal to show to the creator (excluding buyer fees).
145
+ */
146
+ subtotal: number | null;
147
+ /**
148
+ * The total to show to the creator (excluding buyer fees).
149
+ */
150
+ total: number | null;
151
+ /**
152
+ * The total in USD to show to the creator (excluding buyer fees).
153
+ */
154
+ usd_total: number | null;
155
+ /**
156
+ * The user that made this payment.
157
+ */
158
+ user: Payment.User | null;
159
+ }
160
+ namespace Payment {
161
+ /**
162
+ * The member attached to this payment.
163
+ */
164
+ interface Member {
165
+ /**
166
+ * The ID of the member
167
+ */
168
+ id: string;
169
+ /**
170
+ * The phone number for the member, if available.
171
+ */
172
+ phone: string | null;
173
+ }
174
+ /**
175
+ * The membership attached to this payment.
176
+ */
177
+ interface Membership {
178
+ /**
179
+ * The internal ID of the membership.
180
+ */
181
+ id: string;
182
+ /**
183
+ * The state of the membership.
184
+ */
185
+ status: Shared.MembershipStatus;
186
+ }
187
+ /**
188
+ * The user that made this payment.
189
+ */
190
+ interface User {
191
+ /**
192
+ * The internal ID of the user.
193
+ */
194
+ id: string;
195
+ /**
196
+ * The email of the user
197
+ */
198
+ email: string | null;
199
+ /**
200
+ * The name of the user from their Whop account.
201
+ */
202
+ name: string | null;
203
+ /**
204
+ * The username of the user from their Whop account.
205
+ */
206
+ username: string;
207
+ }
208
+ }
209
+ }
210
+ /**
211
+ * An object representing a refund made on a payment.
212
+ */
213
+ export interface RefundListResponse {
214
+ /**
215
+ * The ID of the refund.
216
+ */
217
+ id: string;
218
+ /**
219
+ * The amount of the refund.
220
+ */
221
+ amount: number;
222
+ /**
223
+ * The time the refund was created.
224
+ */
225
+ created_at: string;
226
+ /**
227
+ * The currency of the refund.
228
+ */
229
+ currency: Shared.Currency;
230
+ /**
231
+ * The payment associated with the refund.
232
+ */
233
+ payment: RefundListResponse.Payment | null;
234
+ /**
235
+ * The provider of the refund.
236
+ */
237
+ provider: PaymentProvider;
238
+ /**
239
+ * The time the refund was created by the provider.
240
+ */
241
+ provider_created_at: string | null;
242
+ /**
243
+ * The status of the refund reference.
244
+ */
245
+ reference_status: RefundReferenceStatus | null;
246
+ /**
247
+ * The type of refund reference that was made available by the payment provider.
248
+ */
249
+ reference_type: RefundReferenceType | null;
250
+ /**
251
+ * The value of the reference.
252
+ */
253
+ reference_value: string | null;
254
+ /**
255
+ * The status of the refund.
256
+ */
257
+ status: RefundStatus;
258
+ }
259
+ export declare namespace RefundListResponse {
260
+ /**
261
+ * The payment associated with the refund.
262
+ */
263
+ interface Payment {
264
+ /**
265
+ * The payment ID
266
+ */
267
+ id: string;
268
+ }
269
+ }
270
+ export interface RefundListParams extends CursorPageParams {
271
+ /**
272
+ * The ID of the payment to list refunds for
273
+ */
274
+ payment_id: string;
275
+ /**
276
+ * Returns the elements in the list that come before the specified cursor.
277
+ */
278
+ before?: string | null;
279
+ /**
280
+ * The minimum creation date to filter by
281
+ */
282
+ created_after?: string | null;
283
+ /**
284
+ * The maximum creation date to filter by
285
+ */
286
+ created_before?: string | null;
287
+ /**
288
+ * The direction of the sort.
289
+ */
290
+ direction?: Shared.Direction | null;
291
+ /**
292
+ * Returns the first _n_ elements from the list.
293
+ */
294
+ first?: number | null;
295
+ /**
296
+ * Returns the last _n_ elements from the list.
297
+ */
298
+ last?: number | null;
299
+ }
300
+ export declare namespace Refunds {
301
+ export { type PaymentProvider as PaymentProvider, type RefundReferenceStatus as RefundReferenceStatus, type RefundReferenceType as RefundReferenceType, type RefundStatus as RefundStatus, type RefundRetrieveResponse as RefundRetrieveResponse, type RefundListResponse as RefundListResponse, type RefundListResponsesCursorPage as RefundListResponsesCursorPage, type RefundListParams as RefundListParams, };
302
+ }
303
+ //# sourceMappingUR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E,MAAM,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,yBAAiB,kBAAkB,CAAC;IAClC;;OAEG;IACH,UAAiB,OAAO;QACtB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACxD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;IAEpC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
@@ -0,0 +1,34 @@
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.Refunds = 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 Refunds extends resource_1.APIResource {
9
+ /**
10
+ * Retrieves a Refund by ID
11
+ *
12
+ * Required permissions:
13
+ *
14
+ * - `payment:basic:read`
15
+ * - `member:email:read`
16
+ * - `member:basic:read`
17
+ * - `member:phone:read`
18
+ */
19
+ retrieve(id, options) {
20
+ return this._client.get((0, path_1.path) `/refunds/${id}`, options);
21
+ }
22
+ /**
23
+ * Lists Refunds for a payment.
24
+ *
25
+ * Required permissions:
26
+ *
27
+ * - `payment:basic:read`
28
+ */
29
+ list(query, options) {
30
+ return this._client.getAPIList('/refunds', (pagination_1.CursorPage), { query, ...options });
31
+ }
32
+ }
33
+ exports.Refunds = Refunds;
34
+ //# sourceMappingURL=refunds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refunds.js","sourceRoot":"","sources":["../src/resources/refunds.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,YAAY,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;;;;;OAMG;IACH,IAAI,CACF,KAAuB,EACvB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,EAAE,CAAA,uBAA8B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpG,CAAC;CACF;AA5BD,0BA4BC"}
@@ -0,0 +1,30 @@
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 Refunds extends APIResource {
6
+ /**
7
+ * Retrieves a Refund by ID
8
+ *
9
+ * Required permissions:
10
+ *
11
+ * - `payment:basic:read`
12
+ * - `member:email:read`
13
+ * - `member:basic:read`
14
+ * - `member:phone:read`
15
+ */
16
+ retrieve(id, options) {
17
+ return this._client.get(path `/refunds/${id}`, options);
18
+ }
19
+ /**
20
+ * Lists Refunds for a payment.
21
+ *
22
+ * Required permissions:
23
+ *
24
+ * - `payment:basic:read`
25
+ */
26
+ list(query, options) {
27
+ return this._client.getAPIList('/refunds', (CursorPage), { query, ...options });
28
+ }
29
+ }
30
+ //# sourceMappingURL=refunds.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refunds.mjs","sourceRoot":"","sources":["../src/resources/refunds.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,YAAY,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;;;;;OAMG;IACH,IAAI,CACF,KAAuB,EACvB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,EAAE,CAAA,UAA8B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpG,CAAC;CACF"}