@usehercules/sdk 1.1.0 → 1.3.0

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 (199) hide show
  1. package/CHANGELOG.md +125 -0
  2. package/README.md +14 -20
  3. package/client.d.mts +6 -3
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +6 -3
  6. package/client.d.ts.map +1 -1
  7. package/client.js +1 -1
  8. package/client.js.map +1 -1
  9. package/client.mjs +1 -1
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/beta/beta.d.mts +4 -4
  13. package/resources/beta/beta.d.mts.map +1 -1
  14. package/resources/beta/beta.d.ts +4 -4
  15. package/resources/beta/beta.d.ts.map +1 -1
  16. package/resources/beta/beta.js +4 -4
  17. package/resources/beta/beta.js.map +1 -1
  18. package/resources/beta/beta.mjs +4 -4
  19. package/resources/beta/beta.mjs.map +1 -1
  20. package/resources/beta/index.d.mts +1 -1
  21. package/resources/beta/index.d.mts.map +1 -1
  22. package/resources/beta/index.d.ts +1 -1
  23. package/resources/beta/index.d.ts.map +1 -1
  24. package/resources/beta/index.js +3 -3
  25. package/resources/beta/index.js.map +1 -1
  26. package/resources/beta/index.mjs +1 -1
  27. package/resources/beta/index.mjs.map +1 -1
  28. package/resources/beta/pay/coupons.d.mts +156 -0
  29. package/resources/beta/pay/coupons.d.mts.map +1 -0
  30. package/resources/beta/pay/coupons.d.ts +156 -0
  31. package/resources/beta/pay/coupons.d.ts.map +1 -0
  32. package/resources/beta/pay/coupons.js +51 -0
  33. package/resources/beta/pay/coupons.js.map +1 -0
  34. package/resources/beta/pay/coupons.mjs +47 -0
  35. package/resources/beta/pay/coupons.mjs.map +1 -0
  36. package/resources/beta/pay/customers.d.mts +160 -0
  37. package/resources/beta/pay/customers.d.mts.map +1 -0
  38. package/resources/beta/pay/customers.d.ts +160 -0
  39. package/resources/beta/pay/customers.d.ts.map +1 -0
  40. package/resources/beta/pay/customers.js +60 -0
  41. package/resources/beta/pay/customers.js.map +1 -0
  42. package/resources/beta/pay/customers.mjs +56 -0
  43. package/resources/beta/pay/customers.mjs.map +1 -0
  44. package/resources/beta/pay/entitlements.d.mts +94 -0
  45. package/resources/beta/pay/entitlements.d.mts.map +1 -0
  46. package/resources/beta/pay/entitlements.d.ts +94 -0
  47. package/resources/beta/pay/entitlements.d.ts.map +1 -0
  48. package/resources/beta/pay/entitlements.js +42 -0
  49. package/resources/beta/pay/entitlements.js.map +1 -0
  50. package/resources/beta/pay/entitlements.mjs +38 -0
  51. package/resources/beta/pay/entitlements.mjs.map +1 -0
  52. package/resources/beta/pay/index.d.mts +6 -0
  53. package/resources/beta/pay/index.d.mts.map +1 -0
  54. package/resources/beta/pay/index.d.ts +6 -0
  55. package/resources/beta/pay/index.d.ts.map +1 -0
  56. package/resources/beta/{subscriptions → pay}/index.js +5 -5
  57. package/resources/beta/pay/index.js.map +1 -0
  58. package/resources/beta/{subscriptions → pay}/index.mjs +2 -2
  59. package/resources/beta/pay/index.mjs.map +1 -0
  60. package/resources/beta/{subscriptions/subscriptions.d.mts → pay/pay.d.mts} +48 -32
  61. package/resources/beta/pay/pay.d.mts.map +1 -0
  62. package/resources/beta/{subscriptions/subscriptions.d.ts → pay/pay.d.ts} +48 -32
  63. package/resources/beta/pay/pay.d.ts.map +1 -0
  64. package/resources/beta/pay/pay.js +54 -0
  65. package/resources/beta/pay/pay.js.map +1 -0
  66. package/resources/beta/pay/pay.mjs +49 -0
  67. package/resources/beta/pay/pay.mjs.map +1 -0
  68. package/resources/beta/pay/products/entitlements.d.mts +53 -0
  69. package/resources/beta/pay/products/entitlements.d.mts.map +1 -0
  70. package/resources/beta/pay/products/entitlements.d.ts +53 -0
  71. package/resources/beta/pay/products/entitlements.d.ts.map +1 -0
  72. package/resources/beta/pay/products/entitlements.js +38 -0
  73. package/resources/beta/pay/products/entitlements.js.map +1 -0
  74. package/resources/beta/pay/products/entitlements.mjs +34 -0
  75. package/resources/beta/pay/products/entitlements.mjs.map +1 -0
  76. package/resources/beta/pay/products/index.d.mts +3 -0
  77. package/resources/beta/pay/products/index.d.mts.map +1 -0
  78. package/resources/beta/pay/products/index.d.ts +3 -0
  79. package/resources/beta/pay/products/index.d.ts.map +1 -0
  80. package/resources/beta/{subscriptions/plans → pay/products}/index.js +3 -3
  81. package/resources/beta/pay/products/index.js.map +1 -0
  82. package/resources/beta/{subscriptions/plans → pay/products}/index.mjs +1 -1
  83. package/resources/beta/pay/products/index.mjs.map +1 -0
  84. package/resources/beta/pay/products/products.d.mts +152 -0
  85. package/resources/beta/pay/products/products.d.mts.map +1 -0
  86. package/resources/beta/pay/products/products.d.ts +152 -0
  87. package/resources/beta/pay/products/products.d.ts.map +1 -0
  88. package/resources/beta/pay/products/products.js +57 -0
  89. package/resources/beta/pay/products/products.js.map +1 -0
  90. package/resources/beta/pay/products/products.mjs +52 -0
  91. package/resources/beta/pay/products/products.mjs.map +1 -0
  92. package/resources/beta/pay/products.d.mts +2 -0
  93. package/resources/beta/pay/products.d.mts.map +1 -0
  94. package/resources/beta/pay/products.d.ts +2 -0
  95. package/resources/beta/pay/products.d.ts.map +1 -0
  96. package/resources/beta/{subscriptions/plans.js → pay/products.js} +2 -2
  97. package/resources/beta/pay/products.js.map +1 -0
  98. package/resources/beta/{subscriptions.mjs → pay/products.mjs} +2 -2
  99. package/resources/beta/pay/products.mjs.map +1 -0
  100. package/resources/beta/pay.d.mts +2 -0
  101. package/resources/beta/pay.d.mts.map +1 -0
  102. package/resources/beta/pay.d.ts +2 -0
  103. package/resources/beta/pay.d.ts.map +1 -0
  104. package/resources/beta/{subscriptions.js → pay.js} +2 -2
  105. package/resources/beta/pay.js.map +1 -0
  106. package/resources/beta/{subscriptions/plans.mjs → pay.mjs} +2 -2
  107. package/resources/beta/pay.mjs.map +1 -0
  108. package/src/client.ts +6 -4
  109. package/src/resources/beta/beta.ts +18 -18
  110. package/src/resources/beta/index.ts +8 -8
  111. package/src/resources/beta/pay/coupons.ts +218 -0
  112. package/src/resources/beta/pay/customers.ts +229 -0
  113. package/src/resources/beta/pay/entitlements.ts +135 -0
  114. package/src/resources/beta/{subscriptions → pay}/index.ts +15 -17
  115. package/src/resources/beta/{subscriptions/subscriptions.ts → pay/pay.ts} +70 -59
  116. package/src/resources/beta/{subscriptions/plans → pay/products}/entitlements.ts +26 -21
  117. package/src/resources/beta/{subscriptions/plans → pay/products}/index.ts +9 -9
  118. package/src/resources/beta/pay/products/products.ts +224 -0
  119. package/src/resources/beta/{subscriptions.ts → pay/products.ts} +1 -1
  120. package/src/resources/beta/{subscriptions/plans.ts → pay.ts} +1 -1
  121. package/src/version.ts +1 -1
  122. package/version.d.mts +1 -1
  123. package/version.d.ts +1 -1
  124. package/version.js +1 -1
  125. package/version.mjs +1 -1
  126. package/resources/beta/subscriptions/coupons.d.mts +0 -151
  127. package/resources/beta/subscriptions/coupons.d.mts.map +0 -1
  128. package/resources/beta/subscriptions/coupons.d.ts +0 -151
  129. package/resources/beta/subscriptions/coupons.d.ts.map +0 -1
  130. package/resources/beta/subscriptions/coupons.js +0 -51
  131. package/resources/beta/subscriptions/coupons.js.map +0 -1
  132. package/resources/beta/subscriptions/coupons.mjs +0 -47
  133. package/resources/beta/subscriptions/coupons.mjs.map +0 -1
  134. package/resources/beta/subscriptions/customers.d.mts +0 -93
  135. package/resources/beta/subscriptions/customers.d.mts.map +0 -1
  136. package/resources/beta/subscriptions/customers.d.ts +0 -93
  137. package/resources/beta/subscriptions/customers.d.ts.map +0 -1
  138. package/resources/beta/subscriptions/customers.js +0 -57
  139. package/resources/beta/subscriptions/customers.js.map +0 -1
  140. package/resources/beta/subscriptions/customers.mjs +0 -53
  141. package/resources/beta/subscriptions/customers.mjs.map +0 -1
  142. package/resources/beta/subscriptions/entitlements.d.mts +0 -70
  143. package/resources/beta/subscriptions/entitlements.d.mts.map +0 -1
  144. package/resources/beta/subscriptions/entitlements.d.ts +0 -70
  145. package/resources/beta/subscriptions/entitlements.d.ts.map +0 -1
  146. package/resources/beta/subscriptions/entitlements.js +0 -38
  147. package/resources/beta/subscriptions/entitlements.js.map +0 -1
  148. package/resources/beta/subscriptions/entitlements.mjs +0 -34
  149. package/resources/beta/subscriptions/entitlements.mjs.map +0 -1
  150. package/resources/beta/subscriptions/index.d.mts +0 -6
  151. package/resources/beta/subscriptions/index.d.mts.map +0 -1
  152. package/resources/beta/subscriptions/index.d.ts +0 -6
  153. package/resources/beta/subscriptions/index.d.ts.map +0 -1
  154. package/resources/beta/subscriptions/index.js.map +0 -1
  155. package/resources/beta/subscriptions/index.mjs.map +0 -1
  156. package/resources/beta/subscriptions/plans/entitlements.d.mts +0 -48
  157. package/resources/beta/subscriptions/plans/entitlements.d.mts.map +0 -1
  158. package/resources/beta/subscriptions/plans/entitlements.d.ts +0 -48
  159. package/resources/beta/subscriptions/plans/entitlements.d.ts.map +0 -1
  160. package/resources/beta/subscriptions/plans/entitlements.js +0 -34
  161. package/resources/beta/subscriptions/plans/entitlements.js.map +0 -1
  162. package/resources/beta/subscriptions/plans/entitlements.mjs +0 -30
  163. package/resources/beta/subscriptions/plans/entitlements.mjs.map +0 -1
  164. package/resources/beta/subscriptions/plans/index.d.mts +0 -3
  165. package/resources/beta/subscriptions/plans/index.d.mts.map +0 -1
  166. package/resources/beta/subscriptions/plans/index.d.ts +0 -3
  167. package/resources/beta/subscriptions/plans/index.d.ts.map +0 -1
  168. package/resources/beta/subscriptions/plans/index.js.map +0 -1
  169. package/resources/beta/subscriptions/plans/index.mjs.map +0 -1
  170. package/resources/beta/subscriptions/plans/plans.d.mts +0 -87
  171. package/resources/beta/subscriptions/plans/plans.d.mts.map +0 -1
  172. package/resources/beta/subscriptions/plans/plans.d.ts +0 -87
  173. package/resources/beta/subscriptions/plans/plans.d.ts.map +0 -1
  174. package/resources/beta/subscriptions/plans/plans.js +0 -49
  175. package/resources/beta/subscriptions/plans/plans.js.map +0 -1
  176. package/resources/beta/subscriptions/plans/plans.mjs +0 -44
  177. package/resources/beta/subscriptions/plans/plans.mjs.map +0 -1
  178. package/resources/beta/subscriptions/plans.d.mts +0 -2
  179. package/resources/beta/subscriptions/plans.d.mts.map +0 -1
  180. package/resources/beta/subscriptions/plans.d.ts +0 -2
  181. package/resources/beta/subscriptions/plans.d.ts.map +0 -1
  182. package/resources/beta/subscriptions/plans.js.map +0 -1
  183. package/resources/beta/subscriptions/plans.mjs.map +0 -1
  184. package/resources/beta/subscriptions/subscriptions.d.mts.map +0 -1
  185. package/resources/beta/subscriptions/subscriptions.d.ts.map +0 -1
  186. package/resources/beta/subscriptions/subscriptions.js +0 -47
  187. package/resources/beta/subscriptions/subscriptions.js.map +0 -1
  188. package/resources/beta/subscriptions/subscriptions.mjs +0 -42
  189. package/resources/beta/subscriptions/subscriptions.mjs.map +0 -1
  190. package/resources/beta/subscriptions.d.mts +0 -2
  191. package/resources/beta/subscriptions.d.mts.map +0 -1
  192. package/resources/beta/subscriptions.d.ts +0 -2
  193. package/resources/beta/subscriptions.d.ts.map +0 -1
  194. package/resources/beta/subscriptions.js.map +0 -1
  195. package/resources/beta/subscriptions.mjs.map +0 -1
  196. package/src/resources/beta/subscriptions/coupons.ts +0 -221
  197. package/src/resources/beta/subscriptions/customers.ts +0 -168
  198. package/src/resources/beta/subscriptions/entitlements.ts +0 -113
  199. package/src/resources/beta/subscriptions/plans/plans.ts +0 -159
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Entitlements = void 0;
5
+ const resource_1 = require("../../../core/resource.js");
6
+ const pagination_1 = require("../../../core/pagination.js");
7
+ const path_1 = require("../../../internal/utils/path.js");
8
+ class Entitlements extends resource_1.APIResource {
9
+ /**
10
+ * Creates a new feature entitlement. Entitlements represent features or
11
+ * capabilities in your app that can be gated by subscription. After creating an
12
+ * entitlement, attach it to one or more plans to grant access to customers on
13
+ * those plans.
14
+ */
15
+ create(body, options) {
16
+ return this._client.post('/v1/pay/entitlements', { body, ...options });
17
+ }
18
+ /**
19
+ * Updates an existing entitlement. Use this to modify the name or deactivate the
20
+ * entitlement. The key cannot be changed after creation.
21
+ */
22
+ update(entitlementID, body = {}, options) {
23
+ return this._client.patch((0, path_1.path) `/v1/pay/entitlements/${entitlementID}`, { body, ...options });
24
+ }
25
+ /**
26
+ * Retrieves a paginated list of all entitlements. Entitlements represent features
27
+ * or capabilities in your app that can be gated by subscription. Use the key
28
+ * filter to find a specific entitlement by its key.
29
+ */
30
+ list(query = {}, options) {
31
+ return this._client.getAPIList('/v1/pay/entitlements', (pagination_1.CursorIDPage), { query, ...options });
32
+ }
33
+ /**
34
+ * Retrieves an entitlement by ID. Returns the entitlement object including its
35
+ * lookup key and active status.
36
+ */
37
+ get(entitlementID, options) {
38
+ return this._client.get((0, path_1.path) `/v1/pay/entitlements/${entitlementID}`, options);
39
+ }
40
+ }
41
+ exports.Entitlements = Entitlements;
42
+ //# sourceMappingURL=entitlements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entitlements.js","sourceRoot":"","sources":["../../../src/resources/beta/pay/entitlements.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,4DAA8F;AAE9F,0DAAoD;AAEpD,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;OAKG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;OAGG;IACH,MAAM,CACJ,aAAqB,EACrB,OAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,wBAAwB,aAAa,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED;;;;OAIG;IACH,IAAI,CACF,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAA,yBAAyB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3G,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,aAAqB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,wBAAwB,aAAa,EAAE,EAAE,OAAO,CAAC,CAAC;IAChF,CAAC;CACF;AA1CD,oCA0CC"}
@@ -0,0 +1,38 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../../core/resource.mjs";
3
+ import { CursorIDPage } from "../../../core/pagination.mjs";
4
+ import { path } from "../../../internal/utils/path.mjs";
5
+ export class Entitlements extends APIResource {
6
+ /**
7
+ * Creates a new feature entitlement. Entitlements represent features or
8
+ * capabilities in your app that can be gated by subscription. After creating an
9
+ * entitlement, attach it to one or more plans to grant access to customers on
10
+ * those plans.
11
+ */
12
+ create(body, options) {
13
+ return this._client.post('/v1/pay/entitlements', { body, ...options });
14
+ }
15
+ /**
16
+ * Updates an existing entitlement. Use this to modify the name or deactivate the
17
+ * entitlement. The key cannot be changed after creation.
18
+ */
19
+ update(entitlementID, body = {}, options) {
20
+ return this._client.patch(path `/v1/pay/entitlements/${entitlementID}`, { body, ...options });
21
+ }
22
+ /**
23
+ * Retrieves a paginated list of all entitlements. Entitlements represent features
24
+ * or capabilities in your app that can be gated by subscription. Use the key
25
+ * filter to find a specific entitlement by its key.
26
+ */
27
+ list(query = {}, options) {
28
+ return this._client.getAPIList('/v1/pay/entitlements', (CursorIDPage), { query, ...options });
29
+ }
30
+ /**
31
+ * Retrieves an entitlement by ID. Returns the entitlement object including its
32
+ * lookup key and active status.
33
+ */
34
+ get(entitlementID, options) {
35
+ return this._client.get(path `/v1/pay/entitlements/${entitlementID}`, options);
36
+ }
37
+ }
38
+ //# sourceMappingURL=entitlements.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entitlements.mjs","sourceRoot":"","sources":["../../../src/resources/beta/pay/entitlements.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAwC;OAEtD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;OAKG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;OAGG;IACH,MAAM,CACJ,aAAqB,EACrB,OAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,wBAAwB,aAAa,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED;;;;OAIG;IACH,IAAI,CACF,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAA,YAAyB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3G,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,aAAqB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,wBAAwB,aAAa,EAAE,EAAE,OAAO,CAAC,CAAC;IAChF,CAAC;CACF"}
@@ -0,0 +1,6 @@
1
+ export { Coupons, type Coupon, type CouponCreateParams, type CouponUpdateParams, type CouponListParams, type CouponsCursorIDPage, } from "./coupons.mjs";
2
+ export { Customers, type Customer, type CustomerAddress, type CustomerBillingPortalResponse, type CustomerCreateParams, type CustomerUpdateParams, type CustomerListParams, type CustomerBillingPortalParams, type CustomersCursorIDPage, } from "./customers.mjs";
3
+ export { Entitlements, type Entitlement, type EntitlementCreateParams, type EntitlementUpdateParams, type EntitlementListParams, type EntitlementsCursorIDPage, } from "./entitlements.mjs";
4
+ export { Pay, type PayCancelResponse, type PayCheckResponse, type PayCheckoutResponse, type PayCancelParams, type PayCheckParams, type PayCheckoutParams, } from "./pay.mjs";
5
+ export { Products, type Product, type ProductCreateParams, type ProductUpdateParams, type ProductListParams, type ProductsCursorIDPage, } from "./products/index.mjs";
6
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/pay/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,GACzB;OACM,EACL,SAAS,EACT,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,6BAA6B,EAClC,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAChC,KAAK,qBAAqB,GAC3B;OACM,EACL,YAAY,EACZ,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,GAC9B;OACM,EACL,GAAG,EACH,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,iBAAiB,GACvB;OACM,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,GAC1B"}
@@ -0,0 +1,6 @@
1
+ export { Coupons, type Coupon, type CouponCreateParams, type CouponUpdateParams, type CouponListParams, type CouponsCursorIDPage, } from "./coupons.js";
2
+ export { Customers, type Customer, type CustomerAddress, type CustomerBillingPortalResponse, type CustomerCreateParams, type CustomerUpdateParams, type CustomerListParams, type CustomerBillingPortalParams, type CustomersCursorIDPage, } from "./customers.js";
3
+ export { Entitlements, type Entitlement, type EntitlementCreateParams, type EntitlementUpdateParams, type EntitlementListParams, type EntitlementsCursorIDPage, } from "./entitlements.js";
4
+ export { Pay, type PayCancelResponse, type PayCheckResponse, type PayCheckoutResponse, type PayCancelParams, type PayCheckParams, type PayCheckoutParams, } from "./pay.js";
5
+ export { Products, type Product, type ProductCreateParams, type ProductUpdateParams, type ProductListParams, type ProductsCursorIDPage, } from "./products/index.js";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/pay/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,GACzB;OACM,EACL,SAAS,EACT,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,6BAA6B,EAClC,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAChC,KAAK,qBAAqB,GAC3B;OACM,EACL,YAAY,EACZ,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,GAC9B;OACM,EACL,GAAG,EACH,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,iBAAiB,GACvB;OACM,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,GAC1B"}
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Subscriptions = exports.Plans = exports.Entitlements = exports.Customers = exports.Coupons = void 0;
4
+ exports.Products = exports.Pay = exports.Entitlements = exports.Customers = exports.Coupons = void 0;
5
5
  var coupons_1 = require("./coupons.js");
6
6
  Object.defineProperty(exports, "Coupons", { enumerable: true, get: function () { return coupons_1.Coupons; } });
7
7
  var customers_1 = require("./customers.js");
8
8
  Object.defineProperty(exports, "Customers", { enumerable: true, get: function () { return customers_1.Customers; } });
9
9
  var entitlements_1 = require("./entitlements.js");
10
10
  Object.defineProperty(exports, "Entitlements", { enumerable: true, get: function () { return entitlements_1.Entitlements; } });
11
- var index_1 = require("./plans/index.js");
12
- Object.defineProperty(exports, "Plans", { enumerable: true, get: function () { return index_1.Plans; } });
13
- var subscriptions_1 = require("./subscriptions.js");
14
- Object.defineProperty(exports, "Subscriptions", { enumerable: true, get: function () { return subscriptions_1.Subscriptions; } });
11
+ var pay_1 = require("./pay.js");
12
+ Object.defineProperty(exports, "Pay", { enumerable: true, get: function () { return pay_1.Pay; } });
13
+ var index_1 = require("./products/index.js");
14
+ Object.defineProperty(exports, "Products", { enumerable: true, get: function () { return index_1.Products; } });
15
15
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/beta/pay/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAOmB;AANjB,kGAAA,OAAO,OAAA;AAOT,4CAUqB;AATnB,sGAAA,SAAS,OAAA;AAUX,kDAOwB;AANtB,4GAAA,YAAY,OAAA;AAOd,gCAQe;AAPb,0FAAA,GAAG,OAAA;AAQL,6CAO0B;AANxB,iGAAA,QAAQ,OAAA"}
@@ -2,6 +2,6 @@
2
2
  export { Coupons, } from "./coupons.mjs";
3
3
  export { Customers, } from "./customers.mjs";
4
4
  export { Entitlements, } from "./entitlements.mjs";
5
- export { Plans, } from "./plans/index.mjs";
6
- export { Subscriptions, } from "./subscriptions.mjs";
5
+ export { Pay, } from "./pay.mjs";
6
+ export { Products, } from "./products/index.mjs";
7
7
  //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/beta/pay/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,OAAO,GAMR;OACM,EACL,SAAS,GASV;OACM,EACL,YAAY,GAMb;OACM,EACL,GAAG,GAOJ;OACM,EACL,QAAQ,GAMT"}
@@ -1,44 +1,51 @@
1
1
  import { APIResource } from "../../../core/resource.mjs";
2
2
  import * as CouponsAPI from "./coupons.mjs";
3
- import { Coupon, CouponCreateParams, CouponListParams, CouponUpdateParams, CouponValidateParams, CouponValidateResponse, Coupons, CouponsCursorIDPage } from "./coupons.mjs";
3
+ import { Coupon, CouponCreateParams, CouponListParams, CouponUpdateParams, Coupons, CouponsCursorIDPage } from "./coupons.mjs";
4
4
  import * as CustomersAPI from "./customers.mjs";
5
5
  import { Customer, CustomerAddress, CustomerBillingPortalParams, CustomerBillingPortalResponse, CustomerCreateParams, CustomerListParams, CustomerUpdateParams, Customers, CustomersCursorIDPage } from "./customers.mjs";
6
6
  import * as EntitlementsAPI from "./entitlements.mjs";
7
7
  import { Entitlement, EntitlementCreateParams, EntitlementListParams, EntitlementUpdateParams, Entitlements, EntitlementsCursorIDPage } from "./entitlements.mjs";
8
- import * as PlansAPI from "./plans/plans.mjs";
9
- import { Plan, PlanCreateParams, PlanListParams, PlanUpdateParams, Plans, PlansCursorIDPage } from "./plans/plans.mjs";
8
+ import * as ProductsAPI from "./products/products.mjs";
9
+ import { Product, ProductCreateParams, ProductListParams, ProductUpdateParams, Products, ProductsCursorIDPage } from "./products/products.mjs";
10
10
  import { APIPromise } from "../../../core/api-promise.mjs";
11
11
  import { RequestOptions } from "../../../internal/request-options.mjs";
12
- export declare class Subscriptions extends APIResource {
12
+ export declare class Pay extends APIResource {
13
13
  customers: CustomersAPI.Customers;
14
- plans: PlansAPI.Plans;
14
+ products: ProductsAPI.Products;
15
15
  entitlements: EntitlementsAPI.Entitlements;
16
16
  coupons: CouponsAPI.Coupons;
17
17
  /**
18
- * Cancel Subscription
18
+ * Cancels a customer's subscription. By default, the subscription remains active
19
+ * until the end of the current billing period. Set cancellation_timing to
20
+ * 'immediate' to cancel immediately.
19
21
  */
20
- cancel(body: SubscriptionCancelParams, options?: RequestOptions): APIPromise<SubscriptionCancelResponse>;
22
+ cancel(body: PayCancelParams, options?: RequestOptions): APIPromise<PayCancelResponse>;
21
23
  /**
22
- * Check Entitlement
24
+ * Verifies if a customer has access to a specific feature. Use this to gate
25
+ * features in your app based on the customer's active subscription and the
26
+ * entitlements attached to their product. Hercules recommends calling this before
27
+ * allowing access to premium features.
23
28
  */
24
- check(body: SubscriptionCheckParams, options?: RequestOptions): APIPromise<SubscriptionCheckResponse>;
29
+ check(body: PayCheckParams, options?: RequestOptions): APIPromise<PayCheckResponse>;
25
30
  /**
26
- * Create Checkout Session
31
+ * Creates a checkout session for a customer to subscribe to a product. Returns a
32
+ * URL to redirect the customer to for payment. After successful payment, the
33
+ * customer is subscribed to the product and gains access to its entitlements.
27
34
  */
28
- checkout(body: SubscriptionCheckoutParams, options?: RequestOptions): APIPromise<SubscriptionCheckoutResponse>;
35
+ checkout(body: PayCheckoutParams, options?: RequestOptions): APIPromise<PayCheckoutResponse>;
29
36
  }
30
37
  /**
31
38
  * Cancel subscription response
32
39
  */
33
- export interface SubscriptionCancelResponse {
40
+ export interface PayCancelResponse {
34
41
  /**
35
42
  * The subscription ID
36
43
  */
37
44
  id: string;
38
45
  /**
39
- * Whether the subscription will cancel at period end
46
+ * When the cancellation takes effect
40
47
  */
41
- cancel_at_period_end: boolean;
48
+ cancellation_timing: 'immediate' | 'at_billing_period_end';
42
49
  /**
43
50
  * The subscription status
44
51
  */
@@ -51,15 +58,15 @@ export interface SubscriptionCancelResponse {
51
58
  /**
52
59
  * Check entitlement response
53
60
  */
54
- export interface SubscriptionCheckResponse {
61
+ export interface PayCheckResponse {
55
62
  /**
56
63
  * Whether the customer has the entitlement
57
64
  */
58
65
  has_entitlement: boolean;
59
66
  /**
60
- * The entitlement lookup key that was checked
67
+ * The entitlement key that was checked
61
68
  */
62
- lookup_key: string;
69
+ key: string;
63
70
  /**
64
71
  * The active entitlement ID if present
65
72
  */
@@ -68,7 +75,7 @@ export interface SubscriptionCheckResponse {
68
75
  /**
69
76
  * Checkout session response
70
77
  */
71
- export interface SubscriptionCheckoutResponse {
78
+ export interface PayCheckoutResponse {
72
79
  /**
73
80
  * The checkout session ID
74
81
  */
@@ -78,7 +85,7 @@ export interface SubscriptionCheckoutResponse {
78
85
  */
79
86
  url: string;
80
87
  }
81
- export interface SubscriptionCancelParams {
88
+ export interface PayCancelParams {
82
89
  /**
83
90
  * The customer ID
84
91
  */
@@ -88,43 +95,52 @@ export interface SubscriptionCancelParams {
88
95
  */
89
96
  subscription_id: string;
90
97
  /**
91
- * Whether to cancel at period end or immediately
98
+ * When to cancel the subscription. Defaults to 'at_billing_period_end' to allow
99
+ * customers to use remaining time.
92
100
  */
93
- cancel_at_period_end?: boolean;
101
+ cancellation_timing?: 'immediate' | 'at_billing_period_end';
94
102
  }
95
- export interface SubscriptionCheckParams {
103
+ export interface PayCheckParams {
96
104
  /**
97
105
  * The customer ID
98
106
  */
99
107
  customer_id: string;
100
108
  /**
101
- * The entitlement feature lookup key to check
109
+ * The entitlement key to check for access
102
110
  */
103
- entitlement_lookup_key: string;
111
+ entitlement_key: string;
104
112
  }
105
- export interface SubscriptionCheckoutParams {
113
+ export interface PayCheckoutParams {
106
114
  /**
107
115
  * The customer ID
108
116
  */
109
117
  customer_id: string;
110
118
  /**
111
- * The plan ID to subscribe to
119
+ * The product ID to subscribe to
112
120
  */
113
- plan_id: string;
121
+ product_id: string;
122
+ /**
123
+ * Optional custom ID for the subscription. If not provided, one will be generated.
124
+ */
125
+ id?: string;
114
126
  /**
115
127
  * URL to redirect on cancel
116
128
  */
117
129
  cancel_url?: string;
130
+ /**
131
+ * Promotion code to apply
132
+ */
133
+ promotion_code?: string;
118
134
  /**
119
135
  * URL to redirect on success
120
136
  */
121
137
  success_url?: string;
122
138
  }
123
- export declare namespace Subscriptions {
124
- export { type SubscriptionCancelResponse as SubscriptionCancelResponse, type SubscriptionCheckResponse as SubscriptionCheckResponse, type SubscriptionCheckoutResponse as SubscriptionCheckoutResponse, type SubscriptionCancelParams as SubscriptionCancelParams, type SubscriptionCheckParams as SubscriptionCheckParams, type SubscriptionCheckoutParams as SubscriptionCheckoutParams, };
139
+ export declare namespace Pay {
140
+ export { type PayCancelResponse as PayCancelResponse, type PayCheckResponse as PayCheckResponse, type PayCheckoutResponse as PayCheckoutResponse, type PayCancelParams as PayCancelParams, type PayCheckParams as PayCheckParams, type PayCheckoutParams as PayCheckoutParams, };
125
141
  export { Customers as Customers, type Customer as Customer, type CustomerAddress as CustomerAddress, type CustomerBillingPortalResponse as CustomerBillingPortalResponse, type CustomersCursorIDPage as CustomersCursorIDPage, type CustomerCreateParams as CustomerCreateParams, type CustomerUpdateParams as CustomerUpdateParams, type CustomerListParams as CustomerListParams, type CustomerBillingPortalParams as CustomerBillingPortalParams, };
126
- export { Plans as Plans, type Plan as Plan, type PlansCursorIDPage as PlansCursorIDPage, type PlanCreateParams as PlanCreateParams, type PlanUpdateParams as PlanUpdateParams, type PlanListParams as PlanListParams, };
142
+ export { Products as Products, type Product as Product, type ProductsCursorIDPage as ProductsCursorIDPage, type ProductCreateParams as ProductCreateParams, type ProductUpdateParams as ProductUpdateParams, type ProductListParams as ProductListParams, };
127
143
  export { Entitlements as Entitlements, type Entitlement as Entitlement, type EntitlementsCursorIDPage as EntitlementsCursorIDPage, type EntitlementCreateParams as EntitlementCreateParams, type EntitlementUpdateParams as EntitlementUpdateParams, type EntitlementListParams as EntitlementListParams, };
128
- export { Coupons as Coupons, type Coupon as Coupon, type CouponValidateResponse as CouponValidateResponse, type CouponsCursorIDPage as CouponsCursorIDPage, type CouponCreateParams as CouponCreateParams, type CouponUpdateParams as CouponUpdateParams, type CouponListParams as CouponListParams, type CouponValidateParams as CouponValidateParams, };
144
+ export { Coupons as Coupons, type Coupon as Coupon, type CouponsCursorIDPage as CouponsCursorIDPage, type CouponCreateParams as CouponCreateParams, type CouponUpdateParams as CouponUpdateParams, type CouponListParams as CouponListParams, };
129
145
  }
130
- //# sourceMappingURL=subscriptions.d.mts.map
146
+ //# sourceMappingURL=pay.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pay.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/pay/pay.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EACL,MAAM,EACN,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,OAAO,EACP,mBAAmB,EACpB;OACM,KAAK,YAAY;OACjB,EACL,QAAQ,EACR,eAAe,EACf,2BAA2B,EAC3B,6BAA6B,EAC7B,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,SAAS,EACT,qBAAqB,EACtB;OACM,KAAK,eAAe;OACpB,EACL,WAAW,EACX,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,YAAY,EACZ,wBAAwB,EACzB;OACM,KAAK,WAAW;OAChB,EACL,OAAO,EACP,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,oBAAoB,EACrB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,GAAI,SAAQ,WAAW;IAClC,SAAS,EAAE,YAAY,CAAC,SAAS,CAA4C;IAC7E,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IACxE,YAAY,EAAE,eAAe,CAAC,YAAY,CAAkD;IAC5F,OAAO,EAAE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BAAwB,EACzD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
@@ -1,44 +1,51 @@
1
1
  import { APIResource } from "../../../core/resource.js";
2
2
  import * as CouponsAPI from "./coupons.js";
3
- import { Coupon, CouponCreateParams, CouponListParams, CouponUpdateParams, CouponValidateParams, CouponValidateResponse, Coupons, CouponsCursorIDPage } from "./coupons.js";
3
+ import { Coupon, CouponCreateParams, CouponListParams, CouponUpdateParams, Coupons, CouponsCursorIDPage } from "./coupons.js";
4
4
  import * as CustomersAPI from "./customers.js";
5
5
  import { Customer, CustomerAddress, CustomerBillingPortalParams, CustomerBillingPortalResponse, CustomerCreateParams, CustomerListParams, CustomerUpdateParams, Customers, CustomersCursorIDPage } from "./customers.js";
6
6
  import * as EntitlementsAPI from "./entitlements.js";
7
7
  import { Entitlement, EntitlementCreateParams, EntitlementListParams, EntitlementUpdateParams, Entitlements, EntitlementsCursorIDPage } from "./entitlements.js";
8
- import * as PlansAPI from "./plans/plans.js";
9
- import { Plan, PlanCreateParams, PlanListParams, PlanUpdateParams, Plans, PlansCursorIDPage } from "./plans/plans.js";
8
+ import * as ProductsAPI from "./products/products.js";
9
+ import { Product, ProductCreateParams, ProductListParams, ProductUpdateParams, Products, ProductsCursorIDPage } from "./products/products.js";
10
10
  import { APIPromise } from "../../../core/api-promise.js";
11
11
  import { RequestOptions } from "../../../internal/request-options.js";
12
- export declare class Subscriptions extends APIResource {
12
+ export declare class Pay extends APIResource {
13
13
  customers: CustomersAPI.Customers;
14
- plans: PlansAPI.Plans;
14
+ products: ProductsAPI.Products;
15
15
  entitlements: EntitlementsAPI.Entitlements;
16
16
  coupons: CouponsAPI.Coupons;
17
17
  /**
18
- * Cancel Subscription
18
+ * Cancels a customer's subscription. By default, the subscription remains active
19
+ * until the end of the current billing period. Set cancellation_timing to
20
+ * 'immediate' to cancel immediately.
19
21
  */
20
- cancel(body: SubscriptionCancelParams, options?: RequestOptions): APIPromise<SubscriptionCancelResponse>;
22
+ cancel(body: PayCancelParams, options?: RequestOptions): APIPromise<PayCancelResponse>;
21
23
  /**
22
- * Check Entitlement
24
+ * Verifies if a customer has access to a specific feature. Use this to gate
25
+ * features in your app based on the customer's active subscription and the
26
+ * entitlements attached to their product. Hercules recommends calling this before
27
+ * allowing access to premium features.
23
28
  */
24
- check(body: SubscriptionCheckParams, options?: RequestOptions): APIPromise<SubscriptionCheckResponse>;
29
+ check(body: PayCheckParams, options?: RequestOptions): APIPromise<PayCheckResponse>;
25
30
  /**
26
- * Create Checkout Session
31
+ * Creates a checkout session for a customer to subscribe to a product. Returns a
32
+ * URL to redirect the customer to for payment. After successful payment, the
33
+ * customer is subscribed to the product and gains access to its entitlements.
27
34
  */
28
- checkout(body: SubscriptionCheckoutParams, options?: RequestOptions): APIPromise<SubscriptionCheckoutResponse>;
35
+ checkout(body: PayCheckoutParams, options?: RequestOptions): APIPromise<PayCheckoutResponse>;
29
36
  }
30
37
  /**
31
38
  * Cancel subscription response
32
39
  */
33
- export interface SubscriptionCancelResponse {
40
+ export interface PayCancelResponse {
34
41
  /**
35
42
  * The subscription ID
36
43
  */
37
44
  id: string;
38
45
  /**
39
- * Whether the subscription will cancel at period end
46
+ * When the cancellation takes effect
40
47
  */
41
- cancel_at_period_end: boolean;
48
+ cancellation_timing: 'immediate' | 'at_billing_period_end';
42
49
  /**
43
50
  * The subscription status
44
51
  */
@@ -51,15 +58,15 @@ export interface SubscriptionCancelResponse {
51
58
  /**
52
59
  * Check entitlement response
53
60
  */
54
- export interface SubscriptionCheckResponse {
61
+ export interface PayCheckResponse {
55
62
  /**
56
63
  * Whether the customer has the entitlement
57
64
  */
58
65
  has_entitlement: boolean;
59
66
  /**
60
- * The entitlement lookup key that was checked
67
+ * The entitlement key that was checked
61
68
  */
62
- lookup_key: string;
69
+ key: string;
63
70
  /**
64
71
  * The active entitlement ID if present
65
72
  */
@@ -68,7 +75,7 @@ export interface SubscriptionCheckResponse {
68
75
  /**
69
76
  * Checkout session response
70
77
  */
71
- export interface SubscriptionCheckoutResponse {
78
+ export interface PayCheckoutResponse {
72
79
  /**
73
80
  * The checkout session ID
74
81
  */
@@ -78,7 +85,7 @@ export interface SubscriptionCheckoutResponse {
78
85
  */
79
86
  url: string;
80
87
  }
81
- export interface SubscriptionCancelParams {
88
+ export interface PayCancelParams {
82
89
  /**
83
90
  * The customer ID
84
91
  */
@@ -88,43 +95,52 @@ export interface SubscriptionCancelParams {
88
95
  */
89
96
  subscription_id: string;
90
97
  /**
91
- * Whether to cancel at period end or immediately
98
+ * When to cancel the subscription. Defaults to 'at_billing_period_end' to allow
99
+ * customers to use remaining time.
92
100
  */
93
- cancel_at_period_end?: boolean;
101
+ cancellation_timing?: 'immediate' | 'at_billing_period_end';
94
102
  }
95
- export interface SubscriptionCheckParams {
103
+ export interface PayCheckParams {
96
104
  /**
97
105
  * The customer ID
98
106
  */
99
107
  customer_id: string;
100
108
  /**
101
- * The entitlement feature lookup key to check
109
+ * The entitlement key to check for access
102
110
  */
103
- entitlement_lookup_key: string;
111
+ entitlement_key: string;
104
112
  }
105
- export interface SubscriptionCheckoutParams {
113
+ export interface PayCheckoutParams {
106
114
  /**
107
115
  * The customer ID
108
116
  */
109
117
  customer_id: string;
110
118
  /**
111
- * The plan ID to subscribe to
119
+ * The product ID to subscribe to
112
120
  */
113
- plan_id: string;
121
+ product_id: string;
122
+ /**
123
+ * Optional custom ID for the subscription. If not provided, one will be generated.
124
+ */
125
+ id?: string;
114
126
  /**
115
127
  * URL to redirect on cancel
116
128
  */
117
129
  cancel_url?: string;
130
+ /**
131
+ * Promotion code to apply
132
+ */
133
+ promotion_code?: string;
118
134
  /**
119
135
  * URL to redirect on success
120
136
  */
121
137
  success_url?: string;
122
138
  }
123
- export declare namespace Subscriptions {
124
- export { type SubscriptionCancelResponse as SubscriptionCancelResponse, type SubscriptionCheckResponse as SubscriptionCheckResponse, type SubscriptionCheckoutResponse as SubscriptionCheckoutResponse, type SubscriptionCancelParams as SubscriptionCancelParams, type SubscriptionCheckParams as SubscriptionCheckParams, type SubscriptionCheckoutParams as SubscriptionCheckoutParams, };
139
+ export declare namespace Pay {
140
+ export { type PayCancelResponse as PayCancelResponse, type PayCheckResponse as PayCheckResponse, type PayCheckoutResponse as PayCheckoutResponse, type PayCancelParams as PayCancelParams, type PayCheckParams as PayCheckParams, type PayCheckoutParams as PayCheckoutParams, };
125
141
  export { Customers as Customers, type Customer as Customer, type CustomerAddress as CustomerAddress, type CustomerBillingPortalResponse as CustomerBillingPortalResponse, type CustomersCursorIDPage as CustomersCursorIDPage, type CustomerCreateParams as CustomerCreateParams, type CustomerUpdateParams as CustomerUpdateParams, type CustomerListParams as CustomerListParams, type CustomerBillingPortalParams as CustomerBillingPortalParams, };
126
- export { Plans as Plans, type Plan as Plan, type PlansCursorIDPage as PlansCursorIDPage, type PlanCreateParams as PlanCreateParams, type PlanUpdateParams as PlanUpdateParams, type PlanListParams as PlanListParams, };
142
+ export { Products as Products, type Product as Product, type ProductsCursorIDPage as ProductsCursorIDPage, type ProductCreateParams as ProductCreateParams, type ProductUpdateParams as ProductUpdateParams, type ProductListParams as ProductListParams, };
127
143
  export { Entitlements as Entitlements, type Entitlement as Entitlement, type EntitlementsCursorIDPage as EntitlementsCursorIDPage, type EntitlementCreateParams as EntitlementCreateParams, type EntitlementUpdateParams as EntitlementUpdateParams, type EntitlementListParams as EntitlementListParams, };
128
- export { Coupons as Coupons, type Coupon as Coupon, type CouponValidateResponse as CouponValidateResponse, type CouponsCursorIDPage as CouponsCursorIDPage, type CouponCreateParams as CouponCreateParams, type CouponUpdateParams as CouponUpdateParams, type CouponListParams as CouponListParams, type CouponValidateParams as CouponValidateParams, };
144
+ export { Coupons as Coupons, type Coupon as Coupon, type CouponsCursorIDPage as CouponsCursorIDPage, type CouponCreateParams as CouponCreateParams, type CouponUpdateParams as CouponUpdateParams, type CouponListParams as CouponListParams, };
129
145
  }
130
- //# sourceMappingURL=subscriptions.d.ts.map
146
+ //# sourceMappingURL=pay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pay.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/pay/pay.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EACL,MAAM,EACN,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,OAAO,EACP,mBAAmB,EACpB;OACM,KAAK,YAAY;OACjB,EACL,QAAQ,EACR,eAAe,EACf,2BAA2B,EAC3B,6BAA6B,EAC7B,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,SAAS,EACT,qBAAqB,EACtB;OACM,KAAK,eAAe;OACpB,EACL,WAAW,EACX,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,YAAY,EACZ,wBAAwB,EACzB;OACM,KAAK,WAAW;OAChB,EACL,OAAO,EACP,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,oBAAoB,EACrB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,GAAI,SAAQ,WAAW;IAClC,SAAS,EAAE,YAAY,CAAC,SAAS,CAA4C;IAC7E,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IACxE,YAAY,EAAE,eAAe,CAAC,YAAY,CAAkD;IAC5F,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IAEnE;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAA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CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Pay = void 0;
5
+ const tslib_1 = require("../../../internal/tslib.js");
6
+ const resource_1 = require("../../../core/resource.js");
7
+ const CouponsAPI = tslib_1.__importStar(require("./coupons.js"));
8
+ const coupons_1 = require("./coupons.js");
9
+ const CustomersAPI = tslib_1.__importStar(require("./customers.js"));
10
+ const customers_1 = require("./customers.js");
11
+ const EntitlementsAPI = tslib_1.__importStar(require("./entitlements.js"));
12
+ const entitlements_1 = require("./entitlements.js");
13
+ const ProductsAPI = tslib_1.__importStar(require("./products/products.js"));
14
+ const products_1 = require("./products/products.js");
15
+ class Pay extends resource_1.APIResource {
16
+ constructor() {
17
+ super(...arguments);
18
+ this.customers = new CustomersAPI.Customers(this._client);
19
+ this.products = new ProductsAPI.Products(this._client);
20
+ this.entitlements = new EntitlementsAPI.Entitlements(this._client);
21
+ this.coupons = new CouponsAPI.Coupons(this._client);
22
+ }
23
+ /**
24
+ * Cancels a customer's subscription. By default, the subscription remains active
25
+ * until the end of the current billing period. Set cancellation_timing to
26
+ * 'immediate' to cancel immediately.
27
+ */
28
+ cancel(body, options) {
29
+ return this._client.post('/v1/pay/cancel', { body, ...options });
30
+ }
31
+ /**
32
+ * Verifies if a customer has access to a specific feature. Use this to gate
33
+ * features in your app based on the customer's active subscription and the
34
+ * entitlements attached to their product. Hercules recommends calling this before
35
+ * allowing access to premium features.
36
+ */
37
+ check(body, options) {
38
+ return this._client.post('/v1/pay/check', { body, ...options });
39
+ }
40
+ /**
41
+ * Creates a checkout session for a customer to subscribe to a product. Returns a
42
+ * URL to redirect the customer to for payment. After successful payment, the
43
+ * customer is subscribed to the product and gains access to its entitlements.
44
+ */
45
+ checkout(body, options) {
46
+ return this._client.post('/v1/pay/checkout', { body, ...options });
47
+ }
48
+ }
49
+ exports.Pay = Pay;
50
+ Pay.Customers = customers_1.Customers;
51
+ Pay.Products = products_1.Products;
52
+ Pay.Entitlements = entitlements_1.Entitlements;
53
+ Pay.Coupons = coupons_1.Coupons;
54
+ //# sourceMappingURL=pay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pay.js","sourceRoot":"","sources":["../../../src/resources/beta/pay/pay.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,iEAAwC;AACxC,0CAOmB;AACnB,qEAA4C;AAC5C,8CAUqB;AACrB,2EAAkD;AAClD,oDAOwB;AACxB,4EAAmD;AACnD,qDAO6B;AAI7B,MAAa,GAAI,SAAQ,sBAAW;IAApC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7E,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5F,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA6BrE,CAAC;IA3BC;;;;OAIG;IACH,MAAM,CAAC,IAAqB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,IAAoB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,IAAuB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;CACF;AAjCD,kBAiCC;AA4HD,GAAG,CAAC,SAAS,GAAG,qBAAS,CAAC;AAC1B,GAAG,CAAC,QAAQ,GAAG,mBAAQ,CAAC;AACxB,GAAG,CAAC,YAAY,GAAG,2BAAY,CAAC;AAChC,GAAG,CAAC,OAAO,GAAG,iBAAO,CAAC"}
@@ -0,0 +1,49 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../../core/resource.mjs";
3
+ import * as CouponsAPI from "./coupons.mjs";
4
+ import { Coupons, } from "./coupons.mjs";
5
+ import * as CustomersAPI from "./customers.mjs";
6
+ import { Customers, } from "./customers.mjs";
7
+ import * as EntitlementsAPI from "./entitlements.mjs";
8
+ import { Entitlements, } from "./entitlements.mjs";
9
+ import * as ProductsAPI from "./products/products.mjs";
10
+ import { Products, } from "./products/products.mjs";
11
+ export class Pay extends APIResource {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.customers = new CustomersAPI.Customers(this._client);
15
+ this.products = new ProductsAPI.Products(this._client);
16
+ this.entitlements = new EntitlementsAPI.Entitlements(this._client);
17
+ this.coupons = new CouponsAPI.Coupons(this._client);
18
+ }
19
+ /**
20
+ * Cancels a customer's subscription. By default, the subscription remains active
21
+ * until the end of the current billing period. Set cancellation_timing to
22
+ * 'immediate' to cancel immediately.
23
+ */
24
+ cancel(body, options) {
25
+ return this._client.post('/v1/pay/cancel', { body, ...options });
26
+ }
27
+ /**
28
+ * Verifies if a customer has access to a specific feature. Use this to gate
29
+ * features in your app based on the customer's active subscription and the
30
+ * entitlements attached to their product. Hercules recommends calling this before
31
+ * allowing access to premium features.
32
+ */
33
+ check(body, options) {
34
+ return this._client.post('/v1/pay/check', { body, ...options });
35
+ }
36
+ /**
37
+ * Creates a checkout session for a customer to subscribe to a product. Returns a
38
+ * URL to redirect the customer to for payment. After successful payment, the
39
+ * customer is subscribed to the product and gains access to its entitlements.
40
+ */
41
+ checkout(body, options) {
42
+ return this._client.post('/v1/pay/checkout', { body, ...options });
43
+ }
44
+ }
45
+ Pay.Customers = Customers;
46
+ Pay.Products = Products;
47
+ Pay.Entitlements = Entitlements;
48
+ Pay.Coupons = Coupons;
49
+ //# sourceMappingURL=pay.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pay.mjs","sourceRoot":"","sources":["../../../src/resources/beta/pay/pay.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EAKL,OAAO,GAER;OACM,KAAK,YAAY;OACjB,EAQL,SAAS,GAEV;OACM,KAAK,eAAe;OACpB,EAKL,YAAY,GAEb;OACM,KAAK,WAAW;OAChB,EAKL,QAAQ,GAET;AAID,MAAM,OAAO,GAAI,SAAQ,WAAW;IAApC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7E,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5F,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA6BrE,CAAC;IA3BC;;;;OAIG;IACH,MAAM,CAAC,IAAqB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAA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