@augustusbank/typescript-sdk 0.21.0 → 0.22.1

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 (216) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/client.d.mts +12 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +12 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/account-holders.d.mts +1555 -1184
  12. package/resources/account-holders.d.mts.map +1 -1
  13. package/resources/account-holders.d.ts +1555 -1184
  14. package/resources/account-holders.d.ts.map +1 -1
  15. package/resources/account-holders.js +59 -0
  16. package/resources/account-holders.js.map +1 -1
  17. package/resources/account-holders.mjs +59 -0
  18. package/resources/account-holders.mjs.map +1 -1
  19. package/resources/account-programs.d.mts +22 -17
  20. package/resources/account-programs.d.mts.map +1 -1
  21. package/resources/account-programs.d.ts +22 -17
  22. package/resources/account-programs.d.ts.map +1 -1
  23. package/resources/account-programs.js +2 -2
  24. package/resources/account-programs.js.map +1 -1
  25. package/resources/account-programs.mjs +2 -2
  26. package/resources/account-programs.mjs.map +1 -1
  27. package/resources/accounts.d.mts +226 -48
  28. package/resources/accounts.d.mts.map +1 -1
  29. package/resources/accounts.d.ts +226 -48
  30. package/resources/accounts.d.ts.map +1 -1
  31. package/resources/accounts.js +55 -2
  32. package/resources/accounts.js.map +1 -1
  33. package/resources/accounts.mjs +55 -2
  34. package/resources/accounts.mjs.map +1 -1
  35. package/resources/api-keys.d.mts +1 -1
  36. package/resources/api-keys.d.mts.map +1 -1
  37. package/resources/api-keys.d.ts +1 -1
  38. package/resources/api-keys.d.ts.map +1 -1
  39. package/resources/api-versions.d.mts +3 -0
  40. package/resources/api-versions.d.mts.map +1 -1
  41. package/resources/api-versions.d.ts +3 -0
  42. package/resources/api-versions.d.ts.map +1 -1
  43. package/resources/conversions.d.mts +36 -81
  44. package/resources/conversions.d.mts.map +1 -1
  45. package/resources/conversions.d.ts +36 -81
  46. package/resources/conversions.d.ts.map +1 -1
  47. package/resources/conversions.js +25 -1
  48. package/resources/conversions.js.map +1 -1
  49. package/resources/conversions.mjs +25 -1
  50. package/resources/conversions.mjs.map +1 -1
  51. package/resources/counterparties.d.mts +1042 -0
  52. package/resources/counterparties.d.mts.map +1 -0
  53. package/resources/counterparties.d.ts +1042 -0
  54. package/resources/counterparties.d.ts.map +1 -0
  55. package/resources/counterparties.js +45 -0
  56. package/resources/counterparties.js.map +1 -0
  57. package/resources/counterparties.mjs +41 -0
  58. package/resources/counterparties.mjs.map +1 -0
  59. package/resources/deposits.d.mts +48 -186
  60. package/resources/deposits.d.mts.map +1 -1
  61. package/resources/deposits.d.ts +48 -186
  62. package/resources/deposits.d.ts.map +1 -1
  63. package/resources/events.d.mts +3 -3
  64. package/resources/events.d.mts.map +1 -1
  65. package/resources/events.d.ts +3 -3
  66. package/resources/events.d.ts.map +1 -1
  67. package/resources/index.d.mts +5 -3
  68. package/resources/index.d.mts.map +1 -1
  69. package/resources/index.d.ts +5 -3
  70. package/resources/index.d.ts.map +1 -1
  71. package/resources/index.js +5 -1
  72. package/resources/index.js.map +1 -1
  73. package/resources/index.mjs +2 -0
  74. package/resources/index.mjs.map +1 -1
  75. package/resources/payouts.d.mts +133 -335
  76. package/resources/payouts.d.mts.map +1 -1
  77. package/resources/payouts.d.ts +133 -335
  78. package/resources/payouts.d.ts.map +1 -1
  79. package/resources/payouts.js +25 -0
  80. package/resources/payouts.js.map +1 -1
  81. package/resources/payouts.mjs +25 -0
  82. package/resources/payouts.mjs.map +1 -1
  83. package/resources/quotes/indicative.d.mts +7 -11
  84. package/resources/quotes/indicative.d.mts.map +1 -1
  85. package/resources/quotes/indicative.d.ts +7 -11
  86. package/resources/quotes/indicative.d.ts.map +1 -1
  87. package/resources/quotes/quotes.d.mts +4 -8
  88. package/resources/quotes/quotes.d.mts.map +1 -1
  89. package/resources/quotes/quotes.d.ts +4 -8
  90. package/resources/quotes/quotes.d.ts.map +1 -1
  91. package/resources/quotes/quotes.js.map +1 -1
  92. package/resources/quotes/quotes.mjs.map +1 -1
  93. package/resources/returns.d.mts +84 -39
  94. package/resources/returns.d.mts.map +1 -1
  95. package/resources/returns.d.ts +84 -39
  96. package/resources/returns.d.ts.map +1 -1
  97. package/resources/returns.js +22 -0
  98. package/resources/returns.js.map +1 -1
  99. package/resources/returns.mjs +22 -0
  100. package/resources/returns.mjs.map +1 -1
  101. package/resources/scopes.d.mts +4 -1
  102. package/resources/scopes.d.mts.map +1 -1
  103. package/resources/scopes.d.ts +4 -1
  104. package/resources/scopes.d.ts.map +1 -1
  105. package/resources/simulations/account-programs.d.mts +215 -0
  106. package/resources/simulations/account-programs.d.mts.map +1 -0
  107. package/resources/simulations/account-programs.d.ts +215 -0
  108. package/resources/simulations/account-programs.d.ts.map +1 -0
  109. package/resources/simulations/account-programs.js +96 -0
  110. package/resources/simulations/account-programs.js.map +1 -0
  111. package/resources/simulations/account-programs.mjs +92 -0
  112. package/resources/simulations/account-programs.mjs.map +1 -0
  113. package/resources/simulations/accounts.d.mts +209 -0
  114. package/resources/simulations/accounts.d.mts.map +1 -0
  115. package/resources/simulations/accounts.d.ts +209 -0
  116. package/resources/simulations/accounts.d.ts.map +1 -0
  117. package/resources/simulations/accounts.js +90 -0
  118. package/resources/simulations/accounts.js.map +1 -0
  119. package/resources/simulations/accounts.mjs +86 -0
  120. package/resources/simulations/accounts.mjs.map +1 -0
  121. package/resources/simulations/conversions.d.mts +54 -0
  122. package/resources/simulations/conversions.d.mts.map +1 -0
  123. package/resources/simulations/conversions.d.ts +54 -0
  124. package/resources/simulations/conversions.d.ts.map +1 -0
  125. package/resources/simulations/conversions.js +39 -0
  126. package/resources/simulations/conversions.js.map +1 -0
  127. package/resources/simulations/conversions.mjs +35 -0
  128. package/resources/simulations/conversions.mjs.map +1 -0
  129. package/resources/simulations/deposits.d.mts +202 -0
  130. package/resources/simulations/deposits.d.mts.map +1 -0
  131. package/resources/simulations/deposits.d.ts +202 -0
  132. package/resources/simulations/deposits.d.ts.map +1 -0
  133. package/resources/simulations/deposits.js +25 -0
  134. package/resources/simulations/deposits.js.map +1 -0
  135. package/resources/simulations/deposits.mjs +21 -0
  136. package/resources/simulations/deposits.mjs.map +1 -0
  137. package/resources/simulations/index.d.mts +7 -0
  138. package/resources/simulations/index.d.mts.map +1 -0
  139. package/resources/simulations/index.d.ts +7 -0
  140. package/resources/simulations/index.d.ts.map +1 -0
  141. package/resources/simulations/index.js +17 -0
  142. package/resources/simulations/index.js.map +1 -0
  143. package/resources/simulations/index.mjs +8 -0
  144. package/resources/simulations/index.mjs.map +1 -0
  145. package/resources/simulations/payouts.d.mts +62 -0
  146. package/resources/simulations/payouts.d.mts.map +1 -0
  147. package/resources/simulations/payouts.d.ts +62 -0
  148. package/resources/simulations/payouts.d.ts.map +1 -0
  149. package/resources/simulations/payouts.js +39 -0
  150. package/resources/simulations/payouts.js.map +1 -0
  151. package/resources/simulations/payouts.mjs +35 -0
  152. package/resources/simulations/payouts.mjs.map +1 -0
  153. package/resources/simulations/simulations.d.mts +26 -0
  154. package/resources/simulations/simulations.d.mts.map +1 -0
  155. package/resources/simulations/simulations.d.ts +26 -0
  156. package/resources/simulations/simulations.d.ts.map +1 -0
  157. package/resources/simulations/simulations.js +33 -0
  158. package/resources/simulations/simulations.js.map +1 -0
  159. package/resources/simulations/simulations.mjs +28 -0
  160. package/resources/simulations/simulations.mjs.map +1 -0
  161. package/resources/simulations.d.mts +2 -0
  162. package/resources/simulations.d.mts.map +1 -0
  163. package/resources/simulations.d.ts +2 -0
  164. package/resources/simulations.d.ts.map +1 -0
  165. package/resources/simulations.js +6 -0
  166. package/resources/simulations.js.map +1 -0
  167. package/resources/simulations.mjs +3 -0
  168. package/resources/simulations.mjs.map +1 -0
  169. package/resources/transactions.d.mts +342 -162
  170. package/resources/transactions.d.mts.map +1 -1
  171. package/resources/transactions.d.ts +342 -162
  172. package/resources/transactions.d.ts.map +1 -1
  173. package/resources/webhook-subscriptions.d.mts +61 -11
  174. package/resources/webhook-subscriptions.d.mts.map +1 -1
  175. package/resources/webhook-subscriptions.d.ts +61 -11
  176. package/resources/webhook-subscriptions.d.ts.map +1 -1
  177. package/resources/webhook-subscriptions.js +49 -0
  178. package/resources/webhook-subscriptions.js.map +1 -1
  179. package/resources/webhook-subscriptions.mjs +49 -0
  180. package/resources/webhook-subscriptions.mjs.map +1 -1
  181. package/resources/webhooks.d.mts +976 -978
  182. package/resources/webhooks.d.mts.map +1 -1
  183. package/resources/webhooks.d.ts +976 -978
  184. package/resources/webhooks.d.ts.map +1 -1
  185. package/src/client.ts +48 -8
  186. package/src/resources/account-holders.ts +1701 -1282
  187. package/src/resources/account-programs.ts +30 -19
  188. package/src/resources/accounts.ts +265 -50
  189. package/src/resources/api-keys.ts +3 -0
  190. package/src/resources/api-versions.ts +3 -0
  191. package/src/resources/conversions.ts +36 -93
  192. package/src/resources/counterparties.ts +3127 -0
  193. package/src/resources/deposits.ts +66 -269
  194. package/src/resources/events.ts +18 -12
  195. package/src/resources/index.ts +21 -4
  196. package/src/resources/payouts.ts +204 -439
  197. package/src/resources/quotes/indicative.ts +7 -12
  198. package/src/resources/quotes/quotes.ts +4 -9
  199. package/src/resources/returns.ts +144 -40
  200. package/src/resources/scopes.ts +7 -1
  201. package/src/resources/simulations/account-programs.ts +282 -0
  202. package/src/resources/simulations/accounts.ts +265 -0
  203. package/src/resources/simulations/conversions.ts +70 -0
  204. package/src/resources/simulations/deposits.ts +522 -0
  205. package/src/resources/simulations/index.ts +33 -0
  206. package/src/resources/simulations/payouts.ts +80 -0
  207. package/src/resources/simulations/simulations.ts +92 -0
  208. package/src/resources/simulations.ts +3 -0
  209. package/src/resources/transactions.ts +954 -206
  210. package/src/resources/webhook-subscriptions.ts +102 -36
  211. package/src/resources/webhooks.ts +1283 -1153
  212. package/src/version.ts +1 -1
  213. package/version.d.mts +1 -1
  214. package/version.d.ts +1 -1
  215. package/version.js +1 -1
  216. package/version.mjs +1 -1
@@ -5,22 +5,63 @@ import { RequestOptions } from "../internal/request-options.mjs";
5
5
  export declare class WebhookSubscriptions extends APIResource {
6
6
  /**
7
7
  * Creates a new webhook subscription.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const webhookSubscription =
12
+ * await client.webhookSubscriptions.create({
13
+ * events: ['payout.sent'],
14
+ * url: 'https://sandbox.example.com/webhooks/augustus',
15
+ * });
16
+ * ```
8
17
  */
9
18
  create(body: WebhookSubscriptionCreateParams, options?: RequestOptions): APIPromise<WebhookSubscriptionCreateResponse>;
10
19
  /**
11
20
  * Retrieves a webhook subscription by ID.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const webhookSubscription =
25
+ * await client.webhookSubscriptions.retrieve(
26
+ * '550e8400-e29b-41d4-a716-446655440009',
27
+ * );
28
+ * ```
12
29
  */
13
30
  retrieve(id: string, options?: RequestOptions): APIPromise<WebhookSubscriptionRetrieveResponse>;
14
31
  /**
15
32
  * Updates the URL and/or subscribed events.
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * const webhookSubscription =
37
+ * await client.webhookSubscriptions.update(
38
+ * '550e8400-e29b-41d4-a716-446655440009',
39
+ * );
40
+ * ```
16
41
  */
17
42
  update(id: string, body: WebhookSubscriptionUpdateParams, options?: RequestOptions): APIPromise<WebhookSubscriptionUpdateResponse>;
18
43
  /**
19
44
  * Lists webhook subscriptions for the merchant with cursor-based pagination.
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * // Automatically fetches more pages as needed.
49
+ * for await (const webhookSubscriptionListResponse of client.webhookSubscriptions.list()) {
50
+ * // ...
51
+ * }
52
+ * ```
20
53
  */
21
54
  list(query?: WebhookSubscriptionListParams | null | undefined, options?: RequestOptions): PagePromise<WebhookSubscriptionListResponsesCursorPage, WebhookSubscriptionListResponse>;
22
55
  /**
23
56
  * Permanently deletes a webhook subscription. This cannot be undone.
57
+ *
58
+ * @example
59
+ * ```ts
60
+ * const webhookSubscription =
61
+ * await client.webhookSubscriptions.delete(
62
+ * '550e8400-e29b-41d4-a716-446655440009',
63
+ * );
64
+ * ```
24
65
  */
25
66
  delete(id: string, options?: RequestOptions): APIPromise<WebhookSubscriptionDeleteResponse>;
26
67
  /**
@@ -29,6 +70,14 @@ export declare class WebhookSubscriptions extends APIResource {
29
70
  * and signature verification in any environment without creating a real business
30
71
  * event. Test-event failures do not affect the subscription's health counters or
31
72
  * trigger failure-notification emails.
73
+ *
74
+ * @example
75
+ * ```ts
76
+ * const response =
77
+ * await client.webhookSubscriptions.sendTestEvent(
78
+ * '550e8400-e29b-41d4-a716-446655440009',
79
+ * );
80
+ * ```
32
81
  */
33
82
  sendTestEvent(id: string, options?: RequestOptions): APIPromise<WebhookSubscriptionSendTestEventResponse>;
34
83
  }
@@ -45,7 +94,7 @@ export interface WebhookSubscriptionCreateResponse {
45
94
  /**
46
95
  * Event types this subscription receives.
47
96
  */
48
- events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed'>;
97
+ events: Array<'payout.initiated' | 'payout.submitted' | 'payout.sent' | 'payout.failed' | 'payout.returned' | 'return.initiated' | 'return.submitted' | 'return.sent' | 'return.failed' | 'return.returned' | 'deposit.settled' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed'>;
49
98
  /**
50
99
  * Resource type discriminator.
51
100
  */
@@ -71,7 +120,7 @@ export interface WebhookSubscriptionRetrieveResponse {
71
120
  /**
72
121
  * Event types this subscription receives.
73
122
  */
74
- events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed'>;
123
+ events: Array<'payout.initiated' | 'payout.submitted' | 'payout.sent' | 'payout.failed' | 'payout.returned' | 'return.initiated' | 'return.submitted' | 'return.sent' | 'return.failed' | 'return.returned' | 'deposit.settled' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed'>;
75
124
  /**
76
125
  * Resource type discriminator.
77
126
  */
@@ -97,7 +146,7 @@ export interface WebhookSubscriptionUpdateResponse {
97
146
  /**
98
147
  * Event types this subscription receives.
99
148
  */
100
- events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed'>;
149
+ events: Array<'payout.initiated' | 'payout.submitted' | 'payout.sent' | 'payout.failed' | 'payout.returned' | 'return.initiated' | 'return.submitted' | 'return.sent' | 'return.failed' | 'return.returned' | 'deposit.settled' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed'>;
101
150
  /**
102
151
  * Resource type discriminator.
103
152
  */
@@ -123,7 +172,7 @@ export interface WebhookSubscriptionListResponse {
123
172
  /**
124
173
  * Event types this subscription receives.
125
174
  */
126
- events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed'>;
175
+ events: Array<'payout.initiated' | 'payout.submitted' | 'payout.sent' | 'payout.failed' | 'payout.returned' | 'return.initiated' | 'return.submitted' | 'return.sent' | 'return.failed' | 'return.returned' | 'deposit.settled' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed'>;
127
176
  /**
128
177
  * Resource type discriminator.
129
178
  */
@@ -149,7 +198,7 @@ export interface WebhookSubscriptionDeleteResponse {
149
198
  /**
150
199
  * Event types this subscription receives.
151
200
  */
152
- events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed'>;
201
+ events: Array<'payout.initiated' | 'payout.submitted' | 'payout.sent' | 'payout.failed' | 'payout.returned' | 'return.initiated' | 'return.submitted' | 'return.sent' | 'return.failed' | 'return.returned' | 'deposit.settled' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed'>;
153
202
  /**
154
203
  * Resource type discriminator.
155
204
  */
@@ -187,7 +236,7 @@ export interface WebhookSubscriptionSendTestEventResponse {
187
236
  /**
188
237
  * Event type.
189
238
  */
190
- event_type: 'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed' | 'ping.test';
239
+ event_type: 'payout.initiated' | 'payout.submitted' | 'payout.sent' | 'payout.failed' | 'payout.returned' | 'return.initiated' | 'return.submitted' | 'return.sent' | 'return.failed' | 'return.returned' | 'deposit.settled' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed' | 'ping.test';
191
240
  /**
192
241
  * Resource type discriminator.
193
242
  */
@@ -197,7 +246,7 @@ export interface WebhookSubscriptionCreateParams {
197
246
  /**
198
247
  * Event types to subscribe to. Use ["*"] for all events.
199
248
  */
200
- events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed' | '*'>;
249
+ events: Array<'payout.initiated' | 'payout.submitted' | 'payout.sent' | 'payout.failed' | 'payout.returned' | 'return.initiated' | 'return.submitted' | 'return.sent' | 'return.failed' | 'return.returned' | 'deposit.settled' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed' | '*'>;
201
250
  /**
202
251
  * The HTTPS URL where webhook events will be delivered.
203
252
  */
@@ -205,13 +254,14 @@ export interface WebhookSubscriptionCreateParams {
205
254
  }
206
255
  export interface WebhookSubscriptionUpdateParams {
207
256
  /**
208
- * Event types to subscribe to. Use ["*"] for all events.
257
+ * New event types. Omit or send null to keep the current events. Use ["*"] for all
258
+ * events.
209
259
  */
210
- events?: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed' | '*'>;
260
+ events?: Array<'payout.initiated' | 'payout.submitted' | 'payout.sent' | 'payout.failed' | 'payout.returned' | 'return.initiated' | 'return.submitted' | 'return.sent' | 'return.failed' | 'return.returned' | 'deposit.settled' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed' | '*'> | null;
211
261
  /**
212
- * The HTTPS URL where webhook events will be delivered.
262
+ * The new HTTPS URL. Omit or send null to keep the current URL.
213
263
  */
214
- url?: string;
264
+ url?: string | null;
215
265
  }
216
266
  export interface WebhookSubscriptionListParams extends CursorPageParams {
217
267
  }
@@ -1 +1 @@
1
- {"version":3,"file":"webhook-subscriptions.d.mts","sourceRoot":"","sources":["../src/resources/webhook-subscriptions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,+BAA2B;AACpF,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D,qBAAa,o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G,IAAI,CAAC;IAET;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,6BAA8B,SAAQ,gBAAgB;CAAG;AAE1E,MAAM,CAAC,OAAO,WAAW,oBAAoB,CAAC;IAC5C,OAAO,EACL,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,0CAA0C,IAAI,0CAA0C,EAC7F,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;CACH"}
@@ -5,22 +5,63 @@ import { RequestOptions } from "../internal/request-options.js";
5
5
  export declare class WebhookSubscriptions extends APIResource {
6
6
  /**
7
7
  * Creates a new webhook subscription.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const webhookSubscription =
12
+ * await client.webhookSubscriptions.create({
13
+ * events: ['payout.sent'],
14
+ * url: 'https://sandbox.example.com/webhooks/augustus',
15
+ * });
16
+ * ```
8
17
  */
9
18
  create(body: WebhookSubscriptionCreateParams, options?: RequestOptions): APIPromise<WebhookSubscriptionCreateResponse>;
10
19
  /**
11
20
  * Retrieves a webhook subscription by ID.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const webhookSubscription =
25
+ * await client.webhookSubscriptions.retrieve(
26
+ * '550e8400-e29b-41d4-a716-446655440009',
27
+ * );
28
+ * ```
12
29
  */
13
30
  retrieve(id: string, options?: RequestOptions): APIPromise<WebhookSubscriptionRetrieveResponse>;
14
31
  /**
15
32
  * Updates the URL and/or subscribed events.
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * const webhookSubscription =
37
+ * await client.webhookSubscriptions.update(
38
+ * '550e8400-e29b-41d4-a716-446655440009',
39
+ * );
40
+ * ```
16
41
  */
17
42
  update(id: string, body: WebhookSubscriptionUpdateParams, options?: RequestOptions): APIPromise<WebhookSubscriptionUpdateResponse>;
18
43
  /**
19
44
  * Lists webhook subscriptions for the merchant with cursor-based pagination.
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * // Automatically fetches more pages as needed.
49
+ * for await (const webhookSubscriptionListResponse of client.webhookSubscriptions.list()) {
50
+ * // ...
51
+ * }
52
+ * ```
20
53
  */
21
54
  list(query?: WebhookSubscriptionListParams | null | undefined, options?: RequestOptions): PagePromise<WebhookSubscriptionListResponsesCursorPage, WebhookSubscriptionListResponse>;
22
55
  /**
23
56
  * Permanently deletes a webhook subscription. This cannot be undone.
57
+ *
58
+ * @example
59
+ * ```ts
60
+ * const webhookSubscription =
61
+ * await client.webhookSubscriptions.delete(
62
+ * '550e8400-e29b-41d4-a716-446655440009',
63
+ * );
64
+ * ```
24
65
  */
25
66
  delete(id: string, options?: RequestOptions): APIPromise<WebhookSubscriptionDeleteResponse>;
26
67
  /**
@@ -29,6 +70,14 @@ export declare class WebhookSubscriptions extends APIResource {
29
70
  * and signature verification in any environment without creating a real business
30
71
  * event. Test-event failures do not affect the subscription's health counters or
31
72
  * trigger failure-notification emails.
73
+ *
74
+ * @example
75
+ * ```ts
76
+ * const response =
77
+ * await client.webhookSubscriptions.sendTestEvent(
78
+ * '550e8400-e29b-41d4-a716-446655440009',
79
+ * );
80
+ * ```
32
81
  */
33
82
  sendTestEvent(id: string, options?: RequestOptions): APIPromise<WebhookSubscriptionSendTestEventResponse>;
34
83
  }
@@ -45,7 +94,7 @@ export interface WebhookSubscriptionCreateResponse {
45
94
  /**
46
95
  * Event types this subscription receives.
47
96
  */
48
- events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed'>;
97
+ events: Array<'payout.initiated' | 'payout.submitted' | 'payout.sent' | 'payout.failed' | 'payout.returned' | 'return.initiated' | 'return.submitted' | 'return.sent' | 'return.failed' | 'return.returned' | 'deposit.settled' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed'>;
49
98
  /**
50
99
  * Resource type discriminator.
51
100
  */
@@ -71,7 +120,7 @@ export interface WebhookSubscriptionRetrieveResponse {
71
120
  /**
72
121
  * Event types this subscription receives.
73
122
  */
74
- events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed'>;
123
+ events: Array<'payout.initiated' | 'payout.submitted' | 'payout.sent' | 'payout.failed' | 'payout.returned' | 'return.initiated' | 'return.submitted' | 'return.sent' | 'return.failed' | 'return.returned' | 'deposit.settled' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed'>;
75
124
  /**
76
125
  * Resource type discriminator.
77
126
  */
@@ -97,7 +146,7 @@ export interface WebhookSubscriptionUpdateResponse {
97
146
  /**
98
147
  * Event types this subscription receives.
99
148
  */
100
- events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed'>;
149
+ events: Array<'payout.initiated' | 'payout.submitted' | 'payout.sent' | 'payout.failed' | 'payout.returned' | 'return.initiated' | 'return.submitted' | 'return.sent' | 'return.failed' | 'return.returned' | 'deposit.settled' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed'>;
101
150
  /**
102
151
  * Resource type discriminator.
103
152
  */
@@ -123,7 +172,7 @@ export interface WebhookSubscriptionListResponse {
123
172
  /**
124
173
  * Event types this subscription receives.
125
174
  */
126
- events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed'>;
175
+ events: Array<'payout.initiated' | 'payout.submitted' | 'payout.sent' | 'payout.failed' | 'payout.returned' | 'return.initiated' | 'return.submitted' | 'return.sent' | 'return.failed' | 'return.returned' | 'deposit.settled' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed'>;
127
176
  /**
128
177
  * Resource type discriminator.
129
178
  */
@@ -149,7 +198,7 @@ export interface WebhookSubscriptionDeleteResponse {
149
198
  /**
150
199
  * Event types this subscription receives.
151
200
  */
152
- events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed'>;
201
+ events: Array<'payout.initiated' | 'payout.submitted' | 'payout.sent' | 'payout.failed' | 'payout.returned' | 'return.initiated' | 'return.submitted' | 'return.sent' | 'return.failed' | 'return.returned' | 'deposit.settled' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed'>;
153
202
  /**
154
203
  * Resource type discriminator.
155
204
  */
@@ -187,7 +236,7 @@ export interface WebhookSubscriptionSendTestEventResponse {
187
236
  /**
188
237
  * Event type.
189
238
  */
190
- event_type: 'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed' | 'ping.test';
239
+ event_type: 'payout.initiated' | 'payout.submitted' | 'payout.sent' | 'payout.failed' | 'payout.returned' | 'return.initiated' | 'return.submitted' | 'return.sent' | 'return.failed' | 'return.returned' | 'deposit.settled' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed' | 'ping.test';
191
240
  /**
192
241
  * Resource type discriminator.
193
242
  */
@@ -197,7 +246,7 @@ export interface WebhookSubscriptionCreateParams {
197
246
  /**
198
247
  * Event types to subscribe to. Use ["*"] for all events.
199
248
  */
200
- events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed' | '*'>;
249
+ events: Array<'payout.initiated' | 'payout.submitted' | 'payout.sent' | 'payout.failed' | 'payout.returned' | 'return.initiated' | 'return.submitted' | 'return.sent' | 'return.failed' | 'return.returned' | 'deposit.settled' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed' | '*'>;
201
250
  /**
202
251
  * The HTTPS URL where webhook events will be delivered.
203
252
  */
@@ -205,13 +254,14 @@ export interface WebhookSubscriptionCreateParams {
205
254
  }
206
255
  export interface WebhookSubscriptionUpdateParams {
207
256
  /**
208
- * Event types to subscribe to. Use ["*"] for all events.
257
+ * New event types. Omit or send null to keep the current events. Use ["*"] for all
258
+ * events.
209
259
  */
210
- events?: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed' | '*'>;
260
+ events?: Array<'payout.initiated' | 'payout.submitted' | 'payout.sent' | 'payout.failed' | 'payout.returned' | 'return.initiated' | 'return.submitted' | 'return.sent' | 'return.failed' | 'return.returned' | 'deposit.settled' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'account_holder.active' | 'account_holder.closed' | '*'> | null;
211
261
  /**
212
- * The HTTPS URL where webhook events will be delivered.
262
+ * The new HTTPS URL. Omit or send null to keep the current URL.
213
263
  */
214
- url?: string;
264
+ url?: string | null;
215
265
  }
216
266
  export interface WebhookSubscriptionListParams extends CursorPageParams {
217
267
  }
@@ -1 +1 @@
1
- {"version":3,"file":"webhook-subscriptions.d.ts","sourceRoot":"","sources":["../src/resources/webhook-subscriptions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,8BAA2B;AACpF,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,oBAAqB,SAAQ,WAAW;IACnD;;OAEG;IACH,MAAM,CACJ,IAAI,EAAE,+BAA+B,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iCAAiC,CAAC;IAIhD;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mCAAmC,CAAC;IAI/F;;OAEG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,+BAA+B,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iCAAiC,CAAC;IAIhD;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,6BAA6B,GAAG,IAAI,GAAG,SAAc,EAC5D,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,0CAA0C,EAAE,+BAA+B,CAAC;IAO3F;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iCAAiC,CAAC;IAI3F;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UA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AAa,GACb,eAAe,GACf,iBAAiB,GACjB,iBAAiB,GACjB,oBAAoB,GACpB,sBAAsB,GACtB,mBAAmB,GACnB,uBAAuB,GACvB,uBAAuB,GACvB,GAAG,CACN,CAAC;IAEF;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,+BAA+B;IAC9C;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CACV,kBAAkB,GAClB,kBAAkB,GAClB,aAAa,GACb,eAAe,GACf,iBAAiB,GACjB,kBAAkB,GAClB,kBAAkB,GAClB,aAAa,GACb,eAAe,GACf,iBAAiB,GACjB,iBAAiB,GACjB,oBAAoB,GACpB,sBAAsB,GACtB,mBAAmB,GACnB,uBAAuB,GACvB,uBAAuB,GACvB,GAAG,CACN,GAAG,IAAI,CAAC;IAET;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,6BAA8B,SAAQ,gBAAgB;CAAG;AAE1E,MAAM,CAAC,OAAO,WAAW,oBAAoB,CAAC;IAC5C,OAAO,EACL,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,0CAA0C,IAAI,0CAA0C,EAC7F,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;CACH"}
@@ -8,24 +8,57 @@ const path_1 = require("../internal/utils/path.js");
8
8
  class WebhookSubscriptions extends resource_1.APIResource {
9
9
  /**
10
10
  * Creates a new webhook subscription.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const webhookSubscription =
15
+ * await client.webhookSubscriptions.create({
16
+ * events: ['payout.sent'],
17
+ * url: 'https://sandbox.example.com/webhooks/augustus',
18
+ * });
19
+ * ```
11
20
  */
12
21
  create(body, options) {
13
22
  return this._client.post('/v1/webhook_subscriptions', { body, ...options });
14
23
  }
15
24
  /**
16
25
  * Retrieves a webhook subscription by ID.
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * const webhookSubscription =
30
+ * await client.webhookSubscriptions.retrieve(
31
+ * '550e8400-e29b-41d4-a716-446655440009',
32
+ * );
33
+ * ```
17
34
  */
18
35
  retrieve(id, options) {
19
36
  return this._client.get((0, path_1.path) `/v1/webhook_subscriptions/${id}`, options);
20
37
  }
21
38
  /**
22
39
  * Updates the URL and/or subscribed events.
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * const webhookSubscription =
44
+ * await client.webhookSubscriptions.update(
45
+ * '550e8400-e29b-41d4-a716-446655440009',
46
+ * );
47
+ * ```
23
48
  */
24
49
  update(id, body, options) {
25
50
  return this._client.post((0, path_1.path) `/v1/webhook_subscriptions/${id}`, { body, ...options });
26
51
  }
27
52
  /**
28
53
  * Lists webhook subscriptions for the merchant with cursor-based pagination.
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * // Automatically fetches more pages as needed.
58
+ * for await (const webhookSubscriptionListResponse of client.webhookSubscriptions.list()) {
59
+ * // ...
60
+ * }
61
+ * ```
29
62
  */
30
63
  list(query = {}, options) {
31
64
  return this._client.getAPIList('/v1/webhook_subscriptions', (pagination_1.CursorPage), {
@@ -35,6 +68,14 @@ class WebhookSubscriptions extends resource_1.APIResource {
35
68
  }
36
69
  /**
37
70
  * Permanently deletes a webhook subscription. This cannot be undone.
71
+ *
72
+ * @example
73
+ * ```ts
74
+ * const webhookSubscription =
75
+ * await client.webhookSubscriptions.delete(
76
+ * '550e8400-e29b-41d4-a716-446655440009',
77
+ * );
78
+ * ```
38
79
  */
39
80
  delete(id, options) {
40
81
  return this._client.delete((0, path_1.path) `/v1/webhook_subscriptions/${id}`, options);
@@ -45,6 +86,14 @@ class WebhookSubscriptions extends resource_1.APIResource {
45
86
  * and signature verification in any environment without creating a real business
46
87
  * event. Test-event failures do not affect the subscription's health counters or
47
88
  * trigger failure-notification emails.
89
+ *
90
+ * @example
91
+ * ```ts
92
+ * const response =
93
+ * await client.webhookSubscriptions.sendTestEvent(
94
+ * '550e8400-e29b-41d4-a716-446655440009',
95
+ * );
96
+ * ```
48
97
  */
49
98
  sendTestEvent(id, options) {
50
99
  return this._client.post((0, path_1.path) `/v1/webhook_subscriptions/${id}/send_test_event`, options);
@@ -1 +1 @@
1
- {"version":3,"file":"webhook-subscriptions.js","sourceRoot":"","sources":["../src/resources/webhook-subscriptions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,oBAAqB,SAAQ,sBAAW;IACnD;;OAEG;IACH,MAAM,CACJ,IAAqC,EACrC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,6BAA6B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,EAAU,EACV,IAAqC,EACrC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,6BAA6B,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA0D,EAAE,EAC5D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,2BAA2B,EAAE,CAAA,uBAA2C,CAAA,E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;IACH,IAAI,CACF,QAA0D,EAAE,EAC5D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,2BAA2B,EAAE,CAAA,uBAA2C,CAAA,EAAE;YACvG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,6BAA6B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,aAAa,CAAC,EAAU,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,6BAA6B,EAAE,kBAAkB,EAAE,OAAO,CAAC,CAAC;IAC3F,CAAC;CACF;AA5GD,oDA4GC"}
@@ -5,24 +5,57 @@ import { path } from "../internal/utils/path.mjs";
5
5
  export class WebhookSubscriptions extends APIResource {
6
6
  /**
7
7
  * Creates a new webhook subscription.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const webhookSubscription =
12
+ * await client.webhookSubscriptions.create({
13
+ * events: ['payout.sent'],
14
+ * url: 'https://sandbox.example.com/webhooks/augustus',
15
+ * });
16
+ * ```
8
17
  */
9
18
  create(body, options) {
10
19
  return this._client.post('/v1/webhook_subscriptions', { body, ...options });
11
20
  }
12
21
  /**
13
22
  * Retrieves a webhook subscription by ID.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const webhookSubscription =
27
+ * await client.webhookSubscriptions.retrieve(
28
+ * '550e8400-e29b-41d4-a716-446655440009',
29
+ * );
30
+ * ```
14
31
  */
15
32
  retrieve(id, options) {
16
33
  return this._client.get(path `/v1/webhook_subscriptions/${id}`, options);
17
34
  }
18
35
  /**
19
36
  * Updates the URL and/or subscribed events.
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * const webhookSubscription =
41
+ * await client.webhookSubscriptions.update(
42
+ * '550e8400-e29b-41d4-a716-446655440009',
43
+ * );
44
+ * ```
20
45
  */
21
46
  update(id, body, options) {
22
47
  return this._client.post(path `/v1/webhook_subscriptions/${id}`, { body, ...options });
23
48
  }
24
49
  /**
25
50
  * Lists webhook subscriptions for the merchant with cursor-based pagination.
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * // Automatically fetches more pages as needed.
55
+ * for await (const webhookSubscriptionListResponse of client.webhookSubscriptions.list()) {
56
+ * // ...
57
+ * }
58
+ * ```
26
59
  */
27
60
  list(query = {}, options) {
28
61
  return this._client.getAPIList('/v1/webhook_subscriptions', (CursorPage), {
@@ -32,6 +65,14 @@ export class WebhookSubscriptions extends APIResource {
32
65
  }
33
66
  /**
34
67
  * Permanently deletes a webhook subscription. This cannot be undone.
68
+ *
69
+ * @example
70
+ * ```ts
71
+ * const webhookSubscription =
72
+ * await client.webhookSubscriptions.delete(
73
+ * '550e8400-e29b-41d4-a716-446655440009',
74
+ * );
75
+ * ```
35
76
  */
36
77
  delete(id, options) {
37
78
  return this._client.delete(path `/v1/webhook_subscriptions/${id}`, options);
@@ -42,6 +83,14 @@ export class WebhookSubscriptions extends APIResource {
42
83
  * and signature verification in any environment without creating a real business
43
84
  * event. Test-event failures do not affect the subscription's health counters or
44
85
  * trigger failure-notification emails.
86
+ *
87
+ * @example
88
+ * ```ts
89
+ * const response =
90
+ * await client.webhookSubscriptions.sendTestEvent(
91
+ * '550e8400-e29b-41d4-a716-446655440009',
92
+ * );
93
+ * ```
45
94
  */
46
95
  sendTestEvent(id, options) {
47
96
  return this._client.post(path `/v1/webhook_subscriptions/${id}/send_test_event`, options);
@@ -1 +1 @@
1
- {"version":3,"file":"webhook-subscriptions.mjs","sourceRoot":"","sources":["../src/resources/webhook-subscriptions.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,UAAU,EAAsC,+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