@stigg/typescript 0.1.0-beta.20 → 0.1.0-beta.21

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 (274) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +1 -1
  3. package/resources/v1/addons/addons.d.mts +143 -33
  4. package/resources/v1/addons/addons.d.mts.map +1 -1
  5. package/resources/v1/addons/addons.d.ts +143 -33
  6. package/resources/v1/addons/addons.d.ts.map +1 -1
  7. package/resources/v1/addons/addons.js +110 -17
  8. package/resources/v1/addons/addons.js.map +1 -1
  9. package/resources/v1/addons/addons.mjs +110 -17
  10. package/resources/v1/addons/addons.mjs.map +1 -1
  11. package/resources/v1/addons/entitlements.d.mts +62 -5
  12. package/resources/v1/addons/entitlements.d.mts.map +1 -1
  13. package/resources/v1/addons/entitlements.d.ts +62 -5
  14. package/resources/v1/addons/entitlements.d.ts.map +1 -1
  15. package/resources/v1/addons/entitlements.js +49 -8
  16. package/resources/v1/addons/entitlements.js.map +1 -1
  17. package/resources/v1/addons/entitlements.mjs +49 -8
  18. package/resources/v1/addons/entitlements.mjs.map +1 -1
  19. package/resources/v1/addons/index.d.mts +2 -2
  20. package/resources/v1/addons/index.d.mts.map +1 -1
  21. package/resources/v1/addons/index.d.ts +2 -2
  22. package/resources/v1/addons/index.d.ts.map +1 -1
  23. package/resources/v1/addons/index.js.map +1 -1
  24. package/resources/v1/addons/index.mjs.map +1 -1
  25. package/resources/v1/coupons.d.mts +80 -20
  26. package/resources/v1/coupons.d.mts.map +1 -1
  27. package/resources/v1/coupons.d.ts +80 -20
  28. package/resources/v1/coupons.d.ts.map +1 -1
  29. package/resources/v1/coupons.js +60 -9
  30. package/resources/v1/coupons.js.map +1 -1
  31. package/resources/v1/coupons.mjs +60 -9
  32. package/resources/v1/coupons.mjs.map +1 -1
  33. package/resources/v1/credits/credits.d.mts +59 -26
  34. package/resources/v1/credits/credits.d.mts.map +1 -1
  35. package/resources/v1/credits/credits.d.ts +59 -26
  36. package/resources/v1/credits/credits.d.ts.map +1 -1
  37. package/resources/v1/credits/credits.js +36 -5
  38. package/resources/v1/credits/credits.js.map +1 -1
  39. package/resources/v1/credits/credits.mjs +36 -5
  40. package/resources/v1/credits/credits.mjs.map +1 -1
  41. package/resources/v1/credits/custom-currencies.d.mts +96 -23
  42. package/resources/v1/credits/custom-currencies.d.mts.map +1 -1
  43. package/resources/v1/credits/custom-currencies.d.ts +96 -23
  44. package/resources/v1/credits/custom-currencies.d.ts.map +1 -1
  45. package/resources/v1/credits/custom-currencies.js +76 -12
  46. package/resources/v1/credits/custom-currencies.js.map +1 -1
  47. package/resources/v1/credits/custom-currencies.mjs +76 -12
  48. package/resources/v1/credits/custom-currencies.mjs.map +1 -1
  49. package/resources/v1/credits/grants.d.mts +60 -23
  50. package/resources/v1/credits/grants.d.mts.map +1 -1
  51. package/resources/v1/credits/grants.d.ts +60 -23
  52. package/resources/v1/credits/grants.d.ts.map +1 -1
  53. package/resources/v1/credits/grants.js +35 -5
  54. package/resources/v1/credits/grants.js.map +1 -1
  55. package/resources/v1/credits/grants.mjs +35 -5
  56. package/resources/v1/credits/grants.mjs.map +1 -1
  57. package/resources/v1/credits/index.d.mts +2 -2
  58. package/resources/v1/credits/index.d.mts.map +1 -1
  59. package/resources/v1/credits/index.d.ts +2 -2
  60. package/resources/v1/credits/index.d.ts.map +1 -1
  61. package/resources/v1/credits/index.js.map +1 -1
  62. package/resources/v1/credits/index.mjs.map +1 -1
  63. package/resources/v1/customers/customers.d.mts +165 -48
  64. package/resources/v1/customers/customers.d.mts.map +1 -1
  65. package/resources/v1/customers/customers.d.ts +165 -48
  66. package/resources/v1/customers/customers.d.ts.map +1 -1
  67. package/resources/v1/customers/customers.js +124 -19
  68. package/resources/v1/customers/customers.js.map +1 -1
  69. package/resources/v1/customers/customers.mjs +124 -19
  70. package/resources/v1/customers/customers.mjs.map +1 -1
  71. package/resources/v1/customers/index.d.mts +2 -2
  72. package/resources/v1/customers/index.d.mts.map +1 -1
  73. package/resources/v1/customers/index.d.ts +2 -2
  74. package/resources/v1/customers/index.d.ts.map +1 -1
  75. package/resources/v1/customers/index.js.map +1 -1
  76. package/resources/v1/customers/index.mjs +1 -1
  77. package/resources/v1/customers/index.mjs.map +1 -1
  78. package/resources/v1/customers/integrations.d.mts +64 -9
  79. package/resources/v1/customers/integrations.d.mts.map +1 -1
  80. package/resources/v1/customers/integrations.d.ts +64 -9
  81. package/resources/v1/customers/integrations.d.ts.map +1 -1
  82. package/resources/v1/customers/integrations.js +57 -9
  83. package/resources/v1/customers/integrations.js.map +1 -1
  84. package/resources/v1/customers/integrations.mjs +57 -9
  85. package/resources/v1/customers/integrations.mjs.map +1 -1
  86. package/resources/v1/customers/payment-method.d.mts +31 -7
  87. package/resources/v1/customers/payment-method.d.mts.map +1 -1
  88. package/resources/v1/customers/payment-method.d.ts +31 -7
  89. package/resources/v1/customers/payment-method.d.ts.map +1 -1
  90. package/resources/v1/customers/payment-method.js +26 -4
  91. package/resources/v1/customers/payment-method.js.map +1 -1
  92. package/resources/v1/customers/payment-method.mjs +26 -4
  93. package/resources/v1/customers/payment-method.mjs.map +1 -1
  94. package/resources/v1/customers/promotional-entitlements.d.mts +40 -7
  95. package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
  96. package/resources/v1/customers/promotional-entitlements.d.ts +40 -7
  97. package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
  98. package/resources/v1/customers/promotional-entitlements.js +38 -6
  99. package/resources/v1/customers/promotional-entitlements.js.map +1 -1
  100. package/resources/v1/customers/promotional-entitlements.mjs +38 -6
  101. package/resources/v1/customers/promotional-entitlements.mjs.map +1 -1
  102. package/resources/v1/events/beta/customers/assignments.d.mts +27 -5
  103. package/resources/v1/events/beta/customers/assignments.d.mts.map +1 -1
  104. package/resources/v1/events/beta/customers/assignments.d.ts +27 -5
  105. package/resources/v1/events/beta/customers/assignments.d.ts.map +1 -1
  106. package/resources/v1/events/beta/customers/assignments.js +27 -4
  107. package/resources/v1/events/beta/customers/assignments.js.map +1 -1
  108. package/resources/v1/events/beta/customers/assignments.mjs +27 -4
  109. package/resources/v1/events/beta/customers/assignments.mjs.map +1 -1
  110. package/resources/v1/events/beta/customers/entities.d.mts +66 -10
  111. package/resources/v1/events/beta/customers/entities.d.mts.map +1 -1
  112. package/resources/v1/events/beta/customers/entities.d.ts +66 -10
  113. package/resources/v1/events/beta/customers/entities.d.ts.map +1 -1
  114. package/resources/v1/events/beta/customers/entities.js +64 -10
  115. package/resources/v1/events/beta/customers/entities.js.map +1 -1
  116. package/resources/v1/events/beta/customers/entities.mjs +64 -10
  117. package/resources/v1/events/beta/customers/entities.mjs.map +1 -1
  118. package/resources/v1/events/beta/customers/entitlements.d.mts +23 -10
  119. package/resources/v1/events/beta/customers/entitlements.d.mts.map +1 -1
  120. package/resources/v1/events/beta/customers/entitlements.d.ts +23 -10
  121. package/resources/v1/events/beta/customers/entitlements.d.ts.map +1 -1
  122. package/resources/v1/events/beta/customers/entitlements.js +14 -2
  123. package/resources/v1/events/beta/customers/entitlements.js.map +1 -1
  124. package/resources/v1/events/beta/customers/entitlements.mjs +14 -2
  125. package/resources/v1/events/beta/customers/entitlements.mjs.map +1 -1
  126. package/resources/v1/events/beta/entity-types.d.mts +25 -3
  127. package/resources/v1/events/beta/entity-types.d.mts.map +1 -1
  128. package/resources/v1/events/beta/entity-types.d.ts +25 -3
  129. package/resources/v1/events/beta/entity-types.d.ts.map +1 -1
  130. package/resources/v1/events/beta/entity-types.js +23 -3
  131. package/resources/v1/events/beta/entity-types.js.map +1 -1
  132. package/resources/v1/events/beta/entity-types.mjs +23 -3
  133. package/resources/v1/events/beta/entity-types.mjs.map +1 -1
  134. package/resources/v1/events/events.d.mts +13 -2
  135. package/resources/v1/events/events.d.mts.map +1 -1
  136. package/resources/v1/events/events.d.ts +13 -2
  137. package/resources/v1/events/events.d.ts.map +1 -1
  138. package/resources/v1/events/events.js +14 -2
  139. package/resources/v1/events/events.js.map +1 -1
  140. package/resources/v1/events/events.mjs +14 -2
  141. package/resources/v1/events/events.mjs.map +1 -1
  142. package/resources/v1/features.d.mts +108 -30
  143. package/resources/v1/features.d.mts.map +1 -1
  144. package/resources/v1/features.d.ts +108 -30
  145. package/resources/v1/features.d.ts.map +1 -1
  146. package/resources/v1/features.js +72 -11
  147. package/resources/v1/features.js.map +1 -1
  148. package/resources/v1/features.mjs +72 -11
  149. package/resources/v1/features.mjs.map +1 -1
  150. package/resources/v1/index.d.mts +7 -7
  151. package/resources/v1/index.d.mts.map +1 -1
  152. package/resources/v1/index.d.ts +7 -7
  153. package/resources/v1/index.d.ts.map +1 -1
  154. package/resources/v1/index.js.map +1 -1
  155. package/resources/v1/index.mjs.map +1 -1
  156. package/resources/v1/plans/entitlements.d.mts +62 -5
  157. package/resources/v1/plans/entitlements.d.mts.map +1 -1
  158. package/resources/v1/plans/entitlements.d.ts +62 -5
  159. package/resources/v1/plans/entitlements.d.ts.map +1 -1
  160. package/resources/v1/plans/entitlements.js +49 -8
  161. package/resources/v1/plans/entitlements.js.map +1 -1
  162. package/resources/v1/plans/entitlements.mjs +49 -8
  163. package/resources/v1/plans/entitlements.mjs.map +1 -1
  164. package/resources/v1/plans/index.d.mts +2 -2
  165. package/resources/v1/plans/index.d.mts.map +1 -1
  166. package/resources/v1/plans/index.d.ts +2 -2
  167. package/resources/v1/plans/index.d.ts.map +1 -1
  168. package/resources/v1/plans/index.js.map +1 -1
  169. package/resources/v1/plans/index.mjs.map +1 -1
  170. package/resources/v1/plans/plans.d.mts +156 -34
  171. package/resources/v1/plans/plans.d.mts.map +1 -1
  172. package/resources/v1/plans/plans.d.ts +156 -34
  173. package/resources/v1/plans/plans.d.ts.map +1 -1
  174. package/resources/v1/plans/plans.js +127 -20
  175. package/resources/v1/plans/plans.js.map +1 -1
  176. package/resources/v1/plans/plans.mjs +127 -20
  177. package/resources/v1/plans/plans.mjs.map +1 -1
  178. package/resources/v1/products.d.mts +97 -23
  179. package/resources/v1/products.d.mts.map +1 -1
  180. package/resources/v1/products.d.ts +97 -23
  181. package/resources/v1/products.d.ts.map +1 -1
  182. package/resources/v1/products.js +73 -11
  183. package/resources/v1/products.js.map +1 -1
  184. package/resources/v1/products.mjs +73 -11
  185. package/resources/v1/products.mjs.map +1 -1
  186. package/resources/v1/subscriptions/future-update.d.mts +29 -3
  187. package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
  188. package/resources/v1/subscriptions/future-update.d.ts +29 -3
  189. package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
  190. package/resources/v1/subscriptions/future-update.js +25 -4
  191. package/resources/v1/subscriptions/future-update.js.map +1 -1
  192. package/resources/v1/subscriptions/future-update.mjs +25 -4
  193. package/resources/v1/subscriptions/future-update.mjs.map +1 -1
  194. package/resources/v1/subscriptions/index.d.mts +4 -4
  195. package/resources/v1/subscriptions/index.d.mts.map +1 -1
  196. package/resources/v1/subscriptions/index.d.ts +4 -4
  197. package/resources/v1/subscriptions/index.d.ts.map +1 -1
  198. package/resources/v1/subscriptions/index.js.map +1 -1
  199. package/resources/v1/subscriptions/index.mjs +1 -1
  200. package/resources/v1/subscriptions/index.mjs.map +1 -1
  201. package/resources/v1/subscriptions/invoice.d.mts +15 -2
  202. package/resources/v1/subscriptions/invoice.d.mts.map +1 -1
  203. package/resources/v1/subscriptions/invoice.d.ts +15 -2
  204. package/resources/v1/subscriptions/invoice.d.ts.map +1 -1
  205. package/resources/v1/subscriptions/invoice.js +13 -2
  206. package/resources/v1/subscriptions/invoice.js.map +1 -1
  207. package/resources/v1/subscriptions/invoice.mjs +13 -2
  208. package/resources/v1/subscriptions/invoice.mjs.map +1 -1
  209. package/resources/v1/subscriptions/subscriptions.d.mts +242 -78
  210. package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
  211. package/resources/v1/subscriptions/subscriptions.d.ts +242 -78
  212. package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
  213. package/resources/v1/subscriptions/subscriptions.js +126 -19
  214. package/resources/v1/subscriptions/subscriptions.js.map +1 -1
  215. package/resources/v1/subscriptions/subscriptions.mjs +128 -21
  216. package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
  217. package/resources/v1/subscriptions/usage.d.mts +29 -4
  218. package/resources/v1/subscriptions/usage.d.mts.map +1 -1
  219. package/resources/v1/subscriptions/usage.d.ts +29 -4
  220. package/resources/v1/subscriptions/usage.d.ts.map +1 -1
  221. package/resources/v1/subscriptions/usage.js +26 -4
  222. package/resources/v1/subscriptions/usage.js.map +1 -1
  223. package/resources/v1/subscriptions/usage.mjs +26 -4
  224. package/resources/v1/subscriptions/usage.mjs.map +1 -1
  225. package/resources/v1/usage.d.mts +24 -2
  226. package/resources/v1/usage.d.mts.map +1 -1
  227. package/resources/v1/usage.d.ts +24 -2
  228. package/resources/v1/usage.d.ts.map +1 -1
  229. package/resources/v1/usage.js +26 -4
  230. package/resources/v1/usage.js.map +1 -1
  231. package/resources/v1/usage.mjs +26 -4
  232. package/resources/v1/usage.mjs.map +1 -1
  233. package/resources/v1/v1.d.mts +14 -14
  234. package/resources/v1/v1.d.mts.map +1 -1
  235. package/resources/v1/v1.d.ts +14 -14
  236. package/resources/v1/v1.d.ts.map +1 -1
  237. package/resources/v1/v1.js.map +1 -1
  238. package/resources/v1/v1.mjs.map +1 -1
  239. package/src/resources/v1/addons/addons.ts +286 -39
  240. package/src/resources/v1/addons/entitlements.ts +123 -10
  241. package/src/resources/v1/addons/index.ts +5 -0
  242. package/src/resources/v1/coupons.ts +154 -23
  243. package/src/resources/v1/credits/credits.ts +102 -24
  244. package/src/resources/v1/credits/custom-currencies.ts +188 -30
  245. package/src/resources/v1/credits/grants.ts +102 -24
  246. package/src/resources/v1/credits/index.ts +4 -0
  247. package/src/resources/v1/customers/customers.ts +318 -57
  248. package/src/resources/v1/customers/index.ts +8 -1
  249. package/src/resources/v1/customers/integrations.ts +129 -16
  250. package/src/resources/v1/customers/payment-method.ts +66 -9
  251. package/src/resources/v1/customers/promotional-entitlements.ts +82 -11
  252. package/src/resources/v1/events/beta/customers/assignments.ts +56 -7
  253. package/src/resources/v1/events/beta/customers/entities.ts +136 -16
  254. package/src/resources/v1/events/beta/customers/entitlements.ts +38 -11
  255. package/src/resources/v1/events/beta/entity-types.ts +51 -5
  256. package/src/resources/v1/events/events.ts +28 -3
  257. package/src/resources/v1/features.ts +204 -34
  258. package/src/resources/v1/index.ts +19 -0
  259. package/src/resources/v1/plans/entitlements.ts +123 -10
  260. package/src/resources/v1/plans/index.ts +5 -0
  261. package/src/resources/v1/plans/plans.ts +314 -43
  262. package/src/resources/v1/products.ts +189 -27
  263. package/src/resources/v1/subscriptions/future-update.ts +68 -5
  264. package/src/resources/v1/subscriptions/index.ts +9 -2
  265. package/src/resources/v1/subscriptions/invoice.ts +36 -3
  266. package/src/resources/v1/subscriptions/subscriptions.ts +410 -85
  267. package/src/resources/v1/subscriptions/usage.ts +61 -5
  268. package/src/resources/v1/usage.ts +53 -5
  269. package/src/resources/v1/v1.ts +38 -0
  270. package/src/version.ts +1 -1
  271. package/version.d.mts +1 -1
  272. package/version.d.ts +1 -1
  273. package/version.js +1 -1
  274. package/version.mjs +1 -1
@@ -2,13 +2,25 @@
2
2
 
3
3
  import { APIResource } from '../../../core/resource';
4
4
  import * as FutureUpdateAPI from './future-update';
5
- import { CancelSubscription, FutureUpdate as FutureUpdateAPIFutureUpdate } from './future-update';
5
+ import {
6
+ CancelSubscription,
7
+ FutureUpdate as FutureUpdateAPIFutureUpdate,
8
+ FutureUpdateCancelPendingPaymentParams,
9
+ FutureUpdateCancelScheduleParams,
10
+ } from './future-update';
6
11
  import * as InvoiceAPI from './invoice';
7
- import { Invoice, InvoiceMarkAsPaidResponse } from './invoice';
12
+ import { Invoice, InvoiceMarkAsPaidParams, InvoiceMarkAsPaidResponse } from './invoice';
8
13
  import * as UsageAPI from './usage';
9
- import { Usage, UsageChargeUsageParams, UsageChargeUsageResponse, UsageSyncResponse } from './usage';
14
+ import {
15
+ Usage,
16
+ UsageChargeUsageParams,
17
+ UsageChargeUsageResponse,
18
+ UsageSyncParams,
19
+ UsageSyncResponse,
20
+ } from './usage';
10
21
  import { APIPromise } from '../../../core/api-promise';
11
22
  import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../../core/pagination';
23
+ import { buildHeaders } from '../../../internal/headers';
12
24
  import { RequestOptions } from '../../../internal/request-options';
13
25
  import { path } from '../../../internal/utils/path';
14
26
 
@@ -28,8 +40,22 @@ export class Subscriptions extends APIResource {
28
40
  * );
29
41
  * ```
30
42
  */
31
- retrieve(id: string, options?: RequestOptions): APIPromise<Subscription> {
32
- return this._client.get(path`/api/v1/subscriptions/${id}`, options);
43
+ retrieve(
44
+ id: string,
45
+ params: SubscriptionRetrieveParams | null | undefined = {},
46
+ options?: RequestOptions,
47
+ ): APIPromise<Subscription> {
48
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
49
+ return this._client.get(path`/api/v1/subscriptions/${id}`, {
50
+ ...options,
51
+ headers: buildHeaders([
52
+ {
53
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
54
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
55
+ },
56
+ options?.headers,
57
+ ]),
58
+ });
33
59
  }
34
60
 
35
61
  /**
@@ -43,8 +69,19 @@ export class Subscriptions extends APIResource {
43
69
  * );
44
70
  * ```
45
71
  */
46
- update(id: string, body: SubscriptionUpdateParams, options?: RequestOptions): APIPromise<Subscription> {
47
- return this._client.patch(path`/api/v1/subscriptions/${id}`, { body, ...options });
72
+ update(id: string, params: SubscriptionUpdateParams, options?: RequestOptions): APIPromise<Subscription> {
73
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
74
+ return this._client.patch(path`/api/v1/subscriptions/${id}`, {
75
+ body,
76
+ ...options,
77
+ headers: buildHeaders([
78
+ {
79
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
80
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
81
+ },
82
+ options?.headers,
83
+ ]),
84
+ });
48
85
  }
49
86
 
50
87
  /**
@@ -60,12 +97,20 @@ export class Subscriptions extends APIResource {
60
97
  * ```
61
98
  */
62
99
  list(
63
- query: SubscriptionListParams | null | undefined = {},
100
+ params: SubscriptionListParams | null | undefined = {},
64
101
  options?: RequestOptions,
65
102
  ): PagePromise<SubscriptionListResponsesMyCursorIDPage, SubscriptionListResponse> {
103
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
66
104
  return this._client.getAPIList('/api/v1/subscriptions', MyCursorIDPage<SubscriptionListResponse>, {
67
105
  query,
68
106
  ...options,
107
+ headers: buildHeaders([
108
+ {
109
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
110
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
111
+ },
112
+ options?.headers,
113
+ ]),
69
114
  });
70
115
  }
71
116
 
@@ -80,8 +125,19 @@ export class Subscriptions extends APIResource {
80
125
  * );
81
126
  * ```
82
127
  */
83
- cancel(id: string, body: SubscriptionCancelParams, options?: RequestOptions): APIPromise<Subscription> {
84
- return this._client.post(path`/api/v1/subscriptions/${id}/cancel`, { body, ...options });
128
+ cancel(id: string, params: SubscriptionCancelParams, options?: RequestOptions): APIPromise<Subscription> {
129
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
130
+ return this._client.post(path`/api/v1/subscriptions/${id}/cancel`, {
131
+ body,
132
+ ...options,
133
+ headers: buildHeaders([
134
+ {
135
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
136
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
137
+ },
138
+ options?.headers,
139
+ ]),
140
+ });
85
141
  }
86
142
 
87
143
  /**
@@ -96,8 +152,23 @@ export class Subscriptions extends APIResource {
96
152
  * );
97
153
  * ```
98
154
  */
99
- delegate(id: string, body: SubscriptionDelegateParams, options?: RequestOptions): APIPromise<Subscription> {
100
- return this._client.post(path`/api/v1/subscriptions/${id}/delegate`, { body, ...options });
155
+ delegate(
156
+ id: string,
157
+ params: SubscriptionDelegateParams,
158
+ options?: RequestOptions,
159
+ ): APIPromise<Subscription> {
160
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
161
+ return this._client.post(path`/api/v1/subscriptions/${id}/delegate`, {
162
+ body,
163
+ ...options,
164
+ headers: buildHeaders([
165
+ {
166
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
167
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
168
+ },
169
+ options?.headers,
170
+ ]),
171
+ });
101
172
  }
102
173
 
103
174
  /**
@@ -117,8 +188,19 @@ export class Subscriptions extends APIResource {
117
188
  * });
118
189
  * ```
119
190
  */
120
- import(body: SubscriptionImportParams, options?: RequestOptions): APIPromise<SubscriptionImportResponse> {
121
- return this._client.post('/api/v1/subscriptions/import', { body, ...options });
191
+ import(params: SubscriptionImportParams, options?: RequestOptions): APIPromise<SubscriptionImportResponse> {
192
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
193
+ return this._client.post('/api/v1/subscriptions/import', {
194
+ body,
195
+ ...options,
196
+ headers: buildHeaders([
197
+ {
198
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
199
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
200
+ },
201
+ options?.headers,
202
+ ]),
203
+ });
122
204
  }
123
205
 
124
206
  /**
@@ -132,8 +214,19 @@ export class Subscriptions extends APIResource {
132
214
  * );
133
215
  * ```
134
216
  */
135
- migrate(id: string, body: SubscriptionMigrateParams, options?: RequestOptions): APIPromise<Subscription> {
136
- return this._client.post(path`/api/v1/subscriptions/${id}/migrate`, { body, ...options });
217
+ migrate(id: string, params: SubscriptionMigrateParams, options?: RequestOptions): APIPromise<Subscription> {
218
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
219
+ return this._client.post(path`/api/v1/subscriptions/${id}/migrate`, {
220
+ body,
221
+ ...options,
222
+ headers: buildHeaders([
223
+ {
224
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
225
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
226
+ },
227
+ options?.headers,
228
+ ]),
229
+ });
137
230
  }
138
231
 
139
232
  /**
@@ -149,10 +242,21 @@ export class Subscriptions extends APIResource {
149
242
  * ```
150
243
  */
151
244
  preview(
152
- body: SubscriptionPreviewParams,
245
+ params: SubscriptionPreviewParams,
153
246
  options?: RequestOptions,
154
247
  ): APIPromise<SubscriptionPreviewResponse> {
155
- return this._client.post('/api/v1/subscriptions/preview', { body, ...options });
248
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
249
+ return this._client.post('/api/v1/subscriptions/preview', {
250
+ body,
251
+ ...options,
252
+ headers: buildHeaders([
253
+ {
254
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
255
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
256
+ },
257
+ options?.headers,
258
+ ]),
259
+ });
156
260
  }
157
261
 
158
262
  /**
@@ -168,10 +272,21 @@ export class Subscriptions extends APIResource {
168
272
  * ```
169
273
  */
170
274
  provision(
171
- body: SubscriptionProvisionParams,
275
+ params: SubscriptionProvisionParams,
172
276
  options?: RequestOptions,
173
277
  ): APIPromise<SubscriptionProvisionResponse> {
174
- return this._client.post('/api/v1/subscriptions', { body, ...options });
278
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
279
+ return this._client.post('/api/v1/subscriptions', {
280
+ body,
281
+ ...options,
282
+ headers: buildHeaders([
283
+ {
284
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
285
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
286
+ },
287
+ options?.headers,
288
+ ]),
289
+ });
175
290
  }
176
291
 
177
292
  /**
@@ -186,8 +301,23 @@ export class Subscriptions extends APIResource {
186
301
  * );
187
302
  * ```
188
303
  */
189
- transfer(id: string, body: SubscriptionTransferParams, options?: RequestOptions): APIPromise<Subscription> {
190
- return this._client.post(path`/api/v1/subscriptions/${id}/transfer`, { body, ...options });
304
+ transfer(
305
+ id: string,
306
+ params: SubscriptionTransferParams,
307
+ options?: RequestOptions,
308
+ ): APIPromise<Subscription> {
309
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
310
+ return this._client.post(path`/api/v1/subscriptions/${id}/transfer`, {
311
+ body,
312
+ ...options,
313
+ headers: buildHeaders([
314
+ {
315
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
316
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
317
+ },
318
+ options?.headers,
319
+ ]),
320
+ });
191
321
  }
192
322
  }
193
323
 
@@ -3964,56 +4094,114 @@ export namespace SubscriptionProvisionResponse {
3964
4094
  }
3965
4095
  }
3966
4096
 
4097
+ export interface SubscriptionRetrieveParams {
4098
+ /**
4099
+ * Account ID — optional when authenticating with a user JWT (Bearer token); falls
4100
+ * back to the user's first membership. Ignored for API-key auth.
4101
+ */
4102
+ 'X-ACCOUNT-ID'?: string;
4103
+
4104
+ /**
4105
+ * Environment ID — required when authenticating with a user JWT (Bearer token) on
4106
+ * environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
4107
+ * key).
4108
+ */
4109
+ 'X-ENVIRONMENT-ID'?: string;
4110
+ }
4111
+
3967
4112
  export interface SubscriptionUpdateParams {
4113
+ /**
4114
+ * Body param
4115
+ */
3968
4116
  addons?: Array<SubscriptionUpdateParams.Addon>;
3969
4117
 
4118
+ /**
4119
+ * Body param
4120
+ */
3970
4121
  appliedCoupon?: SubscriptionUpdateParams.AppliedCoupon;
3971
4122
 
3972
4123
  /**
3973
- * Await payment confirmation
4124
+ * Body param: Await payment confirmation
3974
4125
  */
3975
4126
  awaitPaymentConfirmation?: boolean;
3976
4127
 
4128
+ /**
4129
+ * Body param
4130
+ */
3977
4131
  billingCycleAnchor?: 'UNCHANGED' | 'NOW';
3978
4132
 
4133
+ /**
4134
+ * Body param
4135
+ */
3979
4136
  billingInformation?: SubscriptionUpdateParams.BillingInformation;
3980
4137
 
4138
+ /**
4139
+ * Body param
4140
+ */
3981
4141
  billingPeriod?: 'MONTHLY' | 'ANNUALLY';
3982
4142
 
4143
+ /**
4144
+ * Body param
4145
+ */
3983
4146
  budget?: SubscriptionUpdateParams.Budget | null;
3984
4147
 
3985
4148
  /**
3986
- * Subscription cancellation date
4149
+ * Body param: Subscription cancellation date
3987
4150
  */
3988
4151
  cancellationDate?: string | null;
3989
4152
 
4153
+ /**
4154
+ * Body param
4155
+ */
3990
4156
  charges?: Array<SubscriptionUpdateParams.Charge>;
3991
4157
 
4158
+ /**
4159
+ * Body param
4160
+ */
3992
4161
  entitlements?: Array<SubscriptionUpdateParams.Feature | SubscriptionUpdateParams.Credit>;
3993
4162
 
3994
4163
  /**
3995
- * Additional metadata for the subscription
4164
+ * Body param: Additional metadata for the subscription
3996
4165
  */
3997
4166
  metadata?: { [key: string]: string };
3998
4167
 
3999
4168
  /**
4000
- * Minimum spend amount
4169
+ * Body param: Minimum spend amount
4001
4170
  */
4002
4171
  minimumSpend?: SubscriptionUpdateParams.MinimumSpend | null;
4003
4172
 
4173
+ /**
4174
+ * Body param
4175
+ */
4004
4176
  priceOverrides?: Array<SubscriptionUpdateParams.PriceOverride>;
4005
4177
 
4006
4178
  /**
4007
- * Promotion code
4179
+ * Body param: Promotion code
4008
4180
  */
4009
4181
  promotionCode?: string;
4010
4182
 
4183
+ /**
4184
+ * Body param
4185
+ */
4011
4186
  scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE';
4012
4187
 
4013
4188
  /**
4014
- * Subscription trial end date
4189
+ * Body param: Subscription trial end date
4015
4190
  */
4016
4191
  trialEndDate?: string;
4192
+
4193
+ /**
4194
+ * Header param: Account ID — optional when authenticating with a user JWT (Bearer
4195
+ * token); falls back to the user's first membership. Ignored for API-key auth.
4196
+ */
4197
+ 'X-ACCOUNT-ID'?: string;
4198
+
4199
+ /**
4200
+ * Header param: Environment ID — required when authenticating with a user JWT
4201
+ * (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
4202
+ * intrinsic to the key).
4203
+ */
4204
+ 'X-ENVIRONMENT-ID'?: string;
4017
4205
  }
4018
4206
 
4019
4207
  export namespace SubscriptionUpdateParams {
@@ -4696,35 +4884,49 @@ export namespace SubscriptionUpdateParams {
4696
4884
 
4697
4885
  export interface SubscriptionListParams extends MyCursorIDPageParams {
4698
4886
  /**
4699
- * Filter by creation date using range operators: gt, gte, lt, lte
4887
+ * Query param: Filter by creation date using range operators: gt, gte, lt, lte
4700
4888
  */
4701
4889
  createdAt?: SubscriptionListParams.CreatedAt;
4702
4890
 
4703
4891
  /**
4704
- * Filter by customer ID
4892
+ * Query param: Filter by customer ID
4705
4893
  */
4706
4894
  customerId?: string;
4707
4895
 
4708
4896
  /**
4709
- * Filter by plan ID
4897
+ * Query param: Filter by plan ID
4710
4898
  */
4711
4899
  planId?: string;
4712
4900
 
4713
4901
  /**
4714
- * Filter by pricing type. Supports comma-separated values for multiple types
4902
+ * Query param: Filter by pricing type. Supports comma-separated values for
4903
+ * multiple types
4715
4904
  */
4716
4905
  pricingType?: Array<'FREE' | 'PAID' | 'CUSTOM'>;
4717
4906
 
4718
4907
  /**
4719
- * Filter by resource ID
4908
+ * Query param: Filter by resource ID
4720
4909
  */
4721
4910
  resourceId?: string;
4722
4911
 
4723
4912
  /**
4724
- * Filter by subscription status. Supports comma-separated values for multiple
4725
- * statuses
4913
+ * Query param: Filter by subscription status. Supports comma-separated values for
4914
+ * multiple statuses
4726
4915
  */
4727
4916
  status?: Array<'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED'>;
4917
+
4918
+ /**
4919
+ * Header param: Account ID — optional when authenticating with a user JWT (Bearer
4920
+ * token); falls back to the user's first membership. Ignored for API-key auth.
4921
+ */
4922
+ 'X-ACCOUNT-ID'?: string;
4923
+
4924
+ /**
4925
+ * Header param: Environment ID — required when authenticating with a user JWT
4926
+ * (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
4927
+ * intrinsic to the key).
4928
+ */
4929
+ 'X-ENVIRONMENT-ID'?: string;
4728
4930
  }
4729
4931
 
4730
4932
  export namespace SubscriptionListParams {
@@ -4756,45 +4958,86 @@ export namespace SubscriptionListParams {
4756
4958
 
4757
4959
  export interface SubscriptionCancelParams {
4758
4960
  /**
4759
- * Action on cancellation (downgrade or revoke)
4961
+ * Body param: Action on cancellation (downgrade or revoke)
4760
4962
  */
4761
4963
  cancellationAction?: 'DEFAULT' | 'REVOKE_ENTITLEMENTS';
4762
4964
 
4763
4965
  /**
4764
- * When to cancel (immediate, period end, or date)
4966
+ * Body param: When to cancel (immediate, period end, or date)
4765
4967
  */
4766
4968
  cancellationTime?: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE';
4767
4969
 
4768
4970
  /**
4769
- * Subscription end date
4971
+ * Body param: Subscription end date
4770
4972
  */
4771
4973
  endDate?: string;
4772
4974
 
4773
4975
  /**
4774
- * If set, enables or disables prorating of credits on subscription cancellation.
4976
+ * Body param: If set, enables or disables prorating of credits on subscription
4977
+ * cancellation.
4775
4978
  */
4776
4979
  prorate?: boolean;
4980
+
4981
+ /**
4982
+ * Header param: Account ID — optional when authenticating with a user JWT (Bearer
4983
+ * token); falls back to the user's first membership. Ignored for API-key auth.
4984
+ */
4985
+ 'X-ACCOUNT-ID'?: string;
4986
+
4987
+ /**
4988
+ * Header param: Environment ID — required when authenticating with a user JWT
4989
+ * (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
4990
+ * intrinsic to the key).
4991
+ */
4992
+ 'X-ENVIRONMENT-ID'?: string;
4777
4993
  }
4778
4994
 
4779
4995
  export interface SubscriptionDelegateParams {
4780
4996
  /**
4781
- * The unique identifier of the customer who will assume payment responsibility for
4782
- * this subscription. This customer must already exist in your Stigg account and
4783
- * have a valid payment method if the subscription requires payment.
4997
+ * Body param: The unique identifier of the customer who will assume payment
4998
+ * responsibility for this subscription. This customer must already exist in your
4999
+ * Stigg account and have a valid payment method if the subscription requires
5000
+ * payment.
4784
5001
  */
4785
5002
  targetCustomerId: string;
5003
+
5004
+ /**
5005
+ * Header param: Account ID — optional when authenticating with a user JWT (Bearer
5006
+ * token); falls back to the user's first membership. Ignored for API-key auth.
5007
+ */
5008
+ 'X-ACCOUNT-ID'?: string;
5009
+
5010
+ /**
5011
+ * Header param: Environment ID — required when authenticating with a user JWT
5012
+ * (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
5013
+ * intrinsic to the key).
5014
+ */
5015
+ 'X-ENVIRONMENT-ID'?: string;
4786
5016
  }
4787
5017
 
4788
5018
  export interface SubscriptionImportParams {
4789
5019
  /**
4790
- * List of subscription objects to import
5020
+ * Body param: List of subscription objects to import
4791
5021
  */
4792
5022
  subscriptions: Array<SubscriptionImportParams.Subscription>;
4793
5023
 
4794
5024
  /**
4795
- * Integration ID to use for importing subscriptions
5025
+ * Body param: Integration ID to use for importing subscriptions
4796
5026
  */
4797
5027
  integrationId?: string | null;
5028
+
5029
+ /**
5030
+ * Header param: Account ID — optional when authenticating with a user JWT (Bearer
5031
+ * token); falls back to the user's first membership. Ignored for API-key auth.
5032
+ */
5033
+ 'X-ACCOUNT-ID'?: string;
5034
+
5035
+ /**
5036
+ * Header param: Environment ID — required when authenticating with a user JWT
5037
+ * (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
5038
+ * intrinsic to the key).
5039
+ */
5040
+ 'X-ENVIRONMENT-ID'?: string;
4798
5041
  }
4799
5042
 
4800
5043
  export namespace SubscriptionImportParams {
@@ -4890,91 +5133,117 @@ export namespace SubscriptionImportParams {
4890
5133
 
4891
5134
  export interface SubscriptionMigrateParams {
4892
5135
  /**
4893
- * When to migrate (immediate or period end)
5136
+ * Body param: When to migrate (immediate or period end)
4894
5137
  */
4895
5138
  subscriptionMigrationTime?: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE';
5139
+
5140
+ /**
5141
+ * Header param: Account ID — optional when authenticating with a user JWT (Bearer
5142
+ * token); falls back to the user's first membership. Ignored for API-key auth.
5143
+ */
5144
+ 'X-ACCOUNT-ID'?: string;
5145
+
5146
+ /**
5147
+ * Header param: Environment ID — required when authenticating with a user JWT
5148
+ * (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
5149
+ * intrinsic to the key).
5150
+ */
5151
+ 'X-ENVIRONMENT-ID'?: string;
4896
5152
  }
4897
5153
 
4898
5154
  export interface SubscriptionPreviewParams {
4899
5155
  /**
4900
- * Customer ID
5156
+ * Body param: Customer ID
4901
5157
  */
4902
5158
  customerId: string;
4903
5159
 
4904
5160
  /**
4905
- * Plan ID
5161
+ * Body param: Plan ID
4906
5162
  */
4907
5163
  planId: string;
4908
5164
 
4909
5165
  /**
4910
- * Addons to include
5166
+ * Body param: Addons to include
4911
5167
  */
4912
5168
  addons?: Array<SubscriptionPreviewParams.Addon>;
4913
5169
 
4914
5170
  /**
4915
- * Coupon or discount to apply
5171
+ * Body param: Coupon or discount to apply
4916
5172
  */
4917
5173
  appliedCoupon?: SubscriptionPreviewParams.AppliedCoupon;
4918
5174
 
4919
5175
  /**
4920
- * Billable features with quantities
5176
+ * Body param: Billable features with quantities
4921
5177
  */
4922
5178
  billableFeatures?: Array<SubscriptionPreviewParams.BillableFeature>;
4923
5179
 
4924
5180
  /**
4925
- * ISO 3166-1 country code for localization
5181
+ * Body param: ISO 3166-1 country code for localization
4926
5182
  */
4927
5183
  billingCountryCode?: string;
4928
5184
 
4929
5185
  /**
4930
- * Billing cycle anchor behavior for the subscription
5186
+ * Body param: Billing cycle anchor behavior for the subscription
4931
5187
  */
4932
5188
  billingCycleAnchor?: 'UNCHANGED' | 'NOW';
4933
5189
 
4934
5190
  /**
4935
- * Billing and tax configuration
5191
+ * Body param: Billing and tax configuration
4936
5192
  */
4937
5193
  billingInformation?: SubscriptionPreviewParams.BillingInformation;
4938
5194
 
4939
5195
  /**
4940
- * Billing period (MONTHLY or ANNUALLY)
5196
+ * Body param: Billing period (MONTHLY or ANNUALLY)
4941
5197
  */
4942
5198
  billingPeriod?: 'MONTHLY' | 'ANNUALLY';
4943
5199
 
4944
5200
  /**
4945
- * One-time or recurring charges
5201
+ * Body param: One-time or recurring charges
4946
5202
  */
4947
5203
  charges?: Array<SubscriptionPreviewParams.Charge>;
4948
5204
 
4949
5205
  /**
4950
- * Paying customer ID for delegated billing
5206
+ * Body param: Paying customer ID for delegated billing
4951
5207
  */
4952
5208
  payingCustomerId?: string;
4953
5209
 
4954
5210
  /**
4955
- * Resource ID for multi-instance subscriptions
5211
+ * Body param: Resource ID for multi-instance subscriptions
4956
5212
  */
4957
5213
  resourceId?: string;
4958
5214
 
4959
5215
  /**
4960
- * When to apply subscription changes
5216
+ * Body param: When to apply subscription changes
4961
5217
  */
4962
5218
  scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE';
4963
5219
 
4964
5220
  /**
4965
- * Subscription start date
5221
+ * Body param: Subscription start date
4966
5222
  */
4967
5223
  startDate?: string;
4968
5224
 
4969
5225
  /**
4970
- * Trial period override settings
5226
+ * Body param: Trial period override settings
4971
5227
  */
4972
5228
  trialOverrideConfiguration?: SubscriptionPreviewParams.TrialOverrideConfiguration;
4973
5229
 
4974
5230
  /**
4975
- * Unit quantity for per-unit pricing. Minimum is 0 (zero is allowed).
5231
+ * Body param: Unit quantity for per-unit pricing. Minimum is 0 (zero is allowed).
4976
5232
  */
4977
5233
  unitQuantity?: number;
5234
+
5235
+ /**
5236
+ * Header param: Account ID — optional when authenticating with a user JWT (Bearer
5237
+ * token); falls back to the user's first membership. Ignored for API-key auth.
5238
+ */
5239
+ 'X-ACCOUNT-ID'?: string;
5240
+
5241
+ /**
5242
+ * Header param: Environment ID — required when authenticating with a user JWT
5243
+ * (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
5244
+ * intrinsic to the key).
5245
+ */
5246
+ 'X-ENVIRONMENT-ID'?: string;
4978
5247
  }
4979
5248
 
4980
5249
  export namespace SubscriptionPreviewParams {
@@ -5348,121 +5617,153 @@ export namespace SubscriptionPreviewParams {
5348
5617
 
5349
5618
  export interface SubscriptionProvisionParams {
5350
5619
  /**
5351
- * Customer ID to provision the subscription for
5620
+ * Body param: Customer ID to provision the subscription for
5352
5621
  */
5353
5622
  customerId: string;
5354
5623
 
5355
5624
  /**
5356
- * Plan ID to provision
5625
+ * Body param: Plan ID to provision
5357
5626
  */
5358
5627
  planId: string;
5359
5628
 
5360
5629
  /**
5361
- * Unique identifier for the subscription
5630
+ * Body param: Unique identifier for the subscription
5362
5631
  */
5363
5632
  id?: string;
5364
5633
 
5634
+ /**
5635
+ * Body param
5636
+ */
5365
5637
  addons?: Array<SubscriptionProvisionParams.Addon>;
5366
5638
 
5367
5639
  /**
5368
- * Coupon configuration
5640
+ * Body param: Coupon configuration
5369
5641
  */
5370
5642
  appliedCoupon?: SubscriptionProvisionParams.AppliedCoupon;
5371
5643
 
5372
5644
  /**
5373
- * Whether to wait for payment confirmation before returning the subscription
5645
+ * Body param: Whether to wait for payment confirmation before returning the
5646
+ * subscription
5374
5647
  */
5375
5648
  awaitPaymentConfirmation?: boolean;
5376
5649
 
5377
5650
  /**
5378
- * The ISO 3166-1 alpha-2 country code for billing
5651
+ * Body param: The ISO 3166-1 alpha-2 country code for billing
5379
5652
  */
5380
5653
  billingCountryCode?: string | null;
5381
5654
 
5382
5655
  /**
5383
- * Billing cycle anchor behavior for the subscription
5656
+ * Body param: Billing cycle anchor behavior for the subscription
5384
5657
  */
5385
5658
  billingCycleAnchor?: 'UNCHANGED' | 'NOW';
5386
5659
 
5387
5660
  /**
5388
- * External billing system identifier
5661
+ * Body param: External billing system identifier
5389
5662
  */
5390
5663
  billingId?: string | null;
5391
5664
 
5665
+ /**
5666
+ * Body param
5667
+ */
5392
5668
  billingInformation?: SubscriptionProvisionParams.BillingInformation;
5393
5669
 
5394
5670
  /**
5395
- * Billing period (MONTHLY or ANNUALLY)
5671
+ * Body param: Billing period (MONTHLY or ANNUALLY)
5396
5672
  */
5397
5673
  billingPeriod?: 'MONTHLY' | 'ANNUALLY';
5398
5674
 
5675
+ /**
5676
+ * Body param
5677
+ */
5399
5678
  budget?: SubscriptionProvisionParams.Budget | null;
5400
5679
 
5401
5680
  /**
5402
- * Subscription cancellation date
5681
+ * Body param: Subscription cancellation date
5403
5682
  */
5404
5683
  cancellationDate?: string;
5405
5684
 
5685
+ /**
5686
+ * Body param
5687
+ */
5406
5688
  charges?: Array<SubscriptionProvisionParams.Charge>;
5407
5689
 
5408
5690
  /**
5409
- * Checkout page configuration for payment collection
5691
+ * Body param: Checkout page configuration for payment collection
5410
5692
  */
5411
5693
  checkoutOptions?: SubscriptionProvisionParams.CheckoutOptions;
5412
5694
 
5695
+ /**
5696
+ * Body param
5697
+ */
5413
5698
  entitlements?: Array<SubscriptionProvisionParams.Feature | SubscriptionProvisionParams.Credit>;
5414
5699
 
5415
5700
  /**
5416
- * Additional metadata for the subscription
5701
+ * Body param: Additional metadata for the subscription
5417
5702
  */
5418
5703
  metadata?: { [key: string]: string };
5419
5704
 
5420
5705
  /**
5421
- * Minimum spend amount
5706
+ * Body param: Minimum spend amount
5422
5707
  */
5423
5708
  minimumSpend?: SubscriptionProvisionParams.MinimumSpend | null;
5424
5709
 
5425
5710
  /**
5426
- * Optional paying customer ID for split billing scenarios
5711
+ * Body param: Optional paying customer ID for split billing scenarios
5427
5712
  */
5428
5713
  payingCustomerId?: string | null;
5429
5714
 
5430
5715
  /**
5431
- * How payments should be collected for this subscription
5716
+ * Body param: How payments should be collected for this subscription
5432
5717
  */
5433
5718
  paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE';
5434
5719
 
5720
+ /**
5721
+ * Body param
5722
+ */
5435
5723
  priceOverrides?: Array<SubscriptionProvisionParams.PriceOverride>;
5436
5724
 
5437
5725
  /**
5438
- * Optional resource ID for multi-instance subscriptions
5726
+ * Body param: Optional resource ID for multi-instance subscriptions
5439
5727
  */
5440
5728
  resourceId?: string | null;
5441
5729
 
5442
5730
  /**
5443
- * Salesforce ID
5731
+ * Body param: Salesforce ID
5444
5732
  */
5445
5733
  salesforceId?: string | null;
5446
5734
 
5447
5735
  /**
5448
- * Strategy for scheduling subscription changes
5736
+ * Body param: Strategy for scheduling subscription changes
5449
5737
  */
5450
5738
  scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE';
5451
5739
 
5452
5740
  /**
5453
- * Subscription start date
5741
+ * Body param: Subscription start date
5454
5742
  */
5455
5743
  startDate?: string;
5456
5744
 
5457
5745
  /**
5458
- * Trial period override settings
5746
+ * Body param: Trial period override settings
5459
5747
  */
5460
5748
  trialOverrideConfiguration?: SubscriptionProvisionParams.TrialOverrideConfiguration;
5461
5749
 
5462
5750
  /**
5463
- * Unit quantity for per-unit pricing. Minimum is 0 (zero is allowed).
5751
+ * Body param: Unit quantity for per-unit pricing. Minimum is 0 (zero is allowed).
5464
5752
  */
5465
5753
  unitQuantity?: number;
5754
+
5755
+ /**
5756
+ * Header param: Account ID — optional when authenticating with a user JWT (Bearer
5757
+ * token); falls back to the user's first membership. Ignored for API-key auth.
5758
+ */
5759
+ 'X-ACCOUNT-ID'?: string;
5760
+
5761
+ /**
5762
+ * Header param: Environment ID — required when authenticating with a user JWT
5763
+ * (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
5764
+ * intrinsic to the key).
5765
+ */
5766
+ 'X-ENVIRONMENT-ID'?: string;
5466
5767
  }
5467
5768
 
5468
5769
  export namespace SubscriptionProvisionParams {
@@ -6578,9 +6879,22 @@ export namespace SubscriptionProvisionParams {
6578
6879
 
6579
6880
  export interface SubscriptionTransferParams {
6580
6881
  /**
6581
- * Resource ID to transfer the subscription to
6882
+ * Body param: Resource ID to transfer the subscription to
6582
6883
  */
6583
6884
  destinationResourceId: string;
6885
+
6886
+ /**
6887
+ * Header param: Account ID — optional when authenticating with a user JWT (Bearer
6888
+ * token); falls back to the user's first membership. Ignored for API-key auth.
6889
+ */
6890
+ 'X-ACCOUNT-ID'?: string;
6891
+
6892
+ /**
6893
+ * Header param: Environment ID — required when authenticating with a user JWT
6894
+ * (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
6895
+ * intrinsic to the key).
6896
+ */
6897
+ 'X-ENVIRONMENT-ID'?: string;
6584
6898
  }
6585
6899
 
6586
6900
  Subscriptions.FutureUpdate = FutureUpdateAPIFutureUpdate;
@@ -6595,6 +6909,7 @@ export declare namespace Subscriptions {
6595
6909
  type SubscriptionPreviewResponse as SubscriptionPreviewResponse,
6596
6910
  type SubscriptionProvisionResponse as SubscriptionProvisionResponse,
6597
6911
  type SubscriptionListResponsesMyCursorIDPage as SubscriptionListResponsesMyCursorIDPage,
6912
+ type SubscriptionRetrieveParams as SubscriptionRetrieveParams,
6598
6913
  type SubscriptionUpdateParams as SubscriptionUpdateParams,
6599
6914
  type SubscriptionListParams as SubscriptionListParams,
6600
6915
  type SubscriptionCancelParams as SubscriptionCancelParams,
@@ -6606,14 +6921,24 @@ export declare namespace Subscriptions {
6606
6921
  type SubscriptionTransferParams as SubscriptionTransferParams,
6607
6922
  };
6608
6923
 
6609
- export { FutureUpdateAPIFutureUpdate as FutureUpdate, type CancelSubscription as CancelSubscription };
6924
+ export {
6925
+ FutureUpdateAPIFutureUpdate as FutureUpdate,
6926
+ type CancelSubscription as CancelSubscription,
6927
+ type FutureUpdateCancelPendingPaymentParams as FutureUpdateCancelPendingPaymentParams,
6928
+ type FutureUpdateCancelScheduleParams as FutureUpdateCancelScheduleParams,
6929
+ };
6610
6930
 
6611
6931
  export {
6612
6932
  Usage as Usage,
6613
6933
  type UsageChargeUsageResponse as UsageChargeUsageResponse,
6614
6934
  type UsageSyncResponse as UsageSyncResponse,
6615
6935
  type UsageChargeUsageParams as UsageChargeUsageParams,
6936
+ type UsageSyncParams as UsageSyncParams,
6616
6937
  };
6617
6938
 
6618
- export { Invoice as Invoice, type InvoiceMarkAsPaidResponse as InvoiceMarkAsPaidResponse };
6939
+ export {
6940
+ Invoice as Invoice,
6941
+ type InvoiceMarkAsPaidResponse as InvoiceMarkAsPaidResponse,
6942
+ type InvoiceMarkAsPaidParams as InvoiceMarkAsPaidParams,
6943
+ };
6619
6944
  }