@peable.to/contracts 0.4.0 → 1.0.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 (316) hide show
  1. package/dist/cjs/common/address.js +81 -0
  2. package/dist/cjs/common/envelopes.js +101 -0
  3. package/dist/cjs/common/objects.js +85 -0
  4. package/dist/cjs/common/params.js +211 -0
  5. package/dist/cjs/common/primitives.js +39 -0
  6. package/dist/cjs/contributions.js +22 -0
  7. package/dist/cjs/index.js +40 -137
  8. package/dist/cjs/openapi/document.js +297 -0
  9. package/dist/cjs/openapi/index.js +7 -0
  10. package/dist/cjs/openapi/webhooks.js +17 -0
  11. package/dist/cjs/resources/billingEngine/billingPortal.js +237 -0
  12. package/dist/cjs/resources/billingEngine/creditNotes.js +189 -0
  13. package/dist/cjs/resources/billingEngine/customerBalanceTransactions.js +90 -0
  14. package/dist/cjs/resources/billingEngine/index.js +43 -0
  15. package/dist/cjs/resources/billingEngine/invoiceItems.js +155 -0
  16. package/dist/cjs/resources/billingEngine/invoices.js +509 -0
  17. package/dist/cjs/resources/billingEngine/params.js +43 -0
  18. package/dist/cjs/resources/billingEngine/public.js +326 -0
  19. package/dist/cjs/resources/billingEngine/subscriptions.js +476 -0
  20. package/dist/cjs/resources/catalog/billing.js +755 -0
  21. package/dist/cjs/resources/catalog/billingSettings.js +131 -0
  22. package/dist/cjs/resources/catalog/coupons.js +222 -0
  23. package/dist/cjs/resources/catalog/entitlements.js +257 -0
  24. package/dist/cjs/resources/catalog/index.js +58 -0
  25. package/dist/cjs/resources/catalog/meters.js +279 -0
  26. package/dist/cjs/resources/catalog/prices.js +423 -0
  27. package/dist/cjs/resources/catalog/products.js +228 -0
  28. package/dist/cjs/resources/catalog/promotionCodes.js +174 -0
  29. package/dist/cjs/resources/catalog/shared.js +75 -0
  30. package/dist/cjs/resources/catalog/testClocks.js +127 -0
  31. package/dist/cjs/resources/checkout/checkoutSessions.js +582 -0
  32. package/dist/cjs/resources/checkout/contributions.js +172 -0
  33. package/dist/cjs/resources/checkout/files.js +133 -0
  34. package/dist/cjs/resources/checkout/index.js +57 -0
  35. package/dist/cjs/resources/checkout/merchants.js +290 -0
  36. package/dist/cjs/resources/checkout/paymentLinks.js +330 -0
  37. package/dist/cjs/resources/checkout/paymentMethodConfigurations.js +262 -0
  38. package/dist/cjs/resources/checkout/shared.js +368 -0
  39. package/dist/cjs/resources/connect/account.js +332 -0
  40. package/dist/cjs/resources/connect/applicationFees.js +113 -0
  41. package/dist/cjs/resources/connect/balance.js +212 -0
  42. package/dist/cjs/resources/connect/connectedAccounts.js +260 -0
  43. package/dist/cjs/resources/connect/index.js +51 -0
  44. package/dist/cjs/resources/connect/onboarding.js +82 -0
  45. package/dist/cjs/resources/connect/payouts.js +196 -0
  46. package/dist/cjs/resources/connect/reporting.js +235 -0
  47. package/dist/cjs/resources/connect/requestLogs.js +110 -0
  48. package/dist/cjs/resources/connect/transfers.js +227 -0
  49. package/dist/cjs/resources/core/customers.js +194 -0
  50. package/dist/cjs/resources/core/index.js +23 -0
  51. package/dist/cjs/resources/core/paymentMethods.js +134 -0
  52. package/dist/cjs/resources/events/events.js +357 -0
  53. package/dist/cjs/resources/events/index.js +29 -0
  54. package/dist/cjs/resources/events/webhookDeliveries.js +93 -0
  55. package/dist/cjs/resources/events/webhookEndpoints.js +215 -0
  56. package/dist/cjs/resources/payments/charges.js +157 -0
  57. package/dist/cjs/resources/payments/disputes.js +204 -0
  58. package/dist/cjs/resources/payments/index.js +41 -0
  59. package/dist/cjs/resources/payments/paymentIntents.js +529 -0
  60. package/dist/cjs/resources/payments/refunds.js +245 -0
  61. package/dist/cjs/resources/payments/setupIntents.js +158 -0
  62. package/dist/cjs/resources/payments/social.js +182 -0
  63. package/dist/cjs/resources/payments/testHelpers.js +39 -0
  64. package/dist/cjs/resources/tax/assessments.js +217 -0
  65. package/dist/cjs/resources/tax/businessProfile.js +99 -0
  66. package/dist/cjs/resources/tax/calculations.js +176 -0
  67. package/dist/cjs/resources/tax/capabilities.js +42 -0
  68. package/dist/cjs/resources/tax/codes.js +37 -0
  69. package/dist/cjs/resources/tax/complianceActions.js +56 -0
  70. package/dist/cjs/resources/tax/deadlines.js +59 -0
  71. package/dist/cjs/resources/tax/documents.js +128 -0
  72. package/dist/cjs/resources/tax/index.js +80 -0
  73. package/dist/cjs/resources/tax/locationEvidence.js +131 -0
  74. package/dist/cjs/resources/tax/operatingLocations.js +98 -0
  75. package/dist/cjs/resources/tax/products.js +67 -0
  76. package/dist/cjs/resources/tax/registrationDeclarations.js +124 -0
  77. package/dist/cjs/resources/tax/registrations.js +82 -0
  78. package/dist/cjs/resources/tax/reports.js +92 -0
  79. package/dist/cjs/resources/tax/reviewItems.js +116 -0
  80. package/dist/cjs/resources/tax/ruleSet.js +68 -0
  81. package/dist/cjs/resources/tax/salesDestinations.js +94 -0
  82. package/dist/cjs/resources/tax/settings.js +104 -0
  83. package/dist/cjs/resources/tax/shared.js +62 -0
  84. package/dist/cjs/resources/tax/transactions.js +102 -0
  85. package/dist/cjs/route.js +22 -0
  86. package/dist/cjs/routes.js +31 -0
  87. package/dist/cjs/vocabulary/billingPortal.js +15 -0
  88. package/dist/cjs/vocabulary/catalog.js +110 -0
  89. package/dist/cjs/vocabulary/checkout.js +53 -0
  90. package/dist/cjs/vocabulary/connect.js +95 -0
  91. package/dist/cjs/vocabulary/errors.js +174 -0
  92. package/dist/cjs/vocabulary/events.js +176 -0
  93. package/dist/cjs/vocabulary/files.js +44 -0
  94. package/dist/cjs/vocabulary/index.js +37 -0
  95. package/dist/cjs/vocabulary/invoices.js +52 -0
  96. package/dist/cjs/vocabulary/lists.js +22 -0
  97. package/dist/cjs/vocabulary/merchants.js +23 -0
  98. package/dist/cjs/vocabulary/money.js +104 -0
  99. package/dist/cjs/vocabulary/paymentMethodConfigurations.js +36 -0
  100. package/dist/cjs/vocabulary/payments.js +195 -0
  101. package/dist/cjs/vocabulary/reporting.js +27 -0
  102. package/dist/cjs/vocabulary/subscriptions.js +60 -0
  103. package/dist/cjs/vocabulary/tax.js +237 -0
  104. package/dist/cjs/vocabulary/version.js +12 -0
  105. package/dist/esm/common/address.js +76 -0
  106. package/dist/esm/common/envelopes.js +95 -0
  107. package/dist/esm/common/objects.js +74 -0
  108. package/dist/esm/common/params.js +203 -0
  109. package/dist/esm/common/primitives.js +35 -0
  110. package/dist/esm/contributions.js +5 -0
  111. package/dist/esm/index.js +26 -134
  112. package/dist/esm/openapi/document.js +294 -0
  113. package/dist/esm/openapi/index.js +2 -0
  114. package/dist/esm/openapi/webhooks.js +14 -0
  115. package/dist/esm/resources/billingEngine/billingPortal.js +234 -0
  116. package/dist/esm/resources/billingEngine/creditNotes.js +186 -0
  117. package/dist/esm/resources/billingEngine/customerBalanceTransactions.js +87 -0
  118. package/dist/esm/resources/billingEngine/index.js +26 -0
  119. package/dist/esm/resources/billingEngine/invoiceItems.js +152 -0
  120. package/dist/esm/resources/billingEngine/invoices.js +506 -0
  121. package/dist/esm/resources/billingEngine/params.js +39 -0
  122. package/dist/esm/resources/billingEngine/public.js +323 -0
  123. package/dist/esm/resources/billingEngine/subscriptions.js +473 -0
  124. package/dist/esm/resources/catalog/billing.js +752 -0
  125. package/dist/esm/resources/catalog/billingSettings.js +128 -0
  126. package/dist/esm/resources/catalog/coupons.js +219 -0
  127. package/dist/esm/resources/catalog/entitlements.js +254 -0
  128. package/dist/esm/resources/catalog/index.js +38 -0
  129. package/dist/esm/resources/catalog/meters.js +276 -0
  130. package/dist/esm/resources/catalog/prices.js +419 -0
  131. package/dist/esm/resources/catalog/products.js +225 -0
  132. package/dist/esm/resources/catalog/promotionCodes.js +171 -0
  133. package/dist/esm/resources/catalog/shared.js +67 -0
  134. package/dist/esm/resources/catalog/testClocks.js +124 -0
  135. package/dist/esm/resources/checkout/checkoutSessions.js +579 -0
  136. package/dist/esm/resources/checkout/contributions.js +167 -0
  137. package/dist/esm/resources/checkout/files.js +130 -0
  138. package/dist/esm/resources/checkout/index.js +25 -0
  139. package/dist/esm/resources/checkout/merchants.js +287 -0
  140. package/dist/esm/resources/checkout/paymentLinks.js +327 -0
  141. package/dist/esm/resources/checkout/paymentMethodConfigurations.js +259 -0
  142. package/dist/esm/resources/checkout/shared.js +363 -0
  143. package/dist/esm/resources/connect/account.js +329 -0
  144. package/dist/esm/resources/connect/applicationFees.js +110 -0
  145. package/dist/esm/resources/connect/balance.js +209 -0
  146. package/dist/esm/resources/connect/connectedAccounts.js +257 -0
  147. package/dist/esm/resources/connect/index.js +34 -0
  148. package/dist/esm/resources/connect/onboarding.js +79 -0
  149. package/dist/esm/resources/connect/payouts.js +193 -0
  150. package/dist/esm/resources/connect/reporting.js +232 -0
  151. package/dist/esm/resources/connect/requestLogs.js +107 -0
  152. package/dist/esm/resources/connect/transfers.js +224 -0
  153. package/dist/esm/resources/core/customers.js +191 -0
  154. package/dist/esm/resources/core/index.js +6 -0
  155. package/dist/esm/resources/core/paymentMethods.js +131 -0
  156. package/dist/esm/resources/events/events.js +353 -0
  157. package/dist/esm/resources/events/index.js +12 -0
  158. package/dist/esm/resources/events/webhookDeliveries.js +90 -0
  159. package/dist/esm/resources/events/webhookEndpoints.js +212 -0
  160. package/dist/esm/resources/payments/charges.js +154 -0
  161. package/dist/esm/resources/payments/disputes.js +201 -0
  162. package/dist/esm/resources/payments/index.js +24 -0
  163. package/dist/esm/resources/payments/paymentIntents.js +526 -0
  164. package/dist/esm/resources/payments/refunds.js +242 -0
  165. package/dist/esm/resources/payments/setupIntents.js +155 -0
  166. package/dist/esm/resources/payments/social.js +179 -0
  167. package/dist/esm/resources/payments/testHelpers.js +36 -0
  168. package/dist/esm/resources/tax/assessments.js +214 -0
  169. package/dist/esm/resources/tax/businessProfile.js +96 -0
  170. package/dist/esm/resources/tax/calculations.js +173 -0
  171. package/dist/esm/resources/tax/capabilities.js +39 -0
  172. package/dist/esm/resources/tax/codes.js +34 -0
  173. package/dist/esm/resources/tax/complianceActions.js +53 -0
  174. package/dist/esm/resources/tax/deadlines.js +56 -0
  175. package/dist/esm/resources/tax/documents.js +125 -0
  176. package/dist/esm/resources/tax/index.js +63 -0
  177. package/dist/esm/resources/tax/locationEvidence.js +128 -0
  178. package/dist/esm/resources/tax/operatingLocations.js +95 -0
  179. package/dist/esm/resources/tax/products.js +64 -0
  180. package/dist/esm/resources/tax/registrationDeclarations.js +121 -0
  181. package/dist/esm/resources/tax/registrations.js +79 -0
  182. package/dist/esm/resources/tax/reports.js +89 -0
  183. package/dist/esm/resources/tax/reviewItems.js +113 -0
  184. package/dist/esm/resources/tax/ruleSet.js +65 -0
  185. package/dist/esm/resources/tax/salesDestinations.js +91 -0
  186. package/dist/esm/resources/tax/settings.js +101 -0
  187. package/dist/esm/resources/tax/shared.js +58 -0
  188. package/dist/esm/resources/tax/transactions.js +99 -0
  189. package/dist/esm/route.js +16 -0
  190. package/dist/esm/routes.js +27 -0
  191. package/dist/esm/vocabulary/billingPortal.js +12 -0
  192. package/dist/esm/vocabulary/catalog.js +106 -0
  193. package/dist/esm/vocabulary/checkout.js +50 -0
  194. package/dist/esm/vocabulary/connect.js +92 -0
  195. package/dist/esm/vocabulary/errors.js +169 -0
  196. package/dist/esm/vocabulary/events.js +173 -0
  197. package/dist/esm/vocabulary/files.js +41 -0
  198. package/dist/esm/vocabulary/index.js +21 -0
  199. package/dist/esm/vocabulary/invoices.js +49 -0
  200. package/dist/esm/vocabulary/lists.js +19 -0
  201. package/dist/esm/vocabulary/merchants.js +20 -0
  202. package/dist/esm/vocabulary/money.js +98 -0
  203. package/dist/esm/vocabulary/paymentMethodConfigurations.js +33 -0
  204. package/dist/esm/vocabulary/payments.js +192 -0
  205. package/dist/esm/vocabulary/reporting.js +24 -0
  206. package/dist/esm/vocabulary/subscriptions.js +57 -0
  207. package/dist/esm/vocabulary/tax.js +233 -0
  208. package/dist/esm/vocabulary/version.js +9 -0
  209. package/dist/types/common/address.d.ts +62 -0
  210. package/dist/types/common/envelopes.d.ts +88 -0
  211. package/dist/types/common/objects.d.ts +107 -0
  212. package/dist/types/common/params.d.ts +156 -0
  213. package/dist/types/common/primitives.d.ts +56 -0
  214. package/dist/types/contributions.d.ts +1 -0
  215. package/dist/types/index.d.ts +16 -171
  216. package/dist/types/openapi/document.d.ts +16 -0
  217. package/dist/types/openapi/index.d.ts +2 -0
  218. package/dist/types/openapi/webhooks.d.ts +15 -0
  219. package/dist/types/resources/billingEngine/billingPortal.d.ts +742 -0
  220. package/dist/types/resources/billingEngine/creditNotes.d.ts +655 -0
  221. package/dist/types/resources/billingEngine/customerBalanceTransactions.d.ts +282 -0
  222. package/dist/types/resources/billingEngine/index.d.ts +6071 -0
  223. package/dist/types/resources/billingEngine/invoiceItems.d.ts +502 -0
  224. package/dist/types/resources/billingEngine/invoices.d.ts +2547 -0
  225. package/dist/types/resources/billingEngine/params.d.ts +51 -0
  226. package/dist/types/resources/billingEngine/public.d.ts +1860 -0
  227. package/dist/types/resources/billingEngine/subscriptions.d.ts +1519 -0
  228. package/dist/types/resources/catalog/billing.d.ts +1723 -0
  229. package/dist/types/resources/catalog/billingSettings.d.ts +160 -0
  230. package/dist/types/resources/catalog/coupons.d.ts +403 -0
  231. package/dist/types/resources/catalog/entitlements.d.ts +422 -0
  232. package/dist/types/resources/catalog/index.d.ts +3155 -0
  233. package/dist/types/resources/catalog/meters.d.ts +474 -0
  234. package/dist/types/resources/catalog/prices.d.ts +1091 -0
  235. package/dist/types/resources/catalog/products.d.ts +430 -0
  236. package/dist/types/resources/catalog/promotionCodes.d.ts +369 -0
  237. package/dist/types/resources/catalog/shared.d.ts +34 -0
  238. package/dist/types/resources/catalog/testClocks.d.ts +220 -0
  239. package/dist/types/resources/checkout/checkoutSessions.d.ts +3207 -0
  240. package/dist/types/resources/checkout/contributions.d.ts +375 -0
  241. package/dist/types/resources/checkout/files.d.ts +280 -0
  242. package/dist/types/resources/checkout/index.d.ts +5678 -0
  243. package/dist/types/resources/checkout/merchants.d.ts +395 -0
  244. package/dist/types/resources/checkout/paymentLinks.d.ts +1728 -0
  245. package/dist/types/resources/checkout/paymentMethodConfigurations.d.ts +2104 -0
  246. package/dist/types/resources/checkout/shared.d.ts +419 -0
  247. package/dist/types/resources/connect/account.d.ts +483 -0
  248. package/dist/types/resources/connect/applicationFees.d.ts +198 -0
  249. package/dist/types/resources/connect/balance.d.ts +399 -0
  250. package/dist/types/resources/connect/connectedAccounts.d.ts +494 -0
  251. package/dist/types/resources/connect/index.d.ts +2094 -0
  252. package/dist/types/resources/connect/onboarding.d.ts +95 -0
  253. package/dist/types/resources/connect/payouts.d.ts +527 -0
  254. package/dist/types/resources/connect/reporting.d.ts +506 -0
  255. package/dist/types/resources/connect/requestLogs.d.ts +236 -0
  256. package/dist/types/resources/connect/transfers.d.ts +436 -0
  257. package/dist/types/resources/core/customers.d.ts +619 -0
  258. package/dist/types/resources/core/index.d.ts +679 -0
  259. package/dist/types/resources/core/paymentMethods.d.ts +336 -0
  260. package/dist/types/resources/events/events.d.ts +731 -0
  261. package/dist/types/resources/events/index.d.ts +1727 -0
  262. package/dist/types/resources/events/webhookDeliveries.d.ts +436 -0
  263. package/dist/types/resources/events/webhookEndpoints.d.ts +1502 -0
  264. package/dist/types/resources/payments/charges.d.ts +390 -0
  265. package/dist/types/resources/payments/disputes.d.ts +822 -0
  266. package/dist/types/resources/payments/index.d.ts +3517 -0
  267. package/dist/types/resources/payments/paymentIntents.d.ts +2080 -0
  268. package/dist/types/resources/payments/refunds.d.ts +684 -0
  269. package/dist/types/resources/payments/setupIntents.d.ts +391 -0
  270. package/dist/types/resources/payments/social.d.ts +266 -0
  271. package/dist/types/resources/payments/testHelpers.d.ts +178 -0
  272. package/dist/types/resources/tax/assessments.d.ts +787 -0
  273. package/dist/types/resources/tax/businessProfile.d.ts +134 -0
  274. package/dist/types/resources/tax/calculations.d.ts +261 -0
  275. package/dist/types/resources/tax/capabilities.d.ts +81 -0
  276. package/dist/types/resources/tax/codes.d.ts +29 -0
  277. package/dist/types/resources/tax/complianceActions.d.ts +97 -0
  278. package/dist/types/resources/tax/deadlines.d.ts +133 -0
  279. package/dist/types/resources/tax/documents.d.ts +257 -0
  280. package/dist/types/resources/tax/index.d.ts +1946 -0
  281. package/dist/types/resources/tax/locationEvidence.d.ts +246 -0
  282. package/dist/types/resources/tax/operatingLocations.d.ts +170 -0
  283. package/dist/types/resources/tax/products.d.ts +68 -0
  284. package/dist/types/resources/tax/registrationDeclarations.d.ts +270 -0
  285. package/dist/types/resources/tax/registrations.d.ts +103 -0
  286. package/dist/types/resources/tax/reports.d.ts +129 -0
  287. package/dist/types/resources/tax/reviewItems.d.ts +226 -0
  288. package/dist/types/resources/tax/ruleSet.d.ts +219 -0
  289. package/dist/types/resources/tax/salesDestinations.d.ts +158 -0
  290. package/dist/types/resources/tax/settings.d.ts +122 -0
  291. package/dist/types/resources/tax/shared.d.ts +43 -0
  292. package/dist/types/resources/tax/transactions.d.ts +404 -0
  293. package/dist/types/route.d.ts +86 -0
  294. package/dist/types/routes.d.ts +23 -0
  295. package/dist/types/vocabulary/billingPortal.d.ts +15 -0
  296. package/dist/types/vocabulary/catalog.d.ts +97 -0
  297. package/dist/types/vocabulary/checkout.d.ts +49 -0
  298. package/dist/types/vocabulary/connect.d.ts +62 -0
  299. package/dist/types/vocabulary/errors.d.ts +145 -0
  300. package/dist/types/vocabulary/events.d.ts +171 -0
  301. package/dist/types/vocabulary/files.d.ts +30 -0
  302. package/dist/types/vocabulary/index.d.ts +17 -0
  303. package/dist/types/vocabulary/invoices.d.ts +39 -0
  304. package/dist/types/vocabulary/lists.d.ts +9 -0
  305. package/dist/types/vocabulary/merchants.d.ts +9 -0
  306. package/dist/types/vocabulary/money.d.ts +59 -0
  307. package/dist/types/vocabulary/paymentMethodConfigurations.d.ts +22 -0
  308. package/dist/types/vocabulary/payments.d.ts +117 -0
  309. package/dist/types/vocabulary/reporting.d.ts +18 -0
  310. package/dist/types/vocabulary/subscriptions.d.ts +45 -0
  311. package/dist/types/vocabulary/tax.d.ts +163 -0
  312. package/dist/types/vocabulary/version.d.ts +10 -0
  313. package/package.json +51 -11
  314. package/dist/cjs/openapi.js +0 -165
  315. package/dist/esm/openapi.js +0 -161
  316. package/dist/types/openapi.d.ts +0 -148
@@ -0,0 +1,2547 @@
1
+ import { z } from 'zod';
2
+ import { type Expand } from '../../common/objects';
3
+ /**
4
+ * Invoices (`in_…`) and their lines (`il_…`) — Orbit's native billing engine
5
+ * (ADR 0018 §2).
6
+ *
7
+ * ## Signed amounts
8
+ *
9
+ * Every amount is a base-unit STRING (ADR 0014 D1). Most are never negative;
10
+ * the ones documented as SIGNED may start with `-`: a proration credit line,
11
+ * an invoice whose credits exceed its charges, and a customer balance (where
12
+ * negative is credit the customer holds, Stripe's convention). A signed amount
13
+ * still has exactly one spelling: no `+`, no `-0`, no leading zeros.
14
+ */
15
+ /** One tax amount on a line. */
16
+ export declare const invoiceTaxAmountSchema: z.ZodObject<{
17
+ amount: z.ZodString;
18
+ inclusive: z.ZodBoolean;
19
+ tax_calculation: z.ZodNullable<z.ZodString>;
20
+ taxability_reason: z.ZodNullable<z.ZodString>;
21
+ }, z.core.$strict>;
22
+ export type InvoiceTaxAmount = z.output<typeof invoiceTaxAmountSchema>;
23
+ export declare const invoiceLineItemSchema: z.ZodObject<{
24
+ id: z.ZodString;
25
+ object: z.ZodLiteral<"line_item">;
26
+ livemode: z.ZodBoolean;
27
+ invoice: z.ZodString;
28
+ type: z.ZodEnum<{
29
+ subscription: "subscription";
30
+ invoiceitem: "invoiceitem";
31
+ }>;
32
+ amount: z.ZodString;
33
+ currency: z.ZodEnum<{
34
+ FAIR: "FAIR";
35
+ EUR: "EUR";
36
+ USD: "USD";
37
+ GBP: "GBP";
38
+ CHF: "CHF";
39
+ SEK: "SEK";
40
+ NOK: "NOK";
41
+ DKK: "DKK";
42
+ PLN: "PLN";
43
+ CZK: "CZK";
44
+ CAD: "CAD";
45
+ AUD: "AUD";
46
+ JPY: "JPY";
47
+ }>;
48
+ description: z.ZodNullable<z.ZodString>;
49
+ discount_amounts: z.ZodArray<z.ZodObject<{
50
+ amount: z.ZodString;
51
+ discount: z.ZodString;
52
+ }, z.core.$strict>>;
53
+ discountable: z.ZodBoolean;
54
+ period: z.ZodObject<{
55
+ start: z.ZodNumber;
56
+ end: z.ZodNumber;
57
+ }, z.core.$strict>;
58
+ price: z.ZodNullable<z.ZodType<import("../..").Ref<"price">, import("../..").Ref<"price">, z.core.$ZodTypeInternals<import("../..").Ref<"price">, import("../..").Ref<"price">>>>;
59
+ quantity: z.ZodNullable<z.ZodNumber>;
60
+ proration: z.ZodBoolean;
61
+ subscription: z.ZodNullable<z.ZodString>;
62
+ subscription_item: z.ZodNullable<z.ZodString>;
63
+ invoice_item: z.ZodNullable<z.ZodString>;
64
+ tax_amounts: z.ZodArray<z.ZodObject<{
65
+ amount: z.ZodString;
66
+ inclusive: z.ZodBoolean;
67
+ tax_calculation: z.ZodNullable<z.ZodString>;
68
+ taxability_reason: z.ZodNullable<z.ZodString>;
69
+ }, z.core.$strict>>;
70
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
71
+ }, z.core.$strict>;
72
+ export type InvoiceLineItem = Expand<z.output<typeof invoiceLineItemSchema>>;
73
+ export declare const invoiceSchema: z.ZodObject<{
74
+ id: z.ZodString;
75
+ object: z.ZodLiteral<"invoice">;
76
+ livemode: z.ZodBoolean;
77
+ number: z.ZodNullable<z.ZodString>;
78
+ customer: z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>;
79
+ customer_email: z.ZodNullable<z.ZodString>;
80
+ customer_name: z.ZodNullable<z.ZodString>;
81
+ subscription: z.ZodNullable<z.ZodType<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">, z.core.$ZodTypeInternals<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">>>>;
82
+ status: z.ZodEnum<{
83
+ void: "void";
84
+ draft: "draft";
85
+ open: "open";
86
+ paid: "paid";
87
+ uncollectible: "uncollectible";
88
+ }>;
89
+ billing_reason: z.ZodEnum<{
90
+ subscription_cancel: "subscription_cancel";
91
+ subscription_update: "subscription_update";
92
+ manual: "manual";
93
+ subscription_create: "subscription_create";
94
+ subscription_cycle: "subscription_cycle";
95
+ upcoming: "upcoming";
96
+ }>;
97
+ collection_method: z.ZodEnum<{
98
+ charge_automatically: "charge_automatically";
99
+ send_invoice: "send_invoice";
100
+ }>;
101
+ currency: z.ZodEnum<{
102
+ FAIR: "FAIR";
103
+ EUR: "EUR";
104
+ USD: "USD";
105
+ GBP: "GBP";
106
+ CHF: "CHF";
107
+ SEK: "SEK";
108
+ NOK: "NOK";
109
+ DKK: "DKK";
110
+ PLN: "PLN";
111
+ CZK: "CZK";
112
+ CAD: "CAD";
113
+ AUD: "AUD";
114
+ JPY: "JPY";
115
+ }>;
116
+ description: z.ZodNullable<z.ZodString>;
117
+ auto_advance: z.ZodBoolean;
118
+ automatically_finalizes_at: z.ZodNullable<z.ZodNumber>;
119
+ lines: z.ZodObject<{
120
+ object: z.ZodLiteral<"list">;
121
+ data: z.ZodArray<z.ZodObject<{
122
+ id: z.ZodString;
123
+ object: z.ZodLiteral<"line_item">;
124
+ livemode: z.ZodBoolean;
125
+ invoice: z.ZodString;
126
+ type: z.ZodEnum<{
127
+ subscription: "subscription";
128
+ invoiceitem: "invoiceitem";
129
+ }>;
130
+ amount: z.ZodString;
131
+ currency: z.ZodEnum<{
132
+ FAIR: "FAIR";
133
+ EUR: "EUR";
134
+ USD: "USD";
135
+ GBP: "GBP";
136
+ CHF: "CHF";
137
+ SEK: "SEK";
138
+ NOK: "NOK";
139
+ DKK: "DKK";
140
+ PLN: "PLN";
141
+ CZK: "CZK";
142
+ CAD: "CAD";
143
+ AUD: "AUD";
144
+ JPY: "JPY";
145
+ }>;
146
+ description: z.ZodNullable<z.ZodString>;
147
+ discount_amounts: z.ZodArray<z.ZodObject<{
148
+ amount: z.ZodString;
149
+ discount: z.ZodString;
150
+ }, z.core.$strict>>;
151
+ discountable: z.ZodBoolean;
152
+ period: z.ZodObject<{
153
+ start: z.ZodNumber;
154
+ end: z.ZodNumber;
155
+ }, z.core.$strict>;
156
+ price: z.ZodNullable<z.ZodType<import("../..").Ref<"price">, import("../..").Ref<"price">, z.core.$ZodTypeInternals<import("../..").Ref<"price">, import("../..").Ref<"price">>>>;
157
+ quantity: z.ZodNullable<z.ZodNumber>;
158
+ proration: z.ZodBoolean;
159
+ subscription: z.ZodNullable<z.ZodString>;
160
+ subscription_item: z.ZodNullable<z.ZodString>;
161
+ invoice_item: z.ZodNullable<z.ZodString>;
162
+ tax_amounts: z.ZodArray<z.ZodObject<{
163
+ amount: z.ZodString;
164
+ inclusive: z.ZodBoolean;
165
+ tax_calculation: z.ZodNullable<z.ZodString>;
166
+ taxability_reason: z.ZodNullable<z.ZodString>;
167
+ }, z.core.$strict>>;
168
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
169
+ }, z.core.$strict>>;
170
+ has_more: z.ZodBoolean;
171
+ url: z.ZodString;
172
+ }, z.core.$strict>;
173
+ subtotal: z.ZodString;
174
+ subtotal_excluding_tax: z.ZodString;
175
+ total_discount_amounts: z.ZodArray<z.ZodObject<{
176
+ amount: z.ZodString;
177
+ discount: z.ZodString;
178
+ }, z.core.$strict>>;
179
+ discount: z.ZodNullable<z.ZodObject<{
180
+ object: z.ZodLiteral<"discount">;
181
+ coupon: z.ZodString;
182
+ promotion_code: z.ZodNullable<z.ZodString>;
183
+ start: z.ZodNumber;
184
+ end: z.ZodNullable<z.ZodNumber>;
185
+ }, z.core.$strict>>;
186
+ tax: z.ZodNullable<z.ZodString>;
187
+ total: z.ZodString;
188
+ total_excluding_tax: z.ZodString;
189
+ starting_balance: z.ZodString;
190
+ ending_balance: z.ZodNullable<z.ZodString>;
191
+ amount_due: z.ZodString;
192
+ amount_paid: z.ZodString;
193
+ amount_remaining: z.ZodString;
194
+ pre_payment_credit_notes_amount: z.ZodString;
195
+ post_payment_credit_notes_amount: z.ZodString;
196
+ attempt_count: z.ZodNumber;
197
+ attempted: z.ZodBoolean;
198
+ next_payment_attempt: z.ZodNullable<z.ZodNumber>;
199
+ due_date: z.ZodNullable<z.ZodNumber>;
200
+ days_until_due: z.ZodNullable<z.ZodNumber>;
201
+ period_start: z.ZodNumber;
202
+ period_end: z.ZodNumber;
203
+ payment_intent: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">>>>;
204
+ default_payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
205
+ automatic_tax: z.ZodObject<{
206
+ enabled: z.ZodBoolean;
207
+ status: z.ZodNullable<z.ZodEnum<{
208
+ requires_location_inputs: "requires_location_inputs";
209
+ failed: "failed";
210
+ complete: "complete";
211
+ }>>;
212
+ tax_calculation: z.ZodNullable<z.ZodString>;
213
+ }, z.core.$strict>;
214
+ hosted_invoice_url: z.ZodNullable<z.ZodString>;
215
+ invoice_pdf: z.ZodNullable<z.ZodString>;
216
+ last_finalization_error: z.ZodNullable<z.ZodObject<{
217
+ code: z.ZodString;
218
+ message: z.ZodString;
219
+ }, z.core.$strict>>;
220
+ status_transitions: z.ZodObject<{
221
+ finalized_at: z.ZodNullable<z.ZodNumber>;
222
+ paid_at: z.ZodNullable<z.ZodNumber>;
223
+ voided_at: z.ZodNullable<z.ZodNumber>;
224
+ marked_uncollectible_at: z.ZodNullable<z.ZodNumber>;
225
+ }, z.core.$strict>;
226
+ paid_out_of_band: z.ZodBoolean;
227
+ test_clock: z.ZodNullable<z.ZodString>;
228
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
229
+ created: z.ZodNumber;
230
+ effective_at: z.ZodNullable<z.ZodNumber>;
231
+ }, z.core.$strict>;
232
+ export type Invoice = Expand<z.output<typeof invoiceSchema>>;
233
+ /** What `DELETE /v1/invoices/:id` (a draft) answers. */
234
+ export declare const deletedInvoiceSchema: z.ZodObject<{
235
+ id: z.ZodString;
236
+ object: z.ZodLiteral<"invoice">;
237
+ deleted: z.ZodLiteral<true>;
238
+ }, z.core.$strict>;
239
+ export type DeletedInvoice = z.output<typeof deletedInvoiceSchema>;
240
+ declare module '../../common/objects' {
241
+ interface ObjectMap {
242
+ invoice: Invoice;
243
+ line_item: InvoiceLineItem;
244
+ }
245
+ }
246
+ export declare const createInvoiceParams: z.ZodObject<{
247
+ customer: z.ZodString;
248
+ currency: z.ZodOptional<z.ZodEnum<{
249
+ FAIR: "FAIR";
250
+ EUR: "EUR";
251
+ USD: "USD";
252
+ GBP: "GBP";
253
+ CHF: "CHF";
254
+ SEK: "SEK";
255
+ NOK: "NOK";
256
+ DKK: "DKK";
257
+ PLN: "PLN";
258
+ CZK: "CZK";
259
+ CAD: "CAD";
260
+ AUD: "AUD";
261
+ JPY: "JPY";
262
+ }>>;
263
+ subscription: z.ZodOptional<z.ZodString>;
264
+ auto_advance: z.ZodOptional<z.ZodBoolean>;
265
+ collection_method: z.ZodOptional<z.ZodEnum<{
266
+ charge_automatically: "charge_automatically";
267
+ send_invoice: "send_invoice";
268
+ }>>;
269
+ days_until_due: z.ZodOptional<z.ZodNumber>;
270
+ due_date: z.ZodOptional<z.ZodNumber>;
271
+ description: z.ZodOptional<z.ZodString>;
272
+ default_payment_method: z.ZodOptional<z.ZodString>;
273
+ discounts: z.ZodOptional<z.ZodArray<z.ZodObject<{
274
+ coupon: z.ZodOptional<z.ZodString>;
275
+ promotion_code: z.ZodOptional<z.ZodString>;
276
+ }, z.core.$strict>>>;
277
+ automatic_tax: z.ZodOptional<z.ZodObject<{
278
+ enabled: z.ZodBoolean;
279
+ }, z.core.$strict>>;
280
+ pending_invoice_items_behavior: z.ZodOptional<z.ZodEnum<{
281
+ include: "include";
282
+ exclude: "exclude";
283
+ }>>;
284
+ metadata: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<Record<string, string>, Record<string, string>>>>;
285
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
286
+ }, z.core.$strict>;
287
+ export type CreateInvoiceParams = z.input<typeof createInvoiceParams>;
288
+ /** Drafts only, except `metadata` and `auto_advance`. A field sent as `""` is cleared. */
289
+ export declare const updateInvoiceParams: z.ZodObject<{
290
+ auto_advance: z.ZodOptional<z.ZodBoolean>;
291
+ collection_method: z.ZodOptional<z.ZodEnum<{
292
+ charge_automatically: "charge_automatically";
293
+ send_invoice: "send_invoice";
294
+ }>>;
295
+ days_until_due: z.ZodOptional<z.ZodNumber>;
296
+ due_date: z.ZodOptional<z.ZodNumber>;
297
+ description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>>;
298
+ default_payment_method: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>>;
299
+ discounts: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
300
+ coupon: z.ZodOptional<z.ZodString>;
301
+ promotion_code: z.ZodOptional<z.ZodString>;
302
+ }, z.core.$strict>>, z.ZodLiteral<"">]>>;
303
+ automatic_tax: z.ZodOptional<z.ZodObject<{
304
+ enabled: z.ZodBoolean;
305
+ }, z.core.$strict>>;
306
+ metadata: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<import("../..").MetadataPatch, Record<string, string>>>>;
307
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
308
+ }, z.core.$strict>;
309
+ export type UpdateInvoiceParams = z.input<typeof updateInvoiceParams>;
310
+ export declare const finalizeInvoiceParams: z.ZodObject<{
311
+ auto_advance: z.ZodOptional<z.ZodBoolean>;
312
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
313
+ }, z.core.$strict>;
314
+ export type FinalizeInvoiceParams = z.input<typeof finalizeInvoiceParams>;
315
+ export declare const payInvoiceParams: z.ZodObject<{
316
+ payment_method: z.ZodOptional<z.ZodString>;
317
+ paid_out_of_band: z.ZodOptional<z.ZodBoolean>;
318
+ off_session: z.ZodOptional<z.ZodBoolean>;
319
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
320
+ }, z.core.$strict>;
321
+ export type PayInvoiceParams = z.input<typeof payInvoiceParams>;
322
+ /** The body of an invoice action that takes nothing but `expand[]` (send, void, mark uncollectible). */
323
+ export declare const invoiceActionParams: z.ZodObject<{
324
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
325
+ }, z.core.$strict>;
326
+ export type InvoiceActionParams = z.input<typeof invoiceActionParams>;
327
+ export declare const listInvoicesQuery: z.ZodObject<{
328
+ limit: z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>, z.ZodTransform<number, number | undefined>>;
329
+ starting_after: z.ZodOptional<z.ZodString>;
330
+ ending_before: z.ZodOptional<z.ZodString>;
331
+ created: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>, z.ZodTransform<import("../..").RangeFilter, number>>, z.ZodPipe<z.ZodObject<{
332
+ gt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
333
+ gte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
334
+ lt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
335
+ lte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
336
+ }, z.core.$strict>, z.ZodTransform<import("../..").RangeFilter, {
337
+ gt?: number | undefined;
338
+ gte?: number | undefined;
339
+ lt?: number | undefined;
340
+ lte?: number | undefined;
341
+ }>>]>>;
342
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
343
+ customer: z.ZodOptional<z.ZodString>;
344
+ subscription: z.ZodOptional<z.ZodString>;
345
+ status: z.ZodOptional<z.ZodEnum<{
346
+ void: "void";
347
+ draft: "draft";
348
+ open: "open";
349
+ paid: "paid";
350
+ uncollectible: "uncollectible";
351
+ }>>;
352
+ collection_method: z.ZodOptional<z.ZodEnum<{
353
+ charge_automatically: "charge_automatically";
354
+ send_invoice: "send_invoice";
355
+ }>>;
356
+ due_date: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>, z.ZodTransform<import("../..").RangeFilter, number>>, z.ZodPipe<z.ZodObject<{
357
+ gt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
358
+ gte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
359
+ lt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
360
+ lte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
361
+ }, z.core.$strict>, z.ZodTransform<import("../..").RangeFilter, {
362
+ gt?: number | undefined;
363
+ gte?: number | undefined;
364
+ lt?: number | undefined;
365
+ lte?: number | undefined;
366
+ }>>]>>;
367
+ }, z.core.$strict>;
368
+ export type InvoiceListParams = z.input<typeof listInvoicesQuery>;
369
+ /** `GET /v1/invoices/upcoming` — a preview, never stored. */
370
+ export declare const upcomingInvoiceQuery: z.ZodObject<{
371
+ customer: z.ZodString;
372
+ subscription: z.ZodOptional<z.ZodString>;
373
+ subscription_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
374
+ id: z.ZodOptional<z.ZodString>;
375
+ price: z.ZodOptional<z.ZodString>;
376
+ quantity: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
377
+ deleted: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
378
+ true: "true";
379
+ false: "false";
380
+ }>]>, z.ZodTransform<boolean, boolean | "true" | "false">>>;
381
+ }, z.core.$strict>>>;
382
+ subscription_proration_behavior: z.ZodOptional<z.ZodEnum<{
383
+ create_prorations: "create_prorations";
384
+ none: "none";
385
+ always_invoice: "always_invoice";
386
+ }>>;
387
+ subscription_proration_date: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
388
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
389
+ }, z.core.$strict>;
390
+ export type UpcomingInvoiceParams = z.input<typeof upcomingInvoiceQuery>;
391
+ export declare const invoiceRoutes: readonly [{
392
+ readonly operationId: "createInvoice";
393
+ readonly method: "post";
394
+ readonly path: "/v1/invoices";
395
+ readonly tag: "Invoices";
396
+ readonly summary: "Create an invoice";
397
+ readonly description: "A draft, for a customer; it finalizes on its own when `auto_advance` is set.";
398
+ readonly auth: "service";
399
+ readonly scope: "payments:write";
400
+ readonly idempotent: true;
401
+ readonly body: z.ZodObject<{
402
+ customer: z.ZodString;
403
+ currency: z.ZodOptional<z.ZodEnum<{
404
+ FAIR: "FAIR";
405
+ EUR: "EUR";
406
+ USD: "USD";
407
+ GBP: "GBP";
408
+ CHF: "CHF";
409
+ SEK: "SEK";
410
+ NOK: "NOK";
411
+ DKK: "DKK";
412
+ PLN: "PLN";
413
+ CZK: "CZK";
414
+ CAD: "CAD";
415
+ AUD: "AUD";
416
+ JPY: "JPY";
417
+ }>>;
418
+ subscription: z.ZodOptional<z.ZodString>;
419
+ auto_advance: z.ZodOptional<z.ZodBoolean>;
420
+ collection_method: z.ZodOptional<z.ZodEnum<{
421
+ charge_automatically: "charge_automatically";
422
+ send_invoice: "send_invoice";
423
+ }>>;
424
+ days_until_due: z.ZodOptional<z.ZodNumber>;
425
+ due_date: z.ZodOptional<z.ZodNumber>;
426
+ description: z.ZodOptional<z.ZodString>;
427
+ default_payment_method: z.ZodOptional<z.ZodString>;
428
+ discounts: z.ZodOptional<z.ZodArray<z.ZodObject<{
429
+ coupon: z.ZodOptional<z.ZodString>;
430
+ promotion_code: z.ZodOptional<z.ZodString>;
431
+ }, z.core.$strict>>>;
432
+ automatic_tax: z.ZodOptional<z.ZodObject<{
433
+ enabled: z.ZodBoolean;
434
+ }, z.core.$strict>>;
435
+ pending_invoice_items_behavior: z.ZodOptional<z.ZodEnum<{
436
+ include: "include";
437
+ exclude: "exclude";
438
+ }>>;
439
+ metadata: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<Record<string, string>, Record<string, string>>>>;
440
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
441
+ }, z.core.$strict>;
442
+ readonly response: z.ZodObject<{
443
+ id: z.ZodString;
444
+ object: z.ZodLiteral<"invoice">;
445
+ livemode: z.ZodBoolean;
446
+ number: z.ZodNullable<z.ZodString>;
447
+ customer: z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>;
448
+ customer_email: z.ZodNullable<z.ZodString>;
449
+ customer_name: z.ZodNullable<z.ZodString>;
450
+ subscription: z.ZodNullable<z.ZodType<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">, z.core.$ZodTypeInternals<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">>>>;
451
+ status: z.ZodEnum<{
452
+ void: "void";
453
+ draft: "draft";
454
+ open: "open";
455
+ paid: "paid";
456
+ uncollectible: "uncollectible";
457
+ }>;
458
+ billing_reason: z.ZodEnum<{
459
+ subscription_cancel: "subscription_cancel";
460
+ subscription_update: "subscription_update";
461
+ manual: "manual";
462
+ subscription_create: "subscription_create";
463
+ subscription_cycle: "subscription_cycle";
464
+ upcoming: "upcoming";
465
+ }>;
466
+ collection_method: z.ZodEnum<{
467
+ charge_automatically: "charge_automatically";
468
+ send_invoice: "send_invoice";
469
+ }>;
470
+ currency: z.ZodEnum<{
471
+ FAIR: "FAIR";
472
+ EUR: "EUR";
473
+ USD: "USD";
474
+ GBP: "GBP";
475
+ CHF: "CHF";
476
+ SEK: "SEK";
477
+ NOK: "NOK";
478
+ DKK: "DKK";
479
+ PLN: "PLN";
480
+ CZK: "CZK";
481
+ CAD: "CAD";
482
+ AUD: "AUD";
483
+ JPY: "JPY";
484
+ }>;
485
+ description: z.ZodNullable<z.ZodString>;
486
+ auto_advance: z.ZodBoolean;
487
+ automatically_finalizes_at: z.ZodNullable<z.ZodNumber>;
488
+ lines: z.ZodObject<{
489
+ object: z.ZodLiteral<"list">;
490
+ data: z.ZodArray<z.ZodObject<{
491
+ id: z.ZodString;
492
+ object: z.ZodLiteral<"line_item">;
493
+ livemode: z.ZodBoolean;
494
+ invoice: z.ZodString;
495
+ type: z.ZodEnum<{
496
+ subscription: "subscription";
497
+ invoiceitem: "invoiceitem";
498
+ }>;
499
+ amount: z.ZodString;
500
+ currency: z.ZodEnum<{
501
+ FAIR: "FAIR";
502
+ EUR: "EUR";
503
+ USD: "USD";
504
+ GBP: "GBP";
505
+ CHF: "CHF";
506
+ SEK: "SEK";
507
+ NOK: "NOK";
508
+ DKK: "DKK";
509
+ PLN: "PLN";
510
+ CZK: "CZK";
511
+ CAD: "CAD";
512
+ AUD: "AUD";
513
+ JPY: "JPY";
514
+ }>;
515
+ description: z.ZodNullable<z.ZodString>;
516
+ discount_amounts: z.ZodArray<z.ZodObject<{
517
+ amount: z.ZodString;
518
+ discount: z.ZodString;
519
+ }, z.core.$strict>>;
520
+ discountable: z.ZodBoolean;
521
+ period: z.ZodObject<{
522
+ start: z.ZodNumber;
523
+ end: z.ZodNumber;
524
+ }, z.core.$strict>;
525
+ price: z.ZodNullable<z.ZodType<import("../..").Ref<"price">, import("../..").Ref<"price">, z.core.$ZodTypeInternals<import("../..").Ref<"price">, import("../..").Ref<"price">>>>;
526
+ quantity: z.ZodNullable<z.ZodNumber>;
527
+ proration: z.ZodBoolean;
528
+ subscription: z.ZodNullable<z.ZodString>;
529
+ subscription_item: z.ZodNullable<z.ZodString>;
530
+ invoice_item: z.ZodNullable<z.ZodString>;
531
+ tax_amounts: z.ZodArray<z.ZodObject<{
532
+ amount: z.ZodString;
533
+ inclusive: z.ZodBoolean;
534
+ tax_calculation: z.ZodNullable<z.ZodString>;
535
+ taxability_reason: z.ZodNullable<z.ZodString>;
536
+ }, z.core.$strict>>;
537
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
538
+ }, z.core.$strict>>;
539
+ has_more: z.ZodBoolean;
540
+ url: z.ZodString;
541
+ }, z.core.$strict>;
542
+ subtotal: z.ZodString;
543
+ subtotal_excluding_tax: z.ZodString;
544
+ total_discount_amounts: z.ZodArray<z.ZodObject<{
545
+ amount: z.ZodString;
546
+ discount: z.ZodString;
547
+ }, z.core.$strict>>;
548
+ discount: z.ZodNullable<z.ZodObject<{
549
+ object: z.ZodLiteral<"discount">;
550
+ coupon: z.ZodString;
551
+ promotion_code: z.ZodNullable<z.ZodString>;
552
+ start: z.ZodNumber;
553
+ end: z.ZodNullable<z.ZodNumber>;
554
+ }, z.core.$strict>>;
555
+ tax: z.ZodNullable<z.ZodString>;
556
+ total: z.ZodString;
557
+ total_excluding_tax: z.ZodString;
558
+ starting_balance: z.ZodString;
559
+ ending_balance: z.ZodNullable<z.ZodString>;
560
+ amount_due: z.ZodString;
561
+ amount_paid: z.ZodString;
562
+ amount_remaining: z.ZodString;
563
+ pre_payment_credit_notes_amount: z.ZodString;
564
+ post_payment_credit_notes_amount: z.ZodString;
565
+ attempt_count: z.ZodNumber;
566
+ attempted: z.ZodBoolean;
567
+ next_payment_attempt: z.ZodNullable<z.ZodNumber>;
568
+ due_date: z.ZodNullable<z.ZodNumber>;
569
+ days_until_due: z.ZodNullable<z.ZodNumber>;
570
+ period_start: z.ZodNumber;
571
+ period_end: z.ZodNumber;
572
+ payment_intent: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">>>>;
573
+ default_payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
574
+ automatic_tax: z.ZodObject<{
575
+ enabled: z.ZodBoolean;
576
+ status: z.ZodNullable<z.ZodEnum<{
577
+ requires_location_inputs: "requires_location_inputs";
578
+ failed: "failed";
579
+ complete: "complete";
580
+ }>>;
581
+ tax_calculation: z.ZodNullable<z.ZodString>;
582
+ }, z.core.$strict>;
583
+ hosted_invoice_url: z.ZodNullable<z.ZodString>;
584
+ invoice_pdf: z.ZodNullable<z.ZodString>;
585
+ last_finalization_error: z.ZodNullable<z.ZodObject<{
586
+ code: z.ZodString;
587
+ message: z.ZodString;
588
+ }, z.core.$strict>>;
589
+ status_transitions: z.ZodObject<{
590
+ finalized_at: z.ZodNullable<z.ZodNumber>;
591
+ paid_at: z.ZodNullable<z.ZodNumber>;
592
+ voided_at: z.ZodNullable<z.ZodNumber>;
593
+ marked_uncollectible_at: z.ZodNullable<z.ZodNumber>;
594
+ }, z.core.$strict>;
595
+ paid_out_of_band: z.ZodBoolean;
596
+ test_clock: z.ZodNullable<z.ZodString>;
597
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
598
+ created: z.ZodNumber;
599
+ effective_at: z.ZodNullable<z.ZodNumber>;
600
+ }, z.core.$strict>;
601
+ readonly sdk: "invoices.create";
602
+ readonly expandable: "invoice";
603
+ }, {
604
+ readonly operationId: "listInvoices";
605
+ readonly method: "get";
606
+ readonly path: "/v1/invoices";
607
+ readonly tag: "Invoices";
608
+ readonly summary: "List invoices";
609
+ readonly auth: "service";
610
+ readonly scope: "payments:read";
611
+ readonly query: z.ZodObject<{
612
+ limit: z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>, z.ZodTransform<number, number | undefined>>;
613
+ starting_after: z.ZodOptional<z.ZodString>;
614
+ ending_before: z.ZodOptional<z.ZodString>;
615
+ created: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>, z.ZodTransform<import("../..").RangeFilter, number>>, z.ZodPipe<z.ZodObject<{
616
+ gt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
617
+ gte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
618
+ lt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
619
+ lte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
620
+ }, z.core.$strict>, z.ZodTransform<import("../..").RangeFilter, {
621
+ gt?: number | undefined;
622
+ gte?: number | undefined;
623
+ lt?: number | undefined;
624
+ lte?: number | undefined;
625
+ }>>]>>;
626
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
627
+ customer: z.ZodOptional<z.ZodString>;
628
+ subscription: z.ZodOptional<z.ZodString>;
629
+ status: z.ZodOptional<z.ZodEnum<{
630
+ void: "void";
631
+ draft: "draft";
632
+ open: "open";
633
+ paid: "paid";
634
+ uncollectible: "uncollectible";
635
+ }>>;
636
+ collection_method: z.ZodOptional<z.ZodEnum<{
637
+ charge_automatically: "charge_automatically";
638
+ send_invoice: "send_invoice";
639
+ }>>;
640
+ due_date: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>, z.ZodTransform<import("../..").RangeFilter, number>>, z.ZodPipe<z.ZodObject<{
641
+ gt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
642
+ gte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
643
+ lt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
644
+ lte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
645
+ }, z.core.$strict>, z.ZodTransform<import("../..").RangeFilter, {
646
+ gt?: number | undefined;
647
+ gte?: number | undefined;
648
+ lt?: number | undefined;
649
+ lte?: number | undefined;
650
+ }>>]>>;
651
+ }, z.core.$strict>;
652
+ readonly response: z.ZodObject<{
653
+ object: z.ZodLiteral<"list">;
654
+ data: z.ZodArray<z.ZodObject<{
655
+ id: z.ZodString;
656
+ object: z.ZodLiteral<"invoice">;
657
+ livemode: z.ZodBoolean;
658
+ number: z.ZodNullable<z.ZodString>;
659
+ customer: z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>;
660
+ customer_email: z.ZodNullable<z.ZodString>;
661
+ customer_name: z.ZodNullable<z.ZodString>;
662
+ subscription: z.ZodNullable<z.ZodType<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">, z.core.$ZodTypeInternals<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">>>>;
663
+ status: z.ZodEnum<{
664
+ void: "void";
665
+ draft: "draft";
666
+ open: "open";
667
+ paid: "paid";
668
+ uncollectible: "uncollectible";
669
+ }>;
670
+ billing_reason: z.ZodEnum<{
671
+ subscription_cancel: "subscription_cancel";
672
+ subscription_update: "subscription_update";
673
+ manual: "manual";
674
+ subscription_create: "subscription_create";
675
+ subscription_cycle: "subscription_cycle";
676
+ upcoming: "upcoming";
677
+ }>;
678
+ collection_method: z.ZodEnum<{
679
+ charge_automatically: "charge_automatically";
680
+ send_invoice: "send_invoice";
681
+ }>;
682
+ currency: z.ZodEnum<{
683
+ FAIR: "FAIR";
684
+ EUR: "EUR";
685
+ USD: "USD";
686
+ GBP: "GBP";
687
+ CHF: "CHF";
688
+ SEK: "SEK";
689
+ NOK: "NOK";
690
+ DKK: "DKK";
691
+ PLN: "PLN";
692
+ CZK: "CZK";
693
+ CAD: "CAD";
694
+ AUD: "AUD";
695
+ JPY: "JPY";
696
+ }>;
697
+ description: z.ZodNullable<z.ZodString>;
698
+ auto_advance: z.ZodBoolean;
699
+ automatically_finalizes_at: z.ZodNullable<z.ZodNumber>;
700
+ lines: z.ZodObject<{
701
+ object: z.ZodLiteral<"list">;
702
+ data: z.ZodArray<z.ZodObject<{
703
+ id: z.ZodString;
704
+ object: z.ZodLiteral<"line_item">;
705
+ livemode: z.ZodBoolean;
706
+ invoice: z.ZodString;
707
+ type: z.ZodEnum<{
708
+ subscription: "subscription";
709
+ invoiceitem: "invoiceitem";
710
+ }>;
711
+ amount: z.ZodString;
712
+ currency: z.ZodEnum<{
713
+ FAIR: "FAIR";
714
+ EUR: "EUR";
715
+ USD: "USD";
716
+ GBP: "GBP";
717
+ CHF: "CHF";
718
+ SEK: "SEK";
719
+ NOK: "NOK";
720
+ DKK: "DKK";
721
+ PLN: "PLN";
722
+ CZK: "CZK";
723
+ CAD: "CAD";
724
+ AUD: "AUD";
725
+ JPY: "JPY";
726
+ }>;
727
+ description: z.ZodNullable<z.ZodString>;
728
+ discount_amounts: z.ZodArray<z.ZodObject<{
729
+ amount: z.ZodString;
730
+ discount: z.ZodString;
731
+ }, z.core.$strict>>;
732
+ discountable: z.ZodBoolean;
733
+ period: z.ZodObject<{
734
+ start: z.ZodNumber;
735
+ end: z.ZodNumber;
736
+ }, z.core.$strict>;
737
+ price: z.ZodNullable<z.ZodType<import("../..").Ref<"price">, import("../..").Ref<"price">, z.core.$ZodTypeInternals<import("../..").Ref<"price">, import("../..").Ref<"price">>>>;
738
+ quantity: z.ZodNullable<z.ZodNumber>;
739
+ proration: z.ZodBoolean;
740
+ subscription: z.ZodNullable<z.ZodString>;
741
+ subscription_item: z.ZodNullable<z.ZodString>;
742
+ invoice_item: z.ZodNullable<z.ZodString>;
743
+ tax_amounts: z.ZodArray<z.ZodObject<{
744
+ amount: z.ZodString;
745
+ inclusive: z.ZodBoolean;
746
+ tax_calculation: z.ZodNullable<z.ZodString>;
747
+ taxability_reason: z.ZodNullable<z.ZodString>;
748
+ }, z.core.$strict>>;
749
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
750
+ }, z.core.$strict>>;
751
+ has_more: z.ZodBoolean;
752
+ url: z.ZodString;
753
+ }, z.core.$strict>;
754
+ subtotal: z.ZodString;
755
+ subtotal_excluding_tax: z.ZodString;
756
+ total_discount_amounts: z.ZodArray<z.ZodObject<{
757
+ amount: z.ZodString;
758
+ discount: z.ZodString;
759
+ }, z.core.$strict>>;
760
+ discount: z.ZodNullable<z.ZodObject<{
761
+ object: z.ZodLiteral<"discount">;
762
+ coupon: z.ZodString;
763
+ promotion_code: z.ZodNullable<z.ZodString>;
764
+ start: z.ZodNumber;
765
+ end: z.ZodNullable<z.ZodNumber>;
766
+ }, z.core.$strict>>;
767
+ tax: z.ZodNullable<z.ZodString>;
768
+ total: z.ZodString;
769
+ total_excluding_tax: z.ZodString;
770
+ starting_balance: z.ZodString;
771
+ ending_balance: z.ZodNullable<z.ZodString>;
772
+ amount_due: z.ZodString;
773
+ amount_paid: z.ZodString;
774
+ amount_remaining: z.ZodString;
775
+ pre_payment_credit_notes_amount: z.ZodString;
776
+ post_payment_credit_notes_amount: z.ZodString;
777
+ attempt_count: z.ZodNumber;
778
+ attempted: z.ZodBoolean;
779
+ next_payment_attempt: z.ZodNullable<z.ZodNumber>;
780
+ due_date: z.ZodNullable<z.ZodNumber>;
781
+ days_until_due: z.ZodNullable<z.ZodNumber>;
782
+ period_start: z.ZodNumber;
783
+ period_end: z.ZodNumber;
784
+ payment_intent: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">>>>;
785
+ default_payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
786
+ automatic_tax: z.ZodObject<{
787
+ enabled: z.ZodBoolean;
788
+ status: z.ZodNullable<z.ZodEnum<{
789
+ requires_location_inputs: "requires_location_inputs";
790
+ failed: "failed";
791
+ complete: "complete";
792
+ }>>;
793
+ tax_calculation: z.ZodNullable<z.ZodString>;
794
+ }, z.core.$strict>;
795
+ hosted_invoice_url: z.ZodNullable<z.ZodString>;
796
+ invoice_pdf: z.ZodNullable<z.ZodString>;
797
+ last_finalization_error: z.ZodNullable<z.ZodObject<{
798
+ code: z.ZodString;
799
+ message: z.ZodString;
800
+ }, z.core.$strict>>;
801
+ status_transitions: z.ZodObject<{
802
+ finalized_at: z.ZodNullable<z.ZodNumber>;
803
+ paid_at: z.ZodNullable<z.ZodNumber>;
804
+ voided_at: z.ZodNullable<z.ZodNumber>;
805
+ marked_uncollectible_at: z.ZodNullable<z.ZodNumber>;
806
+ }, z.core.$strict>;
807
+ paid_out_of_band: z.ZodBoolean;
808
+ test_clock: z.ZodNullable<z.ZodString>;
809
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
810
+ created: z.ZodNumber;
811
+ effective_at: z.ZodNullable<z.ZodNumber>;
812
+ }, z.core.$strict>>;
813
+ has_more: z.ZodBoolean;
814
+ url: z.ZodString;
815
+ }, z.core.$strict>;
816
+ readonly sdk: "invoices.list";
817
+ readonly expandable: "invoice";
818
+ }, {
819
+ readonly operationId: "retrieveUpcomingInvoice";
820
+ readonly method: "get";
821
+ readonly path: "/v1/invoices/upcoming";
822
+ readonly tag: "Invoices";
823
+ readonly summary: "Preview the upcoming invoice";
824
+ readonly description: "The invoice a customer's subscription will renew with — or, with `subscription_items`, the one a change would produce. Computed, never stored (its `id` is empty). 404 when the customer has no subscription that will renew.";
825
+ readonly auth: "service";
826
+ readonly scope: "payments:read";
827
+ readonly query: z.ZodObject<{
828
+ customer: z.ZodString;
829
+ subscription: z.ZodOptional<z.ZodString>;
830
+ subscription_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
831
+ id: z.ZodOptional<z.ZodString>;
832
+ price: z.ZodOptional<z.ZodString>;
833
+ quantity: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
834
+ deleted: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
835
+ true: "true";
836
+ false: "false";
837
+ }>]>, z.ZodTransform<boolean, boolean | "true" | "false">>>;
838
+ }, z.core.$strict>>>;
839
+ subscription_proration_behavior: z.ZodOptional<z.ZodEnum<{
840
+ create_prorations: "create_prorations";
841
+ none: "none";
842
+ always_invoice: "always_invoice";
843
+ }>>;
844
+ subscription_proration_date: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
845
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
846
+ }, z.core.$strict>;
847
+ readonly response: z.ZodObject<{
848
+ id: z.ZodString;
849
+ object: z.ZodLiteral<"invoice">;
850
+ livemode: z.ZodBoolean;
851
+ number: z.ZodNullable<z.ZodString>;
852
+ customer: z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>;
853
+ customer_email: z.ZodNullable<z.ZodString>;
854
+ customer_name: z.ZodNullable<z.ZodString>;
855
+ subscription: z.ZodNullable<z.ZodType<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">, z.core.$ZodTypeInternals<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">>>>;
856
+ status: z.ZodEnum<{
857
+ void: "void";
858
+ draft: "draft";
859
+ open: "open";
860
+ paid: "paid";
861
+ uncollectible: "uncollectible";
862
+ }>;
863
+ billing_reason: z.ZodEnum<{
864
+ subscription_cancel: "subscription_cancel";
865
+ subscription_update: "subscription_update";
866
+ manual: "manual";
867
+ subscription_create: "subscription_create";
868
+ subscription_cycle: "subscription_cycle";
869
+ upcoming: "upcoming";
870
+ }>;
871
+ collection_method: z.ZodEnum<{
872
+ charge_automatically: "charge_automatically";
873
+ send_invoice: "send_invoice";
874
+ }>;
875
+ currency: z.ZodEnum<{
876
+ FAIR: "FAIR";
877
+ EUR: "EUR";
878
+ USD: "USD";
879
+ GBP: "GBP";
880
+ CHF: "CHF";
881
+ SEK: "SEK";
882
+ NOK: "NOK";
883
+ DKK: "DKK";
884
+ PLN: "PLN";
885
+ CZK: "CZK";
886
+ CAD: "CAD";
887
+ AUD: "AUD";
888
+ JPY: "JPY";
889
+ }>;
890
+ description: z.ZodNullable<z.ZodString>;
891
+ auto_advance: z.ZodBoolean;
892
+ automatically_finalizes_at: z.ZodNullable<z.ZodNumber>;
893
+ lines: z.ZodObject<{
894
+ object: z.ZodLiteral<"list">;
895
+ data: z.ZodArray<z.ZodObject<{
896
+ id: z.ZodString;
897
+ object: z.ZodLiteral<"line_item">;
898
+ livemode: z.ZodBoolean;
899
+ invoice: z.ZodString;
900
+ type: z.ZodEnum<{
901
+ subscription: "subscription";
902
+ invoiceitem: "invoiceitem";
903
+ }>;
904
+ amount: z.ZodString;
905
+ currency: z.ZodEnum<{
906
+ FAIR: "FAIR";
907
+ EUR: "EUR";
908
+ USD: "USD";
909
+ GBP: "GBP";
910
+ CHF: "CHF";
911
+ SEK: "SEK";
912
+ NOK: "NOK";
913
+ DKK: "DKK";
914
+ PLN: "PLN";
915
+ CZK: "CZK";
916
+ CAD: "CAD";
917
+ AUD: "AUD";
918
+ JPY: "JPY";
919
+ }>;
920
+ description: z.ZodNullable<z.ZodString>;
921
+ discount_amounts: z.ZodArray<z.ZodObject<{
922
+ amount: z.ZodString;
923
+ discount: z.ZodString;
924
+ }, z.core.$strict>>;
925
+ discountable: z.ZodBoolean;
926
+ period: z.ZodObject<{
927
+ start: z.ZodNumber;
928
+ end: z.ZodNumber;
929
+ }, z.core.$strict>;
930
+ price: z.ZodNullable<z.ZodType<import("../..").Ref<"price">, import("../..").Ref<"price">, z.core.$ZodTypeInternals<import("../..").Ref<"price">, import("../..").Ref<"price">>>>;
931
+ quantity: z.ZodNullable<z.ZodNumber>;
932
+ proration: z.ZodBoolean;
933
+ subscription: z.ZodNullable<z.ZodString>;
934
+ subscription_item: z.ZodNullable<z.ZodString>;
935
+ invoice_item: z.ZodNullable<z.ZodString>;
936
+ tax_amounts: z.ZodArray<z.ZodObject<{
937
+ amount: z.ZodString;
938
+ inclusive: z.ZodBoolean;
939
+ tax_calculation: z.ZodNullable<z.ZodString>;
940
+ taxability_reason: z.ZodNullable<z.ZodString>;
941
+ }, z.core.$strict>>;
942
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
943
+ }, z.core.$strict>>;
944
+ has_more: z.ZodBoolean;
945
+ url: z.ZodString;
946
+ }, z.core.$strict>;
947
+ subtotal: z.ZodString;
948
+ subtotal_excluding_tax: z.ZodString;
949
+ total_discount_amounts: z.ZodArray<z.ZodObject<{
950
+ amount: z.ZodString;
951
+ discount: z.ZodString;
952
+ }, z.core.$strict>>;
953
+ discount: z.ZodNullable<z.ZodObject<{
954
+ object: z.ZodLiteral<"discount">;
955
+ coupon: z.ZodString;
956
+ promotion_code: z.ZodNullable<z.ZodString>;
957
+ start: z.ZodNumber;
958
+ end: z.ZodNullable<z.ZodNumber>;
959
+ }, z.core.$strict>>;
960
+ tax: z.ZodNullable<z.ZodString>;
961
+ total: z.ZodString;
962
+ total_excluding_tax: z.ZodString;
963
+ starting_balance: z.ZodString;
964
+ ending_balance: z.ZodNullable<z.ZodString>;
965
+ amount_due: z.ZodString;
966
+ amount_paid: z.ZodString;
967
+ amount_remaining: z.ZodString;
968
+ pre_payment_credit_notes_amount: z.ZodString;
969
+ post_payment_credit_notes_amount: z.ZodString;
970
+ attempt_count: z.ZodNumber;
971
+ attempted: z.ZodBoolean;
972
+ next_payment_attempt: z.ZodNullable<z.ZodNumber>;
973
+ due_date: z.ZodNullable<z.ZodNumber>;
974
+ days_until_due: z.ZodNullable<z.ZodNumber>;
975
+ period_start: z.ZodNumber;
976
+ period_end: z.ZodNumber;
977
+ payment_intent: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">>>>;
978
+ default_payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
979
+ automatic_tax: z.ZodObject<{
980
+ enabled: z.ZodBoolean;
981
+ status: z.ZodNullable<z.ZodEnum<{
982
+ requires_location_inputs: "requires_location_inputs";
983
+ failed: "failed";
984
+ complete: "complete";
985
+ }>>;
986
+ tax_calculation: z.ZodNullable<z.ZodString>;
987
+ }, z.core.$strict>;
988
+ hosted_invoice_url: z.ZodNullable<z.ZodString>;
989
+ invoice_pdf: z.ZodNullable<z.ZodString>;
990
+ last_finalization_error: z.ZodNullable<z.ZodObject<{
991
+ code: z.ZodString;
992
+ message: z.ZodString;
993
+ }, z.core.$strict>>;
994
+ status_transitions: z.ZodObject<{
995
+ finalized_at: z.ZodNullable<z.ZodNumber>;
996
+ paid_at: z.ZodNullable<z.ZodNumber>;
997
+ voided_at: z.ZodNullable<z.ZodNumber>;
998
+ marked_uncollectible_at: z.ZodNullable<z.ZodNumber>;
999
+ }, z.core.$strict>;
1000
+ paid_out_of_band: z.ZodBoolean;
1001
+ test_clock: z.ZodNullable<z.ZodString>;
1002
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
1003
+ created: z.ZodNumber;
1004
+ effective_at: z.ZodNullable<z.ZodNumber>;
1005
+ }, z.core.$strict>;
1006
+ readonly sdk: "invoices.retrieveUpcoming";
1007
+ readonly expandable: "invoice";
1008
+ }, {
1009
+ readonly operationId: "retrieveInvoice";
1010
+ readonly method: "get";
1011
+ readonly path: "/v1/invoices/{id}";
1012
+ readonly tag: "Invoices";
1013
+ readonly summary: "Retrieve an invoice";
1014
+ readonly auth: "service";
1015
+ readonly scope: "payments:read";
1016
+ readonly params: {
1017
+ readonly id: "The invoice (`in_…`).";
1018
+ };
1019
+ readonly query: z.ZodObject<{
1020
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
1021
+ }, z.core.$strict>;
1022
+ readonly response: z.ZodObject<{
1023
+ id: z.ZodString;
1024
+ object: z.ZodLiteral<"invoice">;
1025
+ livemode: z.ZodBoolean;
1026
+ number: z.ZodNullable<z.ZodString>;
1027
+ customer: z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>;
1028
+ customer_email: z.ZodNullable<z.ZodString>;
1029
+ customer_name: z.ZodNullable<z.ZodString>;
1030
+ subscription: z.ZodNullable<z.ZodType<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">, z.core.$ZodTypeInternals<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">>>>;
1031
+ status: z.ZodEnum<{
1032
+ void: "void";
1033
+ draft: "draft";
1034
+ open: "open";
1035
+ paid: "paid";
1036
+ uncollectible: "uncollectible";
1037
+ }>;
1038
+ billing_reason: z.ZodEnum<{
1039
+ subscription_cancel: "subscription_cancel";
1040
+ subscription_update: "subscription_update";
1041
+ manual: "manual";
1042
+ subscription_create: "subscription_create";
1043
+ subscription_cycle: "subscription_cycle";
1044
+ upcoming: "upcoming";
1045
+ }>;
1046
+ collection_method: z.ZodEnum<{
1047
+ charge_automatically: "charge_automatically";
1048
+ send_invoice: "send_invoice";
1049
+ }>;
1050
+ currency: z.ZodEnum<{
1051
+ FAIR: "FAIR";
1052
+ EUR: "EUR";
1053
+ USD: "USD";
1054
+ GBP: "GBP";
1055
+ CHF: "CHF";
1056
+ SEK: "SEK";
1057
+ NOK: "NOK";
1058
+ DKK: "DKK";
1059
+ PLN: "PLN";
1060
+ CZK: "CZK";
1061
+ CAD: "CAD";
1062
+ AUD: "AUD";
1063
+ JPY: "JPY";
1064
+ }>;
1065
+ description: z.ZodNullable<z.ZodString>;
1066
+ auto_advance: z.ZodBoolean;
1067
+ automatically_finalizes_at: z.ZodNullable<z.ZodNumber>;
1068
+ lines: z.ZodObject<{
1069
+ object: z.ZodLiteral<"list">;
1070
+ data: z.ZodArray<z.ZodObject<{
1071
+ id: z.ZodString;
1072
+ object: z.ZodLiteral<"line_item">;
1073
+ livemode: z.ZodBoolean;
1074
+ invoice: z.ZodString;
1075
+ type: z.ZodEnum<{
1076
+ subscription: "subscription";
1077
+ invoiceitem: "invoiceitem";
1078
+ }>;
1079
+ amount: z.ZodString;
1080
+ currency: z.ZodEnum<{
1081
+ FAIR: "FAIR";
1082
+ EUR: "EUR";
1083
+ USD: "USD";
1084
+ GBP: "GBP";
1085
+ CHF: "CHF";
1086
+ SEK: "SEK";
1087
+ NOK: "NOK";
1088
+ DKK: "DKK";
1089
+ PLN: "PLN";
1090
+ CZK: "CZK";
1091
+ CAD: "CAD";
1092
+ AUD: "AUD";
1093
+ JPY: "JPY";
1094
+ }>;
1095
+ description: z.ZodNullable<z.ZodString>;
1096
+ discount_amounts: z.ZodArray<z.ZodObject<{
1097
+ amount: z.ZodString;
1098
+ discount: z.ZodString;
1099
+ }, z.core.$strict>>;
1100
+ discountable: z.ZodBoolean;
1101
+ period: z.ZodObject<{
1102
+ start: z.ZodNumber;
1103
+ end: z.ZodNumber;
1104
+ }, z.core.$strict>;
1105
+ price: z.ZodNullable<z.ZodType<import("../..").Ref<"price">, import("../..").Ref<"price">, z.core.$ZodTypeInternals<import("../..").Ref<"price">, import("../..").Ref<"price">>>>;
1106
+ quantity: z.ZodNullable<z.ZodNumber>;
1107
+ proration: z.ZodBoolean;
1108
+ subscription: z.ZodNullable<z.ZodString>;
1109
+ subscription_item: z.ZodNullable<z.ZodString>;
1110
+ invoice_item: z.ZodNullable<z.ZodString>;
1111
+ tax_amounts: z.ZodArray<z.ZodObject<{
1112
+ amount: z.ZodString;
1113
+ inclusive: z.ZodBoolean;
1114
+ tax_calculation: z.ZodNullable<z.ZodString>;
1115
+ taxability_reason: z.ZodNullable<z.ZodString>;
1116
+ }, z.core.$strict>>;
1117
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
1118
+ }, z.core.$strict>>;
1119
+ has_more: z.ZodBoolean;
1120
+ url: z.ZodString;
1121
+ }, z.core.$strict>;
1122
+ subtotal: z.ZodString;
1123
+ subtotal_excluding_tax: z.ZodString;
1124
+ total_discount_amounts: z.ZodArray<z.ZodObject<{
1125
+ amount: z.ZodString;
1126
+ discount: z.ZodString;
1127
+ }, z.core.$strict>>;
1128
+ discount: z.ZodNullable<z.ZodObject<{
1129
+ object: z.ZodLiteral<"discount">;
1130
+ coupon: z.ZodString;
1131
+ promotion_code: z.ZodNullable<z.ZodString>;
1132
+ start: z.ZodNumber;
1133
+ end: z.ZodNullable<z.ZodNumber>;
1134
+ }, z.core.$strict>>;
1135
+ tax: z.ZodNullable<z.ZodString>;
1136
+ total: z.ZodString;
1137
+ total_excluding_tax: z.ZodString;
1138
+ starting_balance: z.ZodString;
1139
+ ending_balance: z.ZodNullable<z.ZodString>;
1140
+ amount_due: z.ZodString;
1141
+ amount_paid: z.ZodString;
1142
+ amount_remaining: z.ZodString;
1143
+ pre_payment_credit_notes_amount: z.ZodString;
1144
+ post_payment_credit_notes_amount: z.ZodString;
1145
+ attempt_count: z.ZodNumber;
1146
+ attempted: z.ZodBoolean;
1147
+ next_payment_attempt: z.ZodNullable<z.ZodNumber>;
1148
+ due_date: z.ZodNullable<z.ZodNumber>;
1149
+ days_until_due: z.ZodNullable<z.ZodNumber>;
1150
+ period_start: z.ZodNumber;
1151
+ period_end: z.ZodNumber;
1152
+ payment_intent: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">>>>;
1153
+ default_payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
1154
+ automatic_tax: z.ZodObject<{
1155
+ enabled: z.ZodBoolean;
1156
+ status: z.ZodNullable<z.ZodEnum<{
1157
+ requires_location_inputs: "requires_location_inputs";
1158
+ failed: "failed";
1159
+ complete: "complete";
1160
+ }>>;
1161
+ tax_calculation: z.ZodNullable<z.ZodString>;
1162
+ }, z.core.$strict>;
1163
+ hosted_invoice_url: z.ZodNullable<z.ZodString>;
1164
+ invoice_pdf: z.ZodNullable<z.ZodString>;
1165
+ last_finalization_error: z.ZodNullable<z.ZodObject<{
1166
+ code: z.ZodString;
1167
+ message: z.ZodString;
1168
+ }, z.core.$strict>>;
1169
+ status_transitions: z.ZodObject<{
1170
+ finalized_at: z.ZodNullable<z.ZodNumber>;
1171
+ paid_at: z.ZodNullable<z.ZodNumber>;
1172
+ voided_at: z.ZodNullable<z.ZodNumber>;
1173
+ marked_uncollectible_at: z.ZodNullable<z.ZodNumber>;
1174
+ }, z.core.$strict>;
1175
+ paid_out_of_band: z.ZodBoolean;
1176
+ test_clock: z.ZodNullable<z.ZodString>;
1177
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
1178
+ created: z.ZodNumber;
1179
+ effective_at: z.ZodNullable<z.ZodNumber>;
1180
+ }, z.core.$strict>;
1181
+ readonly sdk: "invoices.retrieve";
1182
+ readonly expandable: "invoice";
1183
+ }, {
1184
+ readonly operationId: "updateInvoice";
1185
+ readonly method: "post";
1186
+ readonly path: "/v1/invoices/{id}";
1187
+ readonly tag: "Invoices";
1188
+ readonly summary: "Update an invoice";
1189
+ readonly description: "Drafts only, except `metadata` and `auto_advance`. A field sent as `\"\"` is cleared; `metadata` is a patch.";
1190
+ readonly auth: "service";
1191
+ readonly scope: "payments:write";
1192
+ readonly idempotent: true;
1193
+ readonly params: {
1194
+ readonly id: "The invoice (`in_…`).";
1195
+ };
1196
+ readonly body: z.ZodObject<{
1197
+ auto_advance: z.ZodOptional<z.ZodBoolean>;
1198
+ collection_method: z.ZodOptional<z.ZodEnum<{
1199
+ charge_automatically: "charge_automatically";
1200
+ send_invoice: "send_invoice";
1201
+ }>>;
1202
+ days_until_due: z.ZodOptional<z.ZodNumber>;
1203
+ due_date: z.ZodOptional<z.ZodNumber>;
1204
+ description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>>;
1205
+ default_payment_method: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>>;
1206
+ discounts: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
1207
+ coupon: z.ZodOptional<z.ZodString>;
1208
+ promotion_code: z.ZodOptional<z.ZodString>;
1209
+ }, z.core.$strict>>, z.ZodLiteral<"">]>>;
1210
+ automatic_tax: z.ZodOptional<z.ZodObject<{
1211
+ enabled: z.ZodBoolean;
1212
+ }, z.core.$strict>>;
1213
+ metadata: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<import("../..").MetadataPatch, Record<string, string>>>>;
1214
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
1215
+ }, z.core.$strict>;
1216
+ readonly response: z.ZodObject<{
1217
+ id: z.ZodString;
1218
+ object: z.ZodLiteral<"invoice">;
1219
+ livemode: z.ZodBoolean;
1220
+ number: z.ZodNullable<z.ZodString>;
1221
+ customer: z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>;
1222
+ customer_email: z.ZodNullable<z.ZodString>;
1223
+ customer_name: z.ZodNullable<z.ZodString>;
1224
+ subscription: z.ZodNullable<z.ZodType<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">, z.core.$ZodTypeInternals<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">>>>;
1225
+ status: z.ZodEnum<{
1226
+ void: "void";
1227
+ draft: "draft";
1228
+ open: "open";
1229
+ paid: "paid";
1230
+ uncollectible: "uncollectible";
1231
+ }>;
1232
+ billing_reason: z.ZodEnum<{
1233
+ subscription_cancel: "subscription_cancel";
1234
+ subscription_update: "subscription_update";
1235
+ manual: "manual";
1236
+ subscription_create: "subscription_create";
1237
+ subscription_cycle: "subscription_cycle";
1238
+ upcoming: "upcoming";
1239
+ }>;
1240
+ collection_method: z.ZodEnum<{
1241
+ charge_automatically: "charge_automatically";
1242
+ send_invoice: "send_invoice";
1243
+ }>;
1244
+ currency: z.ZodEnum<{
1245
+ FAIR: "FAIR";
1246
+ EUR: "EUR";
1247
+ USD: "USD";
1248
+ GBP: "GBP";
1249
+ CHF: "CHF";
1250
+ SEK: "SEK";
1251
+ NOK: "NOK";
1252
+ DKK: "DKK";
1253
+ PLN: "PLN";
1254
+ CZK: "CZK";
1255
+ CAD: "CAD";
1256
+ AUD: "AUD";
1257
+ JPY: "JPY";
1258
+ }>;
1259
+ description: z.ZodNullable<z.ZodString>;
1260
+ auto_advance: z.ZodBoolean;
1261
+ automatically_finalizes_at: z.ZodNullable<z.ZodNumber>;
1262
+ lines: z.ZodObject<{
1263
+ object: z.ZodLiteral<"list">;
1264
+ data: z.ZodArray<z.ZodObject<{
1265
+ id: z.ZodString;
1266
+ object: z.ZodLiteral<"line_item">;
1267
+ livemode: z.ZodBoolean;
1268
+ invoice: z.ZodString;
1269
+ type: z.ZodEnum<{
1270
+ subscription: "subscription";
1271
+ invoiceitem: "invoiceitem";
1272
+ }>;
1273
+ amount: z.ZodString;
1274
+ currency: z.ZodEnum<{
1275
+ FAIR: "FAIR";
1276
+ EUR: "EUR";
1277
+ USD: "USD";
1278
+ GBP: "GBP";
1279
+ CHF: "CHF";
1280
+ SEK: "SEK";
1281
+ NOK: "NOK";
1282
+ DKK: "DKK";
1283
+ PLN: "PLN";
1284
+ CZK: "CZK";
1285
+ CAD: "CAD";
1286
+ AUD: "AUD";
1287
+ JPY: "JPY";
1288
+ }>;
1289
+ description: z.ZodNullable<z.ZodString>;
1290
+ discount_amounts: z.ZodArray<z.ZodObject<{
1291
+ amount: z.ZodString;
1292
+ discount: z.ZodString;
1293
+ }, z.core.$strict>>;
1294
+ discountable: z.ZodBoolean;
1295
+ period: z.ZodObject<{
1296
+ start: z.ZodNumber;
1297
+ end: z.ZodNumber;
1298
+ }, z.core.$strict>;
1299
+ price: z.ZodNullable<z.ZodType<import("../..").Ref<"price">, import("../..").Ref<"price">, z.core.$ZodTypeInternals<import("../..").Ref<"price">, import("../..").Ref<"price">>>>;
1300
+ quantity: z.ZodNullable<z.ZodNumber>;
1301
+ proration: z.ZodBoolean;
1302
+ subscription: z.ZodNullable<z.ZodString>;
1303
+ subscription_item: z.ZodNullable<z.ZodString>;
1304
+ invoice_item: z.ZodNullable<z.ZodString>;
1305
+ tax_amounts: z.ZodArray<z.ZodObject<{
1306
+ amount: z.ZodString;
1307
+ inclusive: z.ZodBoolean;
1308
+ tax_calculation: z.ZodNullable<z.ZodString>;
1309
+ taxability_reason: z.ZodNullable<z.ZodString>;
1310
+ }, z.core.$strict>>;
1311
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
1312
+ }, z.core.$strict>>;
1313
+ has_more: z.ZodBoolean;
1314
+ url: z.ZodString;
1315
+ }, z.core.$strict>;
1316
+ subtotal: z.ZodString;
1317
+ subtotal_excluding_tax: z.ZodString;
1318
+ total_discount_amounts: z.ZodArray<z.ZodObject<{
1319
+ amount: z.ZodString;
1320
+ discount: z.ZodString;
1321
+ }, z.core.$strict>>;
1322
+ discount: z.ZodNullable<z.ZodObject<{
1323
+ object: z.ZodLiteral<"discount">;
1324
+ coupon: z.ZodString;
1325
+ promotion_code: z.ZodNullable<z.ZodString>;
1326
+ start: z.ZodNumber;
1327
+ end: z.ZodNullable<z.ZodNumber>;
1328
+ }, z.core.$strict>>;
1329
+ tax: z.ZodNullable<z.ZodString>;
1330
+ total: z.ZodString;
1331
+ total_excluding_tax: z.ZodString;
1332
+ starting_balance: z.ZodString;
1333
+ ending_balance: z.ZodNullable<z.ZodString>;
1334
+ amount_due: z.ZodString;
1335
+ amount_paid: z.ZodString;
1336
+ amount_remaining: z.ZodString;
1337
+ pre_payment_credit_notes_amount: z.ZodString;
1338
+ post_payment_credit_notes_amount: z.ZodString;
1339
+ attempt_count: z.ZodNumber;
1340
+ attempted: z.ZodBoolean;
1341
+ next_payment_attempt: z.ZodNullable<z.ZodNumber>;
1342
+ due_date: z.ZodNullable<z.ZodNumber>;
1343
+ days_until_due: z.ZodNullable<z.ZodNumber>;
1344
+ period_start: z.ZodNumber;
1345
+ period_end: z.ZodNumber;
1346
+ payment_intent: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">>>>;
1347
+ default_payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
1348
+ automatic_tax: z.ZodObject<{
1349
+ enabled: z.ZodBoolean;
1350
+ status: z.ZodNullable<z.ZodEnum<{
1351
+ requires_location_inputs: "requires_location_inputs";
1352
+ failed: "failed";
1353
+ complete: "complete";
1354
+ }>>;
1355
+ tax_calculation: z.ZodNullable<z.ZodString>;
1356
+ }, z.core.$strict>;
1357
+ hosted_invoice_url: z.ZodNullable<z.ZodString>;
1358
+ invoice_pdf: z.ZodNullable<z.ZodString>;
1359
+ last_finalization_error: z.ZodNullable<z.ZodObject<{
1360
+ code: z.ZodString;
1361
+ message: z.ZodString;
1362
+ }, z.core.$strict>>;
1363
+ status_transitions: z.ZodObject<{
1364
+ finalized_at: z.ZodNullable<z.ZodNumber>;
1365
+ paid_at: z.ZodNullable<z.ZodNumber>;
1366
+ voided_at: z.ZodNullable<z.ZodNumber>;
1367
+ marked_uncollectible_at: z.ZodNullable<z.ZodNumber>;
1368
+ }, z.core.$strict>;
1369
+ paid_out_of_band: z.ZodBoolean;
1370
+ test_clock: z.ZodNullable<z.ZodString>;
1371
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
1372
+ created: z.ZodNumber;
1373
+ effective_at: z.ZodNullable<z.ZodNumber>;
1374
+ }, z.core.$strict>;
1375
+ readonly sdk: "invoices.update";
1376
+ readonly expandable: "invoice";
1377
+ }, {
1378
+ readonly operationId: "deleteInvoice";
1379
+ readonly method: "delete";
1380
+ readonly path: "/v1/invoices/{id}";
1381
+ readonly tag: "Invoices";
1382
+ readonly summary: "Delete a draft invoice";
1383
+ readonly description: "Only a draft can be deleted; a finalized invoice is voided instead.";
1384
+ readonly auth: "service";
1385
+ readonly scope: "payments:write";
1386
+ readonly params: {
1387
+ readonly id: "The invoice (`in_…`).";
1388
+ };
1389
+ readonly response: z.ZodObject<{
1390
+ id: z.ZodString;
1391
+ object: z.ZodLiteral<"invoice">;
1392
+ deleted: z.ZodLiteral<true>;
1393
+ }, z.core.$strict>;
1394
+ readonly sdk: "invoices.del";
1395
+ }, {
1396
+ readonly operationId: "finalizeInvoice";
1397
+ readonly method: "post";
1398
+ readonly path: "/v1/invoices/{id}/finalize";
1399
+ readonly tag: "Invoices";
1400
+ readonly summary: "Finalize a draft invoice";
1401
+ readonly description: "It gets its number, its tax and its payer-facing page.";
1402
+ readonly auth: "service";
1403
+ readonly scope: "payments:write";
1404
+ readonly idempotent: true;
1405
+ readonly params: {
1406
+ readonly id: "The invoice (`in_…`).";
1407
+ };
1408
+ readonly body: z.ZodObject<{
1409
+ auto_advance: z.ZodOptional<z.ZodBoolean>;
1410
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
1411
+ }, z.core.$strict>;
1412
+ readonly response: z.ZodObject<{
1413
+ id: z.ZodString;
1414
+ object: z.ZodLiteral<"invoice">;
1415
+ livemode: z.ZodBoolean;
1416
+ number: z.ZodNullable<z.ZodString>;
1417
+ customer: z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>;
1418
+ customer_email: z.ZodNullable<z.ZodString>;
1419
+ customer_name: z.ZodNullable<z.ZodString>;
1420
+ subscription: z.ZodNullable<z.ZodType<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">, z.core.$ZodTypeInternals<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">>>>;
1421
+ status: z.ZodEnum<{
1422
+ void: "void";
1423
+ draft: "draft";
1424
+ open: "open";
1425
+ paid: "paid";
1426
+ uncollectible: "uncollectible";
1427
+ }>;
1428
+ billing_reason: z.ZodEnum<{
1429
+ subscription_cancel: "subscription_cancel";
1430
+ subscription_update: "subscription_update";
1431
+ manual: "manual";
1432
+ subscription_create: "subscription_create";
1433
+ subscription_cycle: "subscription_cycle";
1434
+ upcoming: "upcoming";
1435
+ }>;
1436
+ collection_method: z.ZodEnum<{
1437
+ charge_automatically: "charge_automatically";
1438
+ send_invoice: "send_invoice";
1439
+ }>;
1440
+ currency: z.ZodEnum<{
1441
+ FAIR: "FAIR";
1442
+ EUR: "EUR";
1443
+ USD: "USD";
1444
+ GBP: "GBP";
1445
+ CHF: "CHF";
1446
+ SEK: "SEK";
1447
+ NOK: "NOK";
1448
+ DKK: "DKK";
1449
+ PLN: "PLN";
1450
+ CZK: "CZK";
1451
+ CAD: "CAD";
1452
+ AUD: "AUD";
1453
+ JPY: "JPY";
1454
+ }>;
1455
+ description: z.ZodNullable<z.ZodString>;
1456
+ auto_advance: z.ZodBoolean;
1457
+ automatically_finalizes_at: z.ZodNullable<z.ZodNumber>;
1458
+ lines: z.ZodObject<{
1459
+ object: z.ZodLiteral<"list">;
1460
+ data: z.ZodArray<z.ZodObject<{
1461
+ id: z.ZodString;
1462
+ object: z.ZodLiteral<"line_item">;
1463
+ livemode: z.ZodBoolean;
1464
+ invoice: z.ZodString;
1465
+ type: z.ZodEnum<{
1466
+ subscription: "subscription";
1467
+ invoiceitem: "invoiceitem";
1468
+ }>;
1469
+ amount: z.ZodString;
1470
+ currency: z.ZodEnum<{
1471
+ FAIR: "FAIR";
1472
+ EUR: "EUR";
1473
+ USD: "USD";
1474
+ GBP: "GBP";
1475
+ CHF: "CHF";
1476
+ SEK: "SEK";
1477
+ NOK: "NOK";
1478
+ DKK: "DKK";
1479
+ PLN: "PLN";
1480
+ CZK: "CZK";
1481
+ CAD: "CAD";
1482
+ AUD: "AUD";
1483
+ JPY: "JPY";
1484
+ }>;
1485
+ description: z.ZodNullable<z.ZodString>;
1486
+ discount_amounts: z.ZodArray<z.ZodObject<{
1487
+ amount: z.ZodString;
1488
+ discount: z.ZodString;
1489
+ }, z.core.$strict>>;
1490
+ discountable: z.ZodBoolean;
1491
+ period: z.ZodObject<{
1492
+ start: z.ZodNumber;
1493
+ end: z.ZodNumber;
1494
+ }, z.core.$strict>;
1495
+ price: z.ZodNullable<z.ZodType<import("../..").Ref<"price">, import("../..").Ref<"price">, z.core.$ZodTypeInternals<import("../..").Ref<"price">, import("../..").Ref<"price">>>>;
1496
+ quantity: z.ZodNullable<z.ZodNumber>;
1497
+ proration: z.ZodBoolean;
1498
+ subscription: z.ZodNullable<z.ZodString>;
1499
+ subscription_item: z.ZodNullable<z.ZodString>;
1500
+ invoice_item: z.ZodNullable<z.ZodString>;
1501
+ tax_amounts: z.ZodArray<z.ZodObject<{
1502
+ amount: z.ZodString;
1503
+ inclusive: z.ZodBoolean;
1504
+ tax_calculation: z.ZodNullable<z.ZodString>;
1505
+ taxability_reason: z.ZodNullable<z.ZodString>;
1506
+ }, z.core.$strict>>;
1507
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
1508
+ }, z.core.$strict>>;
1509
+ has_more: z.ZodBoolean;
1510
+ url: z.ZodString;
1511
+ }, z.core.$strict>;
1512
+ subtotal: z.ZodString;
1513
+ subtotal_excluding_tax: z.ZodString;
1514
+ total_discount_amounts: z.ZodArray<z.ZodObject<{
1515
+ amount: z.ZodString;
1516
+ discount: z.ZodString;
1517
+ }, z.core.$strict>>;
1518
+ discount: z.ZodNullable<z.ZodObject<{
1519
+ object: z.ZodLiteral<"discount">;
1520
+ coupon: z.ZodString;
1521
+ promotion_code: z.ZodNullable<z.ZodString>;
1522
+ start: z.ZodNumber;
1523
+ end: z.ZodNullable<z.ZodNumber>;
1524
+ }, z.core.$strict>>;
1525
+ tax: z.ZodNullable<z.ZodString>;
1526
+ total: z.ZodString;
1527
+ total_excluding_tax: z.ZodString;
1528
+ starting_balance: z.ZodString;
1529
+ ending_balance: z.ZodNullable<z.ZodString>;
1530
+ amount_due: z.ZodString;
1531
+ amount_paid: z.ZodString;
1532
+ amount_remaining: z.ZodString;
1533
+ pre_payment_credit_notes_amount: z.ZodString;
1534
+ post_payment_credit_notes_amount: z.ZodString;
1535
+ attempt_count: z.ZodNumber;
1536
+ attempted: z.ZodBoolean;
1537
+ next_payment_attempt: z.ZodNullable<z.ZodNumber>;
1538
+ due_date: z.ZodNullable<z.ZodNumber>;
1539
+ days_until_due: z.ZodNullable<z.ZodNumber>;
1540
+ period_start: z.ZodNumber;
1541
+ period_end: z.ZodNumber;
1542
+ payment_intent: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">>>>;
1543
+ default_payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
1544
+ automatic_tax: z.ZodObject<{
1545
+ enabled: z.ZodBoolean;
1546
+ status: z.ZodNullable<z.ZodEnum<{
1547
+ requires_location_inputs: "requires_location_inputs";
1548
+ failed: "failed";
1549
+ complete: "complete";
1550
+ }>>;
1551
+ tax_calculation: z.ZodNullable<z.ZodString>;
1552
+ }, z.core.$strict>;
1553
+ hosted_invoice_url: z.ZodNullable<z.ZodString>;
1554
+ invoice_pdf: z.ZodNullable<z.ZodString>;
1555
+ last_finalization_error: z.ZodNullable<z.ZodObject<{
1556
+ code: z.ZodString;
1557
+ message: z.ZodString;
1558
+ }, z.core.$strict>>;
1559
+ status_transitions: z.ZodObject<{
1560
+ finalized_at: z.ZodNullable<z.ZodNumber>;
1561
+ paid_at: z.ZodNullable<z.ZodNumber>;
1562
+ voided_at: z.ZodNullable<z.ZodNumber>;
1563
+ marked_uncollectible_at: z.ZodNullable<z.ZodNumber>;
1564
+ }, z.core.$strict>;
1565
+ paid_out_of_band: z.ZodBoolean;
1566
+ test_clock: z.ZodNullable<z.ZodString>;
1567
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
1568
+ created: z.ZodNumber;
1569
+ effective_at: z.ZodNullable<z.ZodNumber>;
1570
+ }, z.core.$strict>;
1571
+ readonly sdk: "invoices.finalizeInvoice";
1572
+ readonly expandable: "invoice";
1573
+ }, {
1574
+ readonly operationId: "payInvoice";
1575
+ readonly method: "post";
1576
+ readonly path: "/v1/invoices/{id}/pay";
1577
+ readonly tag: "Invoices";
1578
+ readonly summary: "Pay an invoice";
1579
+ readonly description: "Charge a saved card off-session, or record a payment made outside Orbit (`paid_out_of_band`). A decline is a `card_error` carrying the invoice as it now is.";
1580
+ readonly auth: "service";
1581
+ readonly scope: "payments:write";
1582
+ readonly idempotent: true;
1583
+ readonly params: {
1584
+ readonly id: "The invoice (`in_…`).";
1585
+ };
1586
+ readonly body: z.ZodObject<{
1587
+ payment_method: z.ZodOptional<z.ZodString>;
1588
+ paid_out_of_band: z.ZodOptional<z.ZodBoolean>;
1589
+ off_session: z.ZodOptional<z.ZodBoolean>;
1590
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
1591
+ }, z.core.$strict>;
1592
+ readonly response: z.ZodObject<{
1593
+ id: z.ZodString;
1594
+ object: z.ZodLiteral<"invoice">;
1595
+ livemode: z.ZodBoolean;
1596
+ number: z.ZodNullable<z.ZodString>;
1597
+ customer: z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>;
1598
+ customer_email: z.ZodNullable<z.ZodString>;
1599
+ customer_name: z.ZodNullable<z.ZodString>;
1600
+ subscription: z.ZodNullable<z.ZodType<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">, z.core.$ZodTypeInternals<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">>>>;
1601
+ status: z.ZodEnum<{
1602
+ void: "void";
1603
+ draft: "draft";
1604
+ open: "open";
1605
+ paid: "paid";
1606
+ uncollectible: "uncollectible";
1607
+ }>;
1608
+ billing_reason: z.ZodEnum<{
1609
+ subscription_cancel: "subscription_cancel";
1610
+ subscription_update: "subscription_update";
1611
+ manual: "manual";
1612
+ subscription_create: "subscription_create";
1613
+ subscription_cycle: "subscription_cycle";
1614
+ upcoming: "upcoming";
1615
+ }>;
1616
+ collection_method: z.ZodEnum<{
1617
+ charge_automatically: "charge_automatically";
1618
+ send_invoice: "send_invoice";
1619
+ }>;
1620
+ currency: z.ZodEnum<{
1621
+ FAIR: "FAIR";
1622
+ EUR: "EUR";
1623
+ USD: "USD";
1624
+ GBP: "GBP";
1625
+ CHF: "CHF";
1626
+ SEK: "SEK";
1627
+ NOK: "NOK";
1628
+ DKK: "DKK";
1629
+ PLN: "PLN";
1630
+ CZK: "CZK";
1631
+ CAD: "CAD";
1632
+ AUD: "AUD";
1633
+ JPY: "JPY";
1634
+ }>;
1635
+ description: z.ZodNullable<z.ZodString>;
1636
+ auto_advance: z.ZodBoolean;
1637
+ automatically_finalizes_at: z.ZodNullable<z.ZodNumber>;
1638
+ lines: z.ZodObject<{
1639
+ object: z.ZodLiteral<"list">;
1640
+ data: z.ZodArray<z.ZodObject<{
1641
+ id: z.ZodString;
1642
+ object: z.ZodLiteral<"line_item">;
1643
+ livemode: z.ZodBoolean;
1644
+ invoice: z.ZodString;
1645
+ type: z.ZodEnum<{
1646
+ subscription: "subscription";
1647
+ invoiceitem: "invoiceitem";
1648
+ }>;
1649
+ amount: z.ZodString;
1650
+ currency: z.ZodEnum<{
1651
+ FAIR: "FAIR";
1652
+ EUR: "EUR";
1653
+ USD: "USD";
1654
+ GBP: "GBP";
1655
+ CHF: "CHF";
1656
+ SEK: "SEK";
1657
+ NOK: "NOK";
1658
+ DKK: "DKK";
1659
+ PLN: "PLN";
1660
+ CZK: "CZK";
1661
+ CAD: "CAD";
1662
+ AUD: "AUD";
1663
+ JPY: "JPY";
1664
+ }>;
1665
+ description: z.ZodNullable<z.ZodString>;
1666
+ discount_amounts: z.ZodArray<z.ZodObject<{
1667
+ amount: z.ZodString;
1668
+ discount: z.ZodString;
1669
+ }, z.core.$strict>>;
1670
+ discountable: z.ZodBoolean;
1671
+ period: z.ZodObject<{
1672
+ start: z.ZodNumber;
1673
+ end: z.ZodNumber;
1674
+ }, z.core.$strict>;
1675
+ price: z.ZodNullable<z.ZodType<import("../..").Ref<"price">, import("../..").Ref<"price">, z.core.$ZodTypeInternals<import("../..").Ref<"price">, import("../..").Ref<"price">>>>;
1676
+ quantity: z.ZodNullable<z.ZodNumber>;
1677
+ proration: z.ZodBoolean;
1678
+ subscription: z.ZodNullable<z.ZodString>;
1679
+ subscription_item: z.ZodNullable<z.ZodString>;
1680
+ invoice_item: z.ZodNullable<z.ZodString>;
1681
+ tax_amounts: z.ZodArray<z.ZodObject<{
1682
+ amount: z.ZodString;
1683
+ inclusive: z.ZodBoolean;
1684
+ tax_calculation: z.ZodNullable<z.ZodString>;
1685
+ taxability_reason: z.ZodNullable<z.ZodString>;
1686
+ }, z.core.$strict>>;
1687
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
1688
+ }, z.core.$strict>>;
1689
+ has_more: z.ZodBoolean;
1690
+ url: z.ZodString;
1691
+ }, z.core.$strict>;
1692
+ subtotal: z.ZodString;
1693
+ subtotal_excluding_tax: z.ZodString;
1694
+ total_discount_amounts: z.ZodArray<z.ZodObject<{
1695
+ amount: z.ZodString;
1696
+ discount: z.ZodString;
1697
+ }, z.core.$strict>>;
1698
+ discount: z.ZodNullable<z.ZodObject<{
1699
+ object: z.ZodLiteral<"discount">;
1700
+ coupon: z.ZodString;
1701
+ promotion_code: z.ZodNullable<z.ZodString>;
1702
+ start: z.ZodNumber;
1703
+ end: z.ZodNullable<z.ZodNumber>;
1704
+ }, z.core.$strict>>;
1705
+ tax: z.ZodNullable<z.ZodString>;
1706
+ total: z.ZodString;
1707
+ total_excluding_tax: z.ZodString;
1708
+ starting_balance: z.ZodString;
1709
+ ending_balance: z.ZodNullable<z.ZodString>;
1710
+ amount_due: z.ZodString;
1711
+ amount_paid: z.ZodString;
1712
+ amount_remaining: z.ZodString;
1713
+ pre_payment_credit_notes_amount: z.ZodString;
1714
+ post_payment_credit_notes_amount: z.ZodString;
1715
+ attempt_count: z.ZodNumber;
1716
+ attempted: z.ZodBoolean;
1717
+ next_payment_attempt: z.ZodNullable<z.ZodNumber>;
1718
+ due_date: z.ZodNullable<z.ZodNumber>;
1719
+ days_until_due: z.ZodNullable<z.ZodNumber>;
1720
+ period_start: z.ZodNumber;
1721
+ period_end: z.ZodNumber;
1722
+ payment_intent: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">>>>;
1723
+ default_payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
1724
+ automatic_tax: z.ZodObject<{
1725
+ enabled: z.ZodBoolean;
1726
+ status: z.ZodNullable<z.ZodEnum<{
1727
+ requires_location_inputs: "requires_location_inputs";
1728
+ failed: "failed";
1729
+ complete: "complete";
1730
+ }>>;
1731
+ tax_calculation: z.ZodNullable<z.ZodString>;
1732
+ }, z.core.$strict>;
1733
+ hosted_invoice_url: z.ZodNullable<z.ZodString>;
1734
+ invoice_pdf: z.ZodNullable<z.ZodString>;
1735
+ last_finalization_error: z.ZodNullable<z.ZodObject<{
1736
+ code: z.ZodString;
1737
+ message: z.ZodString;
1738
+ }, z.core.$strict>>;
1739
+ status_transitions: z.ZodObject<{
1740
+ finalized_at: z.ZodNullable<z.ZodNumber>;
1741
+ paid_at: z.ZodNullable<z.ZodNumber>;
1742
+ voided_at: z.ZodNullable<z.ZodNumber>;
1743
+ marked_uncollectible_at: z.ZodNullable<z.ZodNumber>;
1744
+ }, z.core.$strict>;
1745
+ paid_out_of_band: z.ZodBoolean;
1746
+ test_clock: z.ZodNullable<z.ZodString>;
1747
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
1748
+ created: z.ZodNumber;
1749
+ effective_at: z.ZodNullable<z.ZodNumber>;
1750
+ }, z.core.$strict>;
1751
+ readonly sdk: "invoices.pay";
1752
+ readonly expandable: "invoice";
1753
+ }, {
1754
+ readonly operationId: "sendInvoice";
1755
+ readonly method: "post";
1756
+ readonly path: "/v1/invoices/{id}/send";
1757
+ readonly tag: "Invoices";
1758
+ readonly summary: "Send an invoice to its customer";
1759
+ readonly auth: "service";
1760
+ readonly scope: "payments:write";
1761
+ readonly idempotent: true;
1762
+ readonly params: {
1763
+ readonly id: "The invoice (`in_…`).";
1764
+ };
1765
+ readonly body: z.ZodObject<{
1766
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
1767
+ }, z.core.$strict>;
1768
+ readonly response: z.ZodObject<{
1769
+ id: z.ZodString;
1770
+ object: z.ZodLiteral<"invoice">;
1771
+ livemode: z.ZodBoolean;
1772
+ number: z.ZodNullable<z.ZodString>;
1773
+ customer: z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>;
1774
+ customer_email: z.ZodNullable<z.ZodString>;
1775
+ customer_name: z.ZodNullable<z.ZodString>;
1776
+ subscription: z.ZodNullable<z.ZodType<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">, z.core.$ZodTypeInternals<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">>>>;
1777
+ status: z.ZodEnum<{
1778
+ void: "void";
1779
+ draft: "draft";
1780
+ open: "open";
1781
+ paid: "paid";
1782
+ uncollectible: "uncollectible";
1783
+ }>;
1784
+ billing_reason: z.ZodEnum<{
1785
+ subscription_cancel: "subscription_cancel";
1786
+ subscription_update: "subscription_update";
1787
+ manual: "manual";
1788
+ subscription_create: "subscription_create";
1789
+ subscription_cycle: "subscription_cycle";
1790
+ upcoming: "upcoming";
1791
+ }>;
1792
+ collection_method: z.ZodEnum<{
1793
+ charge_automatically: "charge_automatically";
1794
+ send_invoice: "send_invoice";
1795
+ }>;
1796
+ currency: z.ZodEnum<{
1797
+ FAIR: "FAIR";
1798
+ EUR: "EUR";
1799
+ USD: "USD";
1800
+ GBP: "GBP";
1801
+ CHF: "CHF";
1802
+ SEK: "SEK";
1803
+ NOK: "NOK";
1804
+ DKK: "DKK";
1805
+ PLN: "PLN";
1806
+ CZK: "CZK";
1807
+ CAD: "CAD";
1808
+ AUD: "AUD";
1809
+ JPY: "JPY";
1810
+ }>;
1811
+ description: z.ZodNullable<z.ZodString>;
1812
+ auto_advance: z.ZodBoolean;
1813
+ automatically_finalizes_at: z.ZodNullable<z.ZodNumber>;
1814
+ lines: z.ZodObject<{
1815
+ object: z.ZodLiteral<"list">;
1816
+ data: z.ZodArray<z.ZodObject<{
1817
+ id: z.ZodString;
1818
+ object: z.ZodLiteral<"line_item">;
1819
+ livemode: z.ZodBoolean;
1820
+ invoice: z.ZodString;
1821
+ type: z.ZodEnum<{
1822
+ subscription: "subscription";
1823
+ invoiceitem: "invoiceitem";
1824
+ }>;
1825
+ amount: z.ZodString;
1826
+ currency: z.ZodEnum<{
1827
+ FAIR: "FAIR";
1828
+ EUR: "EUR";
1829
+ USD: "USD";
1830
+ GBP: "GBP";
1831
+ CHF: "CHF";
1832
+ SEK: "SEK";
1833
+ NOK: "NOK";
1834
+ DKK: "DKK";
1835
+ PLN: "PLN";
1836
+ CZK: "CZK";
1837
+ CAD: "CAD";
1838
+ AUD: "AUD";
1839
+ JPY: "JPY";
1840
+ }>;
1841
+ description: z.ZodNullable<z.ZodString>;
1842
+ discount_amounts: z.ZodArray<z.ZodObject<{
1843
+ amount: z.ZodString;
1844
+ discount: z.ZodString;
1845
+ }, z.core.$strict>>;
1846
+ discountable: z.ZodBoolean;
1847
+ period: z.ZodObject<{
1848
+ start: z.ZodNumber;
1849
+ end: z.ZodNumber;
1850
+ }, z.core.$strict>;
1851
+ price: z.ZodNullable<z.ZodType<import("../..").Ref<"price">, import("../..").Ref<"price">, z.core.$ZodTypeInternals<import("../..").Ref<"price">, import("../..").Ref<"price">>>>;
1852
+ quantity: z.ZodNullable<z.ZodNumber>;
1853
+ proration: z.ZodBoolean;
1854
+ subscription: z.ZodNullable<z.ZodString>;
1855
+ subscription_item: z.ZodNullable<z.ZodString>;
1856
+ invoice_item: z.ZodNullable<z.ZodString>;
1857
+ tax_amounts: z.ZodArray<z.ZodObject<{
1858
+ amount: z.ZodString;
1859
+ inclusive: z.ZodBoolean;
1860
+ tax_calculation: z.ZodNullable<z.ZodString>;
1861
+ taxability_reason: z.ZodNullable<z.ZodString>;
1862
+ }, z.core.$strict>>;
1863
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
1864
+ }, z.core.$strict>>;
1865
+ has_more: z.ZodBoolean;
1866
+ url: z.ZodString;
1867
+ }, z.core.$strict>;
1868
+ subtotal: z.ZodString;
1869
+ subtotal_excluding_tax: z.ZodString;
1870
+ total_discount_amounts: z.ZodArray<z.ZodObject<{
1871
+ amount: z.ZodString;
1872
+ discount: z.ZodString;
1873
+ }, z.core.$strict>>;
1874
+ discount: z.ZodNullable<z.ZodObject<{
1875
+ object: z.ZodLiteral<"discount">;
1876
+ coupon: z.ZodString;
1877
+ promotion_code: z.ZodNullable<z.ZodString>;
1878
+ start: z.ZodNumber;
1879
+ end: z.ZodNullable<z.ZodNumber>;
1880
+ }, z.core.$strict>>;
1881
+ tax: z.ZodNullable<z.ZodString>;
1882
+ total: z.ZodString;
1883
+ total_excluding_tax: z.ZodString;
1884
+ starting_balance: z.ZodString;
1885
+ ending_balance: z.ZodNullable<z.ZodString>;
1886
+ amount_due: z.ZodString;
1887
+ amount_paid: z.ZodString;
1888
+ amount_remaining: z.ZodString;
1889
+ pre_payment_credit_notes_amount: z.ZodString;
1890
+ post_payment_credit_notes_amount: z.ZodString;
1891
+ attempt_count: z.ZodNumber;
1892
+ attempted: z.ZodBoolean;
1893
+ next_payment_attempt: z.ZodNullable<z.ZodNumber>;
1894
+ due_date: z.ZodNullable<z.ZodNumber>;
1895
+ days_until_due: z.ZodNullable<z.ZodNumber>;
1896
+ period_start: z.ZodNumber;
1897
+ period_end: z.ZodNumber;
1898
+ payment_intent: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">>>>;
1899
+ default_payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
1900
+ automatic_tax: z.ZodObject<{
1901
+ enabled: z.ZodBoolean;
1902
+ status: z.ZodNullable<z.ZodEnum<{
1903
+ requires_location_inputs: "requires_location_inputs";
1904
+ failed: "failed";
1905
+ complete: "complete";
1906
+ }>>;
1907
+ tax_calculation: z.ZodNullable<z.ZodString>;
1908
+ }, z.core.$strict>;
1909
+ hosted_invoice_url: z.ZodNullable<z.ZodString>;
1910
+ invoice_pdf: z.ZodNullable<z.ZodString>;
1911
+ last_finalization_error: z.ZodNullable<z.ZodObject<{
1912
+ code: z.ZodString;
1913
+ message: z.ZodString;
1914
+ }, z.core.$strict>>;
1915
+ status_transitions: z.ZodObject<{
1916
+ finalized_at: z.ZodNullable<z.ZodNumber>;
1917
+ paid_at: z.ZodNullable<z.ZodNumber>;
1918
+ voided_at: z.ZodNullable<z.ZodNumber>;
1919
+ marked_uncollectible_at: z.ZodNullable<z.ZodNumber>;
1920
+ }, z.core.$strict>;
1921
+ paid_out_of_band: z.ZodBoolean;
1922
+ test_clock: z.ZodNullable<z.ZodString>;
1923
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
1924
+ created: z.ZodNumber;
1925
+ effective_at: z.ZodNullable<z.ZodNumber>;
1926
+ }, z.core.$strict>;
1927
+ readonly sdk: "invoices.sendInvoice";
1928
+ readonly expandable: "invoice";
1929
+ }, {
1930
+ readonly operationId: "voidInvoice";
1931
+ readonly method: "post";
1932
+ readonly path: "/v1/invoices/{id}/void";
1933
+ readonly tag: "Invoices";
1934
+ readonly summary: "Void an invoice";
1935
+ readonly auth: "service";
1936
+ readonly scope: "payments:write";
1937
+ readonly idempotent: true;
1938
+ readonly params: {
1939
+ readonly id: "The invoice (`in_…`).";
1940
+ };
1941
+ readonly body: z.ZodObject<{
1942
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
1943
+ }, z.core.$strict>;
1944
+ readonly response: z.ZodObject<{
1945
+ id: z.ZodString;
1946
+ object: z.ZodLiteral<"invoice">;
1947
+ livemode: z.ZodBoolean;
1948
+ number: z.ZodNullable<z.ZodString>;
1949
+ customer: z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>;
1950
+ customer_email: z.ZodNullable<z.ZodString>;
1951
+ customer_name: z.ZodNullable<z.ZodString>;
1952
+ subscription: z.ZodNullable<z.ZodType<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">, z.core.$ZodTypeInternals<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">>>>;
1953
+ status: z.ZodEnum<{
1954
+ void: "void";
1955
+ draft: "draft";
1956
+ open: "open";
1957
+ paid: "paid";
1958
+ uncollectible: "uncollectible";
1959
+ }>;
1960
+ billing_reason: z.ZodEnum<{
1961
+ subscription_cancel: "subscription_cancel";
1962
+ subscription_update: "subscription_update";
1963
+ manual: "manual";
1964
+ subscription_create: "subscription_create";
1965
+ subscription_cycle: "subscription_cycle";
1966
+ upcoming: "upcoming";
1967
+ }>;
1968
+ collection_method: z.ZodEnum<{
1969
+ charge_automatically: "charge_automatically";
1970
+ send_invoice: "send_invoice";
1971
+ }>;
1972
+ currency: z.ZodEnum<{
1973
+ FAIR: "FAIR";
1974
+ EUR: "EUR";
1975
+ USD: "USD";
1976
+ GBP: "GBP";
1977
+ CHF: "CHF";
1978
+ SEK: "SEK";
1979
+ NOK: "NOK";
1980
+ DKK: "DKK";
1981
+ PLN: "PLN";
1982
+ CZK: "CZK";
1983
+ CAD: "CAD";
1984
+ AUD: "AUD";
1985
+ JPY: "JPY";
1986
+ }>;
1987
+ description: z.ZodNullable<z.ZodString>;
1988
+ auto_advance: z.ZodBoolean;
1989
+ automatically_finalizes_at: z.ZodNullable<z.ZodNumber>;
1990
+ lines: z.ZodObject<{
1991
+ object: z.ZodLiteral<"list">;
1992
+ data: z.ZodArray<z.ZodObject<{
1993
+ id: z.ZodString;
1994
+ object: z.ZodLiteral<"line_item">;
1995
+ livemode: z.ZodBoolean;
1996
+ invoice: z.ZodString;
1997
+ type: z.ZodEnum<{
1998
+ subscription: "subscription";
1999
+ invoiceitem: "invoiceitem";
2000
+ }>;
2001
+ amount: z.ZodString;
2002
+ currency: z.ZodEnum<{
2003
+ FAIR: "FAIR";
2004
+ EUR: "EUR";
2005
+ USD: "USD";
2006
+ GBP: "GBP";
2007
+ CHF: "CHF";
2008
+ SEK: "SEK";
2009
+ NOK: "NOK";
2010
+ DKK: "DKK";
2011
+ PLN: "PLN";
2012
+ CZK: "CZK";
2013
+ CAD: "CAD";
2014
+ AUD: "AUD";
2015
+ JPY: "JPY";
2016
+ }>;
2017
+ description: z.ZodNullable<z.ZodString>;
2018
+ discount_amounts: z.ZodArray<z.ZodObject<{
2019
+ amount: z.ZodString;
2020
+ discount: z.ZodString;
2021
+ }, z.core.$strict>>;
2022
+ discountable: z.ZodBoolean;
2023
+ period: z.ZodObject<{
2024
+ start: z.ZodNumber;
2025
+ end: z.ZodNumber;
2026
+ }, z.core.$strict>;
2027
+ price: z.ZodNullable<z.ZodType<import("../..").Ref<"price">, import("../..").Ref<"price">, z.core.$ZodTypeInternals<import("../..").Ref<"price">, import("../..").Ref<"price">>>>;
2028
+ quantity: z.ZodNullable<z.ZodNumber>;
2029
+ proration: z.ZodBoolean;
2030
+ subscription: z.ZodNullable<z.ZodString>;
2031
+ subscription_item: z.ZodNullable<z.ZodString>;
2032
+ invoice_item: z.ZodNullable<z.ZodString>;
2033
+ tax_amounts: z.ZodArray<z.ZodObject<{
2034
+ amount: z.ZodString;
2035
+ inclusive: z.ZodBoolean;
2036
+ tax_calculation: z.ZodNullable<z.ZodString>;
2037
+ taxability_reason: z.ZodNullable<z.ZodString>;
2038
+ }, z.core.$strict>>;
2039
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
2040
+ }, z.core.$strict>>;
2041
+ has_more: z.ZodBoolean;
2042
+ url: z.ZodString;
2043
+ }, z.core.$strict>;
2044
+ subtotal: z.ZodString;
2045
+ subtotal_excluding_tax: z.ZodString;
2046
+ total_discount_amounts: z.ZodArray<z.ZodObject<{
2047
+ amount: z.ZodString;
2048
+ discount: z.ZodString;
2049
+ }, z.core.$strict>>;
2050
+ discount: z.ZodNullable<z.ZodObject<{
2051
+ object: z.ZodLiteral<"discount">;
2052
+ coupon: z.ZodString;
2053
+ promotion_code: z.ZodNullable<z.ZodString>;
2054
+ start: z.ZodNumber;
2055
+ end: z.ZodNullable<z.ZodNumber>;
2056
+ }, z.core.$strict>>;
2057
+ tax: z.ZodNullable<z.ZodString>;
2058
+ total: z.ZodString;
2059
+ total_excluding_tax: z.ZodString;
2060
+ starting_balance: z.ZodString;
2061
+ ending_balance: z.ZodNullable<z.ZodString>;
2062
+ amount_due: z.ZodString;
2063
+ amount_paid: z.ZodString;
2064
+ amount_remaining: z.ZodString;
2065
+ pre_payment_credit_notes_amount: z.ZodString;
2066
+ post_payment_credit_notes_amount: z.ZodString;
2067
+ attempt_count: z.ZodNumber;
2068
+ attempted: z.ZodBoolean;
2069
+ next_payment_attempt: z.ZodNullable<z.ZodNumber>;
2070
+ due_date: z.ZodNullable<z.ZodNumber>;
2071
+ days_until_due: z.ZodNullable<z.ZodNumber>;
2072
+ period_start: z.ZodNumber;
2073
+ period_end: z.ZodNumber;
2074
+ payment_intent: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">>>>;
2075
+ default_payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
2076
+ automatic_tax: z.ZodObject<{
2077
+ enabled: z.ZodBoolean;
2078
+ status: z.ZodNullable<z.ZodEnum<{
2079
+ requires_location_inputs: "requires_location_inputs";
2080
+ failed: "failed";
2081
+ complete: "complete";
2082
+ }>>;
2083
+ tax_calculation: z.ZodNullable<z.ZodString>;
2084
+ }, z.core.$strict>;
2085
+ hosted_invoice_url: z.ZodNullable<z.ZodString>;
2086
+ invoice_pdf: z.ZodNullable<z.ZodString>;
2087
+ last_finalization_error: z.ZodNullable<z.ZodObject<{
2088
+ code: z.ZodString;
2089
+ message: z.ZodString;
2090
+ }, z.core.$strict>>;
2091
+ status_transitions: z.ZodObject<{
2092
+ finalized_at: z.ZodNullable<z.ZodNumber>;
2093
+ paid_at: z.ZodNullable<z.ZodNumber>;
2094
+ voided_at: z.ZodNullable<z.ZodNumber>;
2095
+ marked_uncollectible_at: z.ZodNullable<z.ZodNumber>;
2096
+ }, z.core.$strict>;
2097
+ paid_out_of_band: z.ZodBoolean;
2098
+ test_clock: z.ZodNullable<z.ZodString>;
2099
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
2100
+ created: z.ZodNumber;
2101
+ effective_at: z.ZodNullable<z.ZodNumber>;
2102
+ }, z.core.$strict>;
2103
+ readonly sdk: "invoices.voidInvoice";
2104
+ readonly expandable: "invoice";
2105
+ }, {
2106
+ readonly operationId: "markInvoiceUncollectible";
2107
+ readonly method: "post";
2108
+ readonly path: "/v1/invoices/{id}/mark_uncollectible";
2109
+ readonly tag: "Invoices";
2110
+ readonly summary: "Mark an invoice uncollectible";
2111
+ readonly auth: "service";
2112
+ readonly scope: "payments:write";
2113
+ readonly idempotent: true;
2114
+ readonly params: {
2115
+ readonly id: "The invoice (`in_…`).";
2116
+ };
2117
+ readonly body: z.ZodObject<{
2118
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
2119
+ }, z.core.$strict>;
2120
+ readonly response: z.ZodObject<{
2121
+ id: z.ZodString;
2122
+ object: z.ZodLiteral<"invoice">;
2123
+ livemode: z.ZodBoolean;
2124
+ number: z.ZodNullable<z.ZodString>;
2125
+ customer: z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>;
2126
+ customer_email: z.ZodNullable<z.ZodString>;
2127
+ customer_name: z.ZodNullable<z.ZodString>;
2128
+ subscription: z.ZodNullable<z.ZodType<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">, z.core.$ZodTypeInternals<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">>>>;
2129
+ status: z.ZodEnum<{
2130
+ void: "void";
2131
+ draft: "draft";
2132
+ open: "open";
2133
+ paid: "paid";
2134
+ uncollectible: "uncollectible";
2135
+ }>;
2136
+ billing_reason: z.ZodEnum<{
2137
+ subscription_cancel: "subscription_cancel";
2138
+ subscription_update: "subscription_update";
2139
+ manual: "manual";
2140
+ subscription_create: "subscription_create";
2141
+ subscription_cycle: "subscription_cycle";
2142
+ upcoming: "upcoming";
2143
+ }>;
2144
+ collection_method: z.ZodEnum<{
2145
+ charge_automatically: "charge_automatically";
2146
+ send_invoice: "send_invoice";
2147
+ }>;
2148
+ currency: z.ZodEnum<{
2149
+ FAIR: "FAIR";
2150
+ EUR: "EUR";
2151
+ USD: "USD";
2152
+ GBP: "GBP";
2153
+ CHF: "CHF";
2154
+ SEK: "SEK";
2155
+ NOK: "NOK";
2156
+ DKK: "DKK";
2157
+ PLN: "PLN";
2158
+ CZK: "CZK";
2159
+ CAD: "CAD";
2160
+ AUD: "AUD";
2161
+ JPY: "JPY";
2162
+ }>;
2163
+ description: z.ZodNullable<z.ZodString>;
2164
+ auto_advance: z.ZodBoolean;
2165
+ automatically_finalizes_at: z.ZodNullable<z.ZodNumber>;
2166
+ lines: z.ZodObject<{
2167
+ object: z.ZodLiteral<"list">;
2168
+ data: z.ZodArray<z.ZodObject<{
2169
+ id: z.ZodString;
2170
+ object: z.ZodLiteral<"line_item">;
2171
+ livemode: z.ZodBoolean;
2172
+ invoice: z.ZodString;
2173
+ type: z.ZodEnum<{
2174
+ subscription: "subscription";
2175
+ invoiceitem: "invoiceitem";
2176
+ }>;
2177
+ amount: z.ZodString;
2178
+ currency: z.ZodEnum<{
2179
+ FAIR: "FAIR";
2180
+ EUR: "EUR";
2181
+ USD: "USD";
2182
+ GBP: "GBP";
2183
+ CHF: "CHF";
2184
+ SEK: "SEK";
2185
+ NOK: "NOK";
2186
+ DKK: "DKK";
2187
+ PLN: "PLN";
2188
+ CZK: "CZK";
2189
+ CAD: "CAD";
2190
+ AUD: "AUD";
2191
+ JPY: "JPY";
2192
+ }>;
2193
+ description: z.ZodNullable<z.ZodString>;
2194
+ discount_amounts: z.ZodArray<z.ZodObject<{
2195
+ amount: z.ZodString;
2196
+ discount: z.ZodString;
2197
+ }, z.core.$strict>>;
2198
+ discountable: z.ZodBoolean;
2199
+ period: z.ZodObject<{
2200
+ start: z.ZodNumber;
2201
+ end: z.ZodNumber;
2202
+ }, z.core.$strict>;
2203
+ price: z.ZodNullable<z.ZodType<import("../..").Ref<"price">, import("../..").Ref<"price">, z.core.$ZodTypeInternals<import("../..").Ref<"price">, import("../..").Ref<"price">>>>;
2204
+ quantity: z.ZodNullable<z.ZodNumber>;
2205
+ proration: z.ZodBoolean;
2206
+ subscription: z.ZodNullable<z.ZodString>;
2207
+ subscription_item: z.ZodNullable<z.ZodString>;
2208
+ invoice_item: z.ZodNullable<z.ZodString>;
2209
+ tax_amounts: z.ZodArray<z.ZodObject<{
2210
+ amount: z.ZodString;
2211
+ inclusive: z.ZodBoolean;
2212
+ tax_calculation: z.ZodNullable<z.ZodString>;
2213
+ taxability_reason: z.ZodNullable<z.ZodString>;
2214
+ }, z.core.$strict>>;
2215
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
2216
+ }, z.core.$strict>>;
2217
+ has_more: z.ZodBoolean;
2218
+ url: z.ZodString;
2219
+ }, z.core.$strict>;
2220
+ subtotal: z.ZodString;
2221
+ subtotal_excluding_tax: z.ZodString;
2222
+ total_discount_amounts: z.ZodArray<z.ZodObject<{
2223
+ amount: z.ZodString;
2224
+ discount: z.ZodString;
2225
+ }, z.core.$strict>>;
2226
+ discount: z.ZodNullable<z.ZodObject<{
2227
+ object: z.ZodLiteral<"discount">;
2228
+ coupon: z.ZodString;
2229
+ promotion_code: z.ZodNullable<z.ZodString>;
2230
+ start: z.ZodNumber;
2231
+ end: z.ZodNullable<z.ZodNumber>;
2232
+ }, z.core.$strict>>;
2233
+ tax: z.ZodNullable<z.ZodString>;
2234
+ total: z.ZodString;
2235
+ total_excluding_tax: z.ZodString;
2236
+ starting_balance: z.ZodString;
2237
+ ending_balance: z.ZodNullable<z.ZodString>;
2238
+ amount_due: z.ZodString;
2239
+ amount_paid: z.ZodString;
2240
+ amount_remaining: z.ZodString;
2241
+ pre_payment_credit_notes_amount: z.ZodString;
2242
+ post_payment_credit_notes_amount: z.ZodString;
2243
+ attempt_count: z.ZodNumber;
2244
+ attempted: z.ZodBoolean;
2245
+ next_payment_attempt: z.ZodNullable<z.ZodNumber>;
2246
+ due_date: z.ZodNullable<z.ZodNumber>;
2247
+ days_until_due: z.ZodNullable<z.ZodNumber>;
2248
+ period_start: z.ZodNumber;
2249
+ period_end: z.ZodNumber;
2250
+ payment_intent: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">>>>;
2251
+ default_payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
2252
+ automatic_tax: z.ZodObject<{
2253
+ enabled: z.ZodBoolean;
2254
+ status: z.ZodNullable<z.ZodEnum<{
2255
+ requires_location_inputs: "requires_location_inputs";
2256
+ failed: "failed";
2257
+ complete: "complete";
2258
+ }>>;
2259
+ tax_calculation: z.ZodNullable<z.ZodString>;
2260
+ }, z.core.$strict>;
2261
+ hosted_invoice_url: z.ZodNullable<z.ZodString>;
2262
+ invoice_pdf: z.ZodNullable<z.ZodString>;
2263
+ last_finalization_error: z.ZodNullable<z.ZodObject<{
2264
+ code: z.ZodString;
2265
+ message: z.ZodString;
2266
+ }, z.core.$strict>>;
2267
+ status_transitions: z.ZodObject<{
2268
+ finalized_at: z.ZodNullable<z.ZodNumber>;
2269
+ paid_at: z.ZodNullable<z.ZodNumber>;
2270
+ voided_at: z.ZodNullable<z.ZodNumber>;
2271
+ marked_uncollectible_at: z.ZodNullable<z.ZodNumber>;
2272
+ }, z.core.$strict>;
2273
+ paid_out_of_band: z.ZodBoolean;
2274
+ test_clock: z.ZodNullable<z.ZodString>;
2275
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
2276
+ created: z.ZodNumber;
2277
+ effective_at: z.ZodNullable<z.ZodNumber>;
2278
+ }, z.core.$strict>;
2279
+ readonly sdk: "invoices.markUncollectible";
2280
+ readonly expandable: "invoice";
2281
+ }, {
2282
+ readonly operationId: "listInvoiceLineItems";
2283
+ readonly method: "get";
2284
+ readonly path: "/v1/invoices/{id}/lines";
2285
+ readonly tag: "Invoices";
2286
+ readonly summary: "List an invoice's lines";
2287
+ readonly description: "Every line, on one page.";
2288
+ readonly auth: "service";
2289
+ readonly scope: "payments:read";
2290
+ readonly params: {
2291
+ readonly id: "The invoice (`in_…`).";
2292
+ };
2293
+ readonly response: z.ZodObject<{
2294
+ object: z.ZodLiteral<"list">;
2295
+ data: z.ZodArray<z.ZodObject<{
2296
+ id: z.ZodString;
2297
+ object: z.ZodLiteral<"line_item">;
2298
+ livemode: z.ZodBoolean;
2299
+ invoice: z.ZodString;
2300
+ type: z.ZodEnum<{
2301
+ subscription: "subscription";
2302
+ invoiceitem: "invoiceitem";
2303
+ }>;
2304
+ amount: z.ZodString;
2305
+ currency: z.ZodEnum<{
2306
+ FAIR: "FAIR";
2307
+ EUR: "EUR";
2308
+ USD: "USD";
2309
+ GBP: "GBP";
2310
+ CHF: "CHF";
2311
+ SEK: "SEK";
2312
+ NOK: "NOK";
2313
+ DKK: "DKK";
2314
+ PLN: "PLN";
2315
+ CZK: "CZK";
2316
+ CAD: "CAD";
2317
+ AUD: "AUD";
2318
+ JPY: "JPY";
2319
+ }>;
2320
+ description: z.ZodNullable<z.ZodString>;
2321
+ discount_amounts: z.ZodArray<z.ZodObject<{
2322
+ amount: z.ZodString;
2323
+ discount: z.ZodString;
2324
+ }, z.core.$strict>>;
2325
+ discountable: z.ZodBoolean;
2326
+ period: z.ZodObject<{
2327
+ start: z.ZodNumber;
2328
+ end: z.ZodNumber;
2329
+ }, z.core.$strict>;
2330
+ price: z.ZodNullable<z.ZodType<import("../..").Ref<"price">, import("../..").Ref<"price">, z.core.$ZodTypeInternals<import("../..").Ref<"price">, import("../..").Ref<"price">>>>;
2331
+ quantity: z.ZodNullable<z.ZodNumber>;
2332
+ proration: z.ZodBoolean;
2333
+ subscription: z.ZodNullable<z.ZodString>;
2334
+ subscription_item: z.ZodNullable<z.ZodString>;
2335
+ invoice_item: z.ZodNullable<z.ZodString>;
2336
+ tax_amounts: z.ZodArray<z.ZodObject<{
2337
+ amount: z.ZodString;
2338
+ inclusive: z.ZodBoolean;
2339
+ tax_calculation: z.ZodNullable<z.ZodString>;
2340
+ taxability_reason: z.ZodNullable<z.ZodString>;
2341
+ }, z.core.$strict>>;
2342
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
2343
+ }, z.core.$strict>>;
2344
+ has_more: z.ZodBoolean;
2345
+ url: z.ZodString;
2346
+ }, z.core.$strict>;
2347
+ readonly sdk: "invoices.listLineItems";
2348
+ }, {
2349
+ readonly operationId: "retrieveInvoicePdf";
2350
+ readonly method: "get";
2351
+ readonly path: "/v1/invoices/{id}/pdf";
2352
+ readonly tag: "Invoices";
2353
+ readonly summary: "Download an invoice's PDF";
2354
+ readonly auth: "service";
2355
+ readonly scope: "payments:read";
2356
+ readonly params: {
2357
+ readonly id: "The invoice (`in_…`).";
2358
+ };
2359
+ readonly response: {
2360
+ readonly kind: "binary";
2361
+ readonly contentType: "application/pdf";
2362
+ };
2363
+ readonly sdk: "invoices.retrievePdf";
2364
+ }, {
2365
+ readonly operationId: "searchInvoices";
2366
+ readonly method: "get";
2367
+ readonly path: "/v1/invoices/search";
2368
+ readonly tag: "Invoices";
2369
+ readonly summary: "Search invoices";
2370
+ readonly description: "Stripe's query language over the invoice's fields and `metadata['key']`.";
2371
+ readonly auth: "service";
2372
+ readonly scope: "payments:read";
2373
+ readonly query: z.ZodObject<{
2374
+ query: z.ZodString;
2375
+ limit: z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>, z.ZodTransform<number, number | undefined>>;
2376
+ page: z.ZodOptional<z.ZodString>;
2377
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
2378
+ }, z.core.$strict>;
2379
+ readonly response: z.ZodObject<{
2380
+ object: z.ZodLiteral<"search_result">;
2381
+ data: z.ZodArray<z.ZodObject<{
2382
+ id: z.ZodString;
2383
+ object: z.ZodLiteral<"invoice">;
2384
+ livemode: z.ZodBoolean;
2385
+ number: z.ZodNullable<z.ZodString>;
2386
+ customer: z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>;
2387
+ customer_email: z.ZodNullable<z.ZodString>;
2388
+ customer_name: z.ZodNullable<z.ZodString>;
2389
+ subscription: z.ZodNullable<z.ZodType<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">, z.core.$ZodTypeInternals<string | import("../..").Ref<"subscription">, string | import("../..").Ref<"subscription">>>>;
2390
+ status: z.ZodEnum<{
2391
+ void: "void";
2392
+ draft: "draft";
2393
+ open: "open";
2394
+ paid: "paid";
2395
+ uncollectible: "uncollectible";
2396
+ }>;
2397
+ billing_reason: z.ZodEnum<{
2398
+ subscription_cancel: "subscription_cancel";
2399
+ subscription_update: "subscription_update";
2400
+ manual: "manual";
2401
+ subscription_create: "subscription_create";
2402
+ subscription_cycle: "subscription_cycle";
2403
+ upcoming: "upcoming";
2404
+ }>;
2405
+ collection_method: z.ZodEnum<{
2406
+ charge_automatically: "charge_automatically";
2407
+ send_invoice: "send_invoice";
2408
+ }>;
2409
+ currency: z.ZodEnum<{
2410
+ FAIR: "FAIR";
2411
+ EUR: "EUR";
2412
+ USD: "USD";
2413
+ GBP: "GBP";
2414
+ CHF: "CHF";
2415
+ SEK: "SEK";
2416
+ NOK: "NOK";
2417
+ DKK: "DKK";
2418
+ PLN: "PLN";
2419
+ CZK: "CZK";
2420
+ CAD: "CAD";
2421
+ AUD: "AUD";
2422
+ JPY: "JPY";
2423
+ }>;
2424
+ description: z.ZodNullable<z.ZodString>;
2425
+ auto_advance: z.ZodBoolean;
2426
+ automatically_finalizes_at: z.ZodNullable<z.ZodNumber>;
2427
+ lines: z.ZodObject<{
2428
+ object: z.ZodLiteral<"list">;
2429
+ data: z.ZodArray<z.ZodObject<{
2430
+ id: z.ZodString;
2431
+ object: z.ZodLiteral<"line_item">;
2432
+ livemode: z.ZodBoolean;
2433
+ invoice: z.ZodString;
2434
+ type: z.ZodEnum<{
2435
+ subscription: "subscription";
2436
+ invoiceitem: "invoiceitem";
2437
+ }>;
2438
+ amount: z.ZodString;
2439
+ currency: z.ZodEnum<{
2440
+ FAIR: "FAIR";
2441
+ EUR: "EUR";
2442
+ USD: "USD";
2443
+ GBP: "GBP";
2444
+ CHF: "CHF";
2445
+ SEK: "SEK";
2446
+ NOK: "NOK";
2447
+ DKK: "DKK";
2448
+ PLN: "PLN";
2449
+ CZK: "CZK";
2450
+ CAD: "CAD";
2451
+ AUD: "AUD";
2452
+ JPY: "JPY";
2453
+ }>;
2454
+ description: z.ZodNullable<z.ZodString>;
2455
+ discount_amounts: z.ZodArray<z.ZodObject<{
2456
+ amount: z.ZodString;
2457
+ discount: z.ZodString;
2458
+ }, z.core.$strict>>;
2459
+ discountable: z.ZodBoolean;
2460
+ period: z.ZodObject<{
2461
+ start: z.ZodNumber;
2462
+ end: z.ZodNumber;
2463
+ }, z.core.$strict>;
2464
+ price: z.ZodNullable<z.ZodType<import("../..").Ref<"price">, import("../..").Ref<"price">, z.core.$ZodTypeInternals<import("../..").Ref<"price">, import("../..").Ref<"price">>>>;
2465
+ quantity: z.ZodNullable<z.ZodNumber>;
2466
+ proration: z.ZodBoolean;
2467
+ subscription: z.ZodNullable<z.ZodString>;
2468
+ subscription_item: z.ZodNullable<z.ZodString>;
2469
+ invoice_item: z.ZodNullable<z.ZodString>;
2470
+ tax_amounts: z.ZodArray<z.ZodObject<{
2471
+ amount: z.ZodString;
2472
+ inclusive: z.ZodBoolean;
2473
+ tax_calculation: z.ZodNullable<z.ZodString>;
2474
+ taxability_reason: z.ZodNullable<z.ZodString>;
2475
+ }, z.core.$strict>>;
2476
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
2477
+ }, z.core.$strict>>;
2478
+ has_more: z.ZodBoolean;
2479
+ url: z.ZodString;
2480
+ }, z.core.$strict>;
2481
+ subtotal: z.ZodString;
2482
+ subtotal_excluding_tax: z.ZodString;
2483
+ total_discount_amounts: z.ZodArray<z.ZodObject<{
2484
+ amount: z.ZodString;
2485
+ discount: z.ZodString;
2486
+ }, z.core.$strict>>;
2487
+ discount: z.ZodNullable<z.ZodObject<{
2488
+ object: z.ZodLiteral<"discount">;
2489
+ coupon: z.ZodString;
2490
+ promotion_code: z.ZodNullable<z.ZodString>;
2491
+ start: z.ZodNumber;
2492
+ end: z.ZodNullable<z.ZodNumber>;
2493
+ }, z.core.$strict>>;
2494
+ tax: z.ZodNullable<z.ZodString>;
2495
+ total: z.ZodString;
2496
+ total_excluding_tax: z.ZodString;
2497
+ starting_balance: z.ZodString;
2498
+ ending_balance: z.ZodNullable<z.ZodString>;
2499
+ amount_due: z.ZodString;
2500
+ amount_paid: z.ZodString;
2501
+ amount_remaining: z.ZodString;
2502
+ pre_payment_credit_notes_amount: z.ZodString;
2503
+ post_payment_credit_notes_amount: z.ZodString;
2504
+ attempt_count: z.ZodNumber;
2505
+ attempted: z.ZodBoolean;
2506
+ next_payment_attempt: z.ZodNullable<z.ZodNumber>;
2507
+ due_date: z.ZodNullable<z.ZodNumber>;
2508
+ days_until_due: z.ZodNullable<z.ZodNumber>;
2509
+ period_start: z.ZodNumber;
2510
+ period_end: z.ZodNumber;
2511
+ payment_intent: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">>>>;
2512
+ default_payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
2513
+ automatic_tax: z.ZodObject<{
2514
+ enabled: z.ZodBoolean;
2515
+ status: z.ZodNullable<z.ZodEnum<{
2516
+ requires_location_inputs: "requires_location_inputs";
2517
+ failed: "failed";
2518
+ complete: "complete";
2519
+ }>>;
2520
+ tax_calculation: z.ZodNullable<z.ZodString>;
2521
+ }, z.core.$strict>;
2522
+ hosted_invoice_url: z.ZodNullable<z.ZodString>;
2523
+ invoice_pdf: z.ZodNullable<z.ZodString>;
2524
+ last_finalization_error: z.ZodNullable<z.ZodObject<{
2525
+ code: z.ZodString;
2526
+ message: z.ZodString;
2527
+ }, z.core.$strict>>;
2528
+ status_transitions: z.ZodObject<{
2529
+ finalized_at: z.ZodNullable<z.ZodNumber>;
2530
+ paid_at: z.ZodNullable<z.ZodNumber>;
2531
+ voided_at: z.ZodNullable<z.ZodNumber>;
2532
+ marked_uncollectible_at: z.ZodNullable<z.ZodNumber>;
2533
+ }, z.core.$strict>;
2534
+ paid_out_of_band: z.ZodBoolean;
2535
+ test_clock: z.ZodNullable<z.ZodString>;
2536
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
2537
+ created: z.ZodNumber;
2538
+ effective_at: z.ZodNullable<z.ZodNumber>;
2539
+ }, z.core.$strict>>;
2540
+ has_more: z.ZodBoolean;
2541
+ next_page: z.ZodNullable<z.ZodString>;
2542
+ url: z.ZodString;
2543
+ total_count: z.ZodOptional<z.ZodNumber>;
2544
+ }, z.core.$strict>;
2545
+ readonly sdk: "invoices.search";
2546
+ readonly expandable: "invoice";
2547
+ }];