@peable.to/contracts 0.3.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 -97
  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 -94
  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 -134
  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 -138
  315. package/dist/esm/openapi.js +0 -134
  316. package/dist/types/openapi.d.ts +0 -145
@@ -0,0 +1,655 @@
1
+ import { z } from 'zod';
2
+ import { type Expand } from '../../common/objects';
3
+ /**
4
+ * Credit notes (`cn_…`, ADR 0018 §4): a finalized invoice credited — on an
5
+ * `open` one it reduces what is due; on a `paid` one it is given back
6
+ * (refunded through the invoice's payment, credited to the customer balance,
7
+ * or recorded as returned outside Orbit).
8
+ */
9
+ export declare const creditNoteLineItemSchema: z.ZodObject<{
10
+ id: z.ZodString;
11
+ object: z.ZodLiteral<"credit_note_line_item">;
12
+ type: z.ZodEnum<{
13
+ invoice_line_item: "invoice_line_item";
14
+ custom_line_item: "custom_line_item";
15
+ }>;
16
+ invoice_line_item: z.ZodNullable<z.ZodString>;
17
+ description: z.ZodNullable<z.ZodString>;
18
+ quantity: z.ZodNullable<z.ZodNumber>;
19
+ amount: z.ZodString;
20
+ tax_amount: z.ZodString;
21
+ }, z.core.$strict>;
22
+ export type CreditNoteLineItem = z.output<typeof creditNoteLineItemSchema>;
23
+ export declare const creditNoteSchema: z.ZodObject<{
24
+ id: z.ZodString;
25
+ object: z.ZodLiteral<"credit_note">;
26
+ livemode: z.ZodBoolean;
27
+ number: z.ZodString;
28
+ invoice: z.ZodType<string | import("../..").Ref<"invoice">, string | import("../..").Ref<"invoice">, z.core.$ZodTypeInternals<string | import("../..").Ref<"invoice">, string | import("../..").Ref<"invoice">>>;
29
+ customer: z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>;
30
+ status: z.ZodEnum<{
31
+ void: "void";
32
+ issued: "issued";
33
+ }>;
34
+ type: z.ZodEnum<{
35
+ pre_payment: "pre_payment";
36
+ post_payment: "post_payment";
37
+ }>;
38
+ reason: z.ZodNullable<z.ZodEnum<{
39
+ duplicate: "duplicate";
40
+ fraudulent: "fraudulent";
41
+ order_change: "order_change";
42
+ product_unsatisfactory: "product_unsatisfactory";
43
+ }>>;
44
+ currency: z.ZodEnum<{
45
+ FAIR: "FAIR";
46
+ EUR: "EUR";
47
+ USD: "USD";
48
+ GBP: "GBP";
49
+ CHF: "CHF";
50
+ SEK: "SEK";
51
+ NOK: "NOK";
52
+ DKK: "DKK";
53
+ PLN: "PLN";
54
+ CZK: "CZK";
55
+ CAD: "CAD";
56
+ AUD: "AUD";
57
+ JPY: "JPY";
58
+ }>;
59
+ lines: z.ZodObject<{
60
+ object: z.ZodLiteral<"list">;
61
+ data: z.ZodArray<z.ZodObject<{
62
+ id: z.ZodString;
63
+ object: z.ZodLiteral<"credit_note_line_item">;
64
+ type: z.ZodEnum<{
65
+ invoice_line_item: "invoice_line_item";
66
+ custom_line_item: "custom_line_item";
67
+ }>;
68
+ invoice_line_item: z.ZodNullable<z.ZodString>;
69
+ description: z.ZodNullable<z.ZodString>;
70
+ quantity: z.ZodNullable<z.ZodNumber>;
71
+ amount: z.ZodString;
72
+ tax_amount: z.ZodString;
73
+ }, z.core.$strict>>;
74
+ has_more: z.ZodBoolean;
75
+ url: z.ZodString;
76
+ }, z.core.$strict>;
77
+ subtotal: z.ZodString;
78
+ tax: z.ZodString;
79
+ total: z.ZodString;
80
+ refund_amount: z.ZodString;
81
+ credit_amount: z.ZodString;
82
+ out_of_band_amount: z.ZodString;
83
+ refund: z.ZodNullable<z.ZodString>;
84
+ customer_balance_transaction: z.ZodNullable<z.ZodString>;
85
+ memo: z.ZodNullable<z.ZodString>;
86
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
87
+ voided_at: z.ZodNullable<z.ZodNumber>;
88
+ created: z.ZodNumber;
89
+ }, z.core.$strict>;
90
+ export type CreditNote = Expand<z.output<typeof creditNoteSchema>>;
91
+ declare module '../../common/objects' {
92
+ interface ObjectMap {
93
+ credit_note: CreditNote;
94
+ }
95
+ }
96
+ /**
97
+ * Credit `lines`, or a whole `amount` (custom).
98
+ *
99
+ * On a `paid` invoice the credit must be distributed: `refund_amount` (through
100
+ * the invoice's payment; card only), `credit_amount` (to the customer balance)
101
+ * and `out_of_band_amount` must add up to the total. Omitted, all of it is
102
+ * refunded on a card invoice and credited to the balance otherwise. On an
103
+ * `open` invoice it reduces `amount_due` and none of the three apply.
104
+ */
105
+ export declare const createCreditNoteParams: z.ZodObject<{
106
+ lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
107
+ quantity: z.ZodOptional<z.ZodNumber>;
108
+ type: z.ZodEnum<{
109
+ invoice_line_item: "invoice_line_item";
110
+ custom_line_item: "custom_line_item";
111
+ }>;
112
+ invoice_line_item: z.ZodOptional<z.ZodString>;
113
+ amount: z.ZodOptional<z.ZodString>;
114
+ description: z.ZodOptional<z.ZodString>;
115
+ }, z.core.$strict>>>;
116
+ metadata: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<Record<string, string>, Record<string, string>>>>;
117
+ 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>>>;
118
+ invoice: z.ZodString;
119
+ amount: z.ZodOptional<z.ZodString>;
120
+ reason: z.ZodOptional<z.ZodEnum<{
121
+ duplicate: "duplicate";
122
+ fraudulent: "fraudulent";
123
+ order_change: "order_change";
124
+ product_unsatisfactory: "product_unsatisfactory";
125
+ }>>;
126
+ memo: z.ZodOptional<z.ZodString>;
127
+ refund_amount: z.ZodOptional<z.ZodString>;
128
+ credit_amount: z.ZodOptional<z.ZodString>;
129
+ out_of_band_amount: z.ZodOptional<z.ZodString>;
130
+ }, z.core.$strict>;
131
+ export type CreateCreditNoteParams = z.input<typeof createCreditNoteParams>;
132
+ /** The create's fields as a query (`lines[0][type]=…`). */
133
+ export declare const previewCreditNoteQuery: z.ZodObject<{
134
+ lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
135
+ quantity: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
136
+ type: z.ZodEnum<{
137
+ invoice_line_item: "invoice_line_item";
138
+ custom_line_item: "custom_line_item";
139
+ }>;
140
+ invoice_line_item: z.ZodOptional<z.ZodString>;
141
+ amount: z.ZodOptional<z.ZodString>;
142
+ description: z.ZodOptional<z.ZodString>;
143
+ }, z.core.$strict>>>;
144
+ invoice: z.ZodString;
145
+ amount: z.ZodOptional<z.ZodString>;
146
+ reason: z.ZodOptional<z.ZodEnum<{
147
+ duplicate: "duplicate";
148
+ fraudulent: "fraudulent";
149
+ order_change: "order_change";
150
+ product_unsatisfactory: "product_unsatisfactory";
151
+ }>>;
152
+ memo: z.ZodOptional<z.ZodString>;
153
+ refund_amount: z.ZodOptional<z.ZodString>;
154
+ credit_amount: z.ZodOptional<z.ZodString>;
155
+ out_of_band_amount: z.ZodOptional<z.ZodString>;
156
+ }, z.core.$strict>;
157
+ export type PreviewCreditNoteParams = z.input<typeof previewCreditNoteQuery>;
158
+ export declare const voidCreditNoteParams: z.ZodObject<{
159
+ 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>>>;
160
+ }, z.core.$strict>;
161
+ export type VoidCreditNoteParams = z.input<typeof voidCreditNoteParams>;
162
+ export declare const listCreditNotesQuery: z.ZodObject<{
163
+ 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>>;
164
+ starting_after: z.ZodOptional<z.ZodString>;
165
+ ending_before: z.ZodOptional<z.ZodString>;
166
+ 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<{
167
+ gt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
168
+ gte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
169
+ lt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
170
+ lte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
171
+ }, z.core.$strict>, z.ZodTransform<import("../..").RangeFilter, {
172
+ gt?: number | undefined;
173
+ gte?: number | undefined;
174
+ lt?: number | undefined;
175
+ lte?: number | undefined;
176
+ }>>]>>;
177
+ 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>>>;
178
+ invoice: z.ZodOptional<z.ZodString>;
179
+ customer: z.ZodOptional<z.ZodString>;
180
+ }, z.core.$strict>;
181
+ export type CreditNoteListParams = z.input<typeof listCreditNotesQuery>;
182
+ export declare const creditNoteRoutes: readonly [{
183
+ readonly operationId: "createCreditNote";
184
+ readonly method: "post";
185
+ readonly path: "/v1/credit_notes";
186
+ readonly tag: "Credit notes";
187
+ readonly summary: "Issue a credit note";
188
+ readonly auth: "service";
189
+ readonly scope: "payments:write";
190
+ readonly idempotent: true;
191
+ readonly body: z.ZodObject<{
192
+ lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
193
+ quantity: z.ZodOptional<z.ZodNumber>;
194
+ type: z.ZodEnum<{
195
+ invoice_line_item: "invoice_line_item";
196
+ custom_line_item: "custom_line_item";
197
+ }>;
198
+ invoice_line_item: z.ZodOptional<z.ZodString>;
199
+ amount: z.ZodOptional<z.ZodString>;
200
+ description: z.ZodOptional<z.ZodString>;
201
+ }, z.core.$strict>>>;
202
+ metadata: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<Record<string, string>, Record<string, string>>>>;
203
+ 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>>>;
204
+ invoice: z.ZodString;
205
+ amount: z.ZodOptional<z.ZodString>;
206
+ reason: z.ZodOptional<z.ZodEnum<{
207
+ duplicate: "duplicate";
208
+ fraudulent: "fraudulent";
209
+ order_change: "order_change";
210
+ product_unsatisfactory: "product_unsatisfactory";
211
+ }>>;
212
+ memo: z.ZodOptional<z.ZodString>;
213
+ refund_amount: z.ZodOptional<z.ZodString>;
214
+ credit_amount: z.ZodOptional<z.ZodString>;
215
+ out_of_band_amount: z.ZodOptional<z.ZodString>;
216
+ }, z.core.$strict>;
217
+ readonly response: z.ZodObject<{
218
+ id: z.ZodString;
219
+ object: z.ZodLiteral<"credit_note">;
220
+ livemode: z.ZodBoolean;
221
+ number: z.ZodString;
222
+ invoice: z.ZodType<string | import("../..").Ref<"invoice">, string | import("../..").Ref<"invoice">, z.core.$ZodTypeInternals<string | import("../..").Ref<"invoice">, string | import("../..").Ref<"invoice">>>;
223
+ customer: z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>;
224
+ status: z.ZodEnum<{
225
+ void: "void";
226
+ issued: "issued";
227
+ }>;
228
+ type: z.ZodEnum<{
229
+ pre_payment: "pre_payment";
230
+ post_payment: "post_payment";
231
+ }>;
232
+ reason: z.ZodNullable<z.ZodEnum<{
233
+ duplicate: "duplicate";
234
+ fraudulent: "fraudulent";
235
+ order_change: "order_change";
236
+ product_unsatisfactory: "product_unsatisfactory";
237
+ }>>;
238
+ currency: z.ZodEnum<{
239
+ FAIR: "FAIR";
240
+ EUR: "EUR";
241
+ USD: "USD";
242
+ GBP: "GBP";
243
+ CHF: "CHF";
244
+ SEK: "SEK";
245
+ NOK: "NOK";
246
+ DKK: "DKK";
247
+ PLN: "PLN";
248
+ CZK: "CZK";
249
+ CAD: "CAD";
250
+ AUD: "AUD";
251
+ JPY: "JPY";
252
+ }>;
253
+ lines: z.ZodObject<{
254
+ object: z.ZodLiteral<"list">;
255
+ data: z.ZodArray<z.ZodObject<{
256
+ id: z.ZodString;
257
+ object: z.ZodLiteral<"credit_note_line_item">;
258
+ type: z.ZodEnum<{
259
+ invoice_line_item: "invoice_line_item";
260
+ custom_line_item: "custom_line_item";
261
+ }>;
262
+ invoice_line_item: z.ZodNullable<z.ZodString>;
263
+ description: z.ZodNullable<z.ZodString>;
264
+ quantity: z.ZodNullable<z.ZodNumber>;
265
+ amount: z.ZodString;
266
+ tax_amount: z.ZodString;
267
+ }, z.core.$strict>>;
268
+ has_more: z.ZodBoolean;
269
+ url: z.ZodString;
270
+ }, z.core.$strict>;
271
+ subtotal: z.ZodString;
272
+ tax: z.ZodString;
273
+ total: z.ZodString;
274
+ refund_amount: z.ZodString;
275
+ credit_amount: z.ZodString;
276
+ out_of_band_amount: z.ZodString;
277
+ refund: z.ZodNullable<z.ZodString>;
278
+ customer_balance_transaction: z.ZodNullable<z.ZodString>;
279
+ memo: z.ZodNullable<z.ZodString>;
280
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
281
+ voided_at: z.ZodNullable<z.ZodNumber>;
282
+ created: z.ZodNumber;
283
+ }, z.core.$strict>;
284
+ readonly sdk: "creditNotes.create";
285
+ readonly expandable: "credit_note";
286
+ }, {
287
+ readonly operationId: "listCreditNotes";
288
+ readonly method: "get";
289
+ readonly path: "/v1/credit_notes";
290
+ readonly tag: "Credit notes";
291
+ readonly summary: "List credit notes";
292
+ readonly auth: "service";
293
+ readonly scope: "payments:read";
294
+ readonly query: z.ZodObject<{
295
+ 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>>;
296
+ starting_after: z.ZodOptional<z.ZodString>;
297
+ ending_before: z.ZodOptional<z.ZodString>;
298
+ 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<{
299
+ gt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
300
+ gte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
301
+ lt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
302
+ lte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
303
+ }, z.core.$strict>, z.ZodTransform<import("../..").RangeFilter, {
304
+ gt?: number | undefined;
305
+ gte?: number | undefined;
306
+ lt?: number | undefined;
307
+ lte?: number | undefined;
308
+ }>>]>>;
309
+ 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>>>;
310
+ invoice: z.ZodOptional<z.ZodString>;
311
+ customer: z.ZodOptional<z.ZodString>;
312
+ }, z.core.$strict>;
313
+ readonly response: z.ZodObject<{
314
+ object: z.ZodLiteral<"list">;
315
+ data: z.ZodArray<z.ZodObject<{
316
+ id: z.ZodString;
317
+ object: z.ZodLiteral<"credit_note">;
318
+ livemode: z.ZodBoolean;
319
+ number: z.ZodString;
320
+ invoice: z.ZodType<string | import("../..").Ref<"invoice">, string | import("../..").Ref<"invoice">, z.core.$ZodTypeInternals<string | import("../..").Ref<"invoice">, string | import("../..").Ref<"invoice">>>;
321
+ customer: z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>;
322
+ status: z.ZodEnum<{
323
+ void: "void";
324
+ issued: "issued";
325
+ }>;
326
+ type: z.ZodEnum<{
327
+ pre_payment: "pre_payment";
328
+ post_payment: "post_payment";
329
+ }>;
330
+ reason: z.ZodNullable<z.ZodEnum<{
331
+ duplicate: "duplicate";
332
+ fraudulent: "fraudulent";
333
+ order_change: "order_change";
334
+ product_unsatisfactory: "product_unsatisfactory";
335
+ }>>;
336
+ currency: z.ZodEnum<{
337
+ FAIR: "FAIR";
338
+ EUR: "EUR";
339
+ USD: "USD";
340
+ GBP: "GBP";
341
+ CHF: "CHF";
342
+ SEK: "SEK";
343
+ NOK: "NOK";
344
+ DKK: "DKK";
345
+ PLN: "PLN";
346
+ CZK: "CZK";
347
+ CAD: "CAD";
348
+ AUD: "AUD";
349
+ JPY: "JPY";
350
+ }>;
351
+ lines: z.ZodObject<{
352
+ object: z.ZodLiteral<"list">;
353
+ data: z.ZodArray<z.ZodObject<{
354
+ id: z.ZodString;
355
+ object: z.ZodLiteral<"credit_note_line_item">;
356
+ type: z.ZodEnum<{
357
+ invoice_line_item: "invoice_line_item";
358
+ custom_line_item: "custom_line_item";
359
+ }>;
360
+ invoice_line_item: z.ZodNullable<z.ZodString>;
361
+ description: z.ZodNullable<z.ZodString>;
362
+ quantity: z.ZodNullable<z.ZodNumber>;
363
+ amount: z.ZodString;
364
+ tax_amount: z.ZodString;
365
+ }, z.core.$strict>>;
366
+ has_more: z.ZodBoolean;
367
+ url: z.ZodString;
368
+ }, z.core.$strict>;
369
+ subtotal: z.ZodString;
370
+ tax: z.ZodString;
371
+ total: z.ZodString;
372
+ refund_amount: z.ZodString;
373
+ credit_amount: z.ZodString;
374
+ out_of_band_amount: z.ZodString;
375
+ refund: z.ZodNullable<z.ZodString>;
376
+ customer_balance_transaction: z.ZodNullable<z.ZodString>;
377
+ memo: z.ZodNullable<z.ZodString>;
378
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
379
+ voided_at: z.ZodNullable<z.ZodNumber>;
380
+ created: z.ZodNumber;
381
+ }, z.core.$strict>>;
382
+ has_more: z.ZodBoolean;
383
+ url: z.ZodString;
384
+ }, z.core.$strict>;
385
+ readonly sdk: "creditNotes.list";
386
+ readonly expandable: "credit_note";
387
+ }, {
388
+ readonly operationId: "previewCreditNote";
389
+ readonly method: "get";
390
+ readonly path: "/v1/credit_notes/preview";
391
+ readonly tag: "Credit notes";
392
+ readonly summary: "Preview a credit note";
393
+ readonly description: "The note `POST /v1/credit_notes` would issue with the same fields, computed and never stored (its `id` and `number` are empty).";
394
+ readonly auth: "service";
395
+ readonly scope: "payments:read";
396
+ readonly query: z.ZodObject<{
397
+ lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
398
+ quantity: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
399
+ type: z.ZodEnum<{
400
+ invoice_line_item: "invoice_line_item";
401
+ custom_line_item: "custom_line_item";
402
+ }>;
403
+ invoice_line_item: z.ZodOptional<z.ZodString>;
404
+ amount: z.ZodOptional<z.ZodString>;
405
+ description: z.ZodOptional<z.ZodString>;
406
+ }, z.core.$strict>>>;
407
+ invoice: z.ZodString;
408
+ amount: z.ZodOptional<z.ZodString>;
409
+ reason: z.ZodOptional<z.ZodEnum<{
410
+ duplicate: "duplicate";
411
+ fraudulent: "fraudulent";
412
+ order_change: "order_change";
413
+ product_unsatisfactory: "product_unsatisfactory";
414
+ }>>;
415
+ memo: z.ZodOptional<z.ZodString>;
416
+ refund_amount: z.ZodOptional<z.ZodString>;
417
+ credit_amount: z.ZodOptional<z.ZodString>;
418
+ out_of_band_amount: z.ZodOptional<z.ZodString>;
419
+ }, z.core.$strict>;
420
+ readonly response: z.ZodObject<{
421
+ id: z.ZodString;
422
+ object: z.ZodLiteral<"credit_note">;
423
+ livemode: z.ZodBoolean;
424
+ number: z.ZodString;
425
+ invoice: z.ZodType<string | import("../..").Ref<"invoice">, string | import("../..").Ref<"invoice">, z.core.$ZodTypeInternals<string | import("../..").Ref<"invoice">, string | import("../..").Ref<"invoice">>>;
426
+ customer: z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>;
427
+ status: z.ZodEnum<{
428
+ void: "void";
429
+ issued: "issued";
430
+ }>;
431
+ type: z.ZodEnum<{
432
+ pre_payment: "pre_payment";
433
+ post_payment: "post_payment";
434
+ }>;
435
+ reason: z.ZodNullable<z.ZodEnum<{
436
+ duplicate: "duplicate";
437
+ fraudulent: "fraudulent";
438
+ order_change: "order_change";
439
+ product_unsatisfactory: "product_unsatisfactory";
440
+ }>>;
441
+ currency: z.ZodEnum<{
442
+ FAIR: "FAIR";
443
+ EUR: "EUR";
444
+ USD: "USD";
445
+ GBP: "GBP";
446
+ CHF: "CHF";
447
+ SEK: "SEK";
448
+ NOK: "NOK";
449
+ DKK: "DKK";
450
+ PLN: "PLN";
451
+ CZK: "CZK";
452
+ CAD: "CAD";
453
+ AUD: "AUD";
454
+ JPY: "JPY";
455
+ }>;
456
+ lines: z.ZodObject<{
457
+ object: z.ZodLiteral<"list">;
458
+ data: z.ZodArray<z.ZodObject<{
459
+ id: z.ZodString;
460
+ object: z.ZodLiteral<"credit_note_line_item">;
461
+ type: z.ZodEnum<{
462
+ invoice_line_item: "invoice_line_item";
463
+ custom_line_item: "custom_line_item";
464
+ }>;
465
+ invoice_line_item: z.ZodNullable<z.ZodString>;
466
+ description: z.ZodNullable<z.ZodString>;
467
+ quantity: z.ZodNullable<z.ZodNumber>;
468
+ amount: z.ZodString;
469
+ tax_amount: z.ZodString;
470
+ }, z.core.$strict>>;
471
+ has_more: z.ZodBoolean;
472
+ url: z.ZodString;
473
+ }, z.core.$strict>;
474
+ subtotal: z.ZodString;
475
+ tax: z.ZodString;
476
+ total: z.ZodString;
477
+ refund_amount: z.ZodString;
478
+ credit_amount: z.ZodString;
479
+ out_of_band_amount: z.ZodString;
480
+ refund: z.ZodNullable<z.ZodString>;
481
+ customer_balance_transaction: z.ZodNullable<z.ZodString>;
482
+ memo: z.ZodNullable<z.ZodString>;
483
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
484
+ voided_at: z.ZodNullable<z.ZodNumber>;
485
+ created: z.ZodNumber;
486
+ }, z.core.$strict>;
487
+ readonly sdk: "creditNotes.preview";
488
+ }, {
489
+ readonly operationId: "retrieveCreditNote";
490
+ readonly method: "get";
491
+ readonly path: "/v1/credit_notes/{id}";
492
+ readonly tag: "Credit notes";
493
+ readonly summary: "Retrieve a credit note";
494
+ readonly auth: "service";
495
+ readonly scope: "payments:read";
496
+ readonly params: {
497
+ readonly id: "The credit note (`cn_…`).";
498
+ };
499
+ readonly query: z.ZodObject<{
500
+ 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>>>;
501
+ }, z.core.$strict>;
502
+ readonly response: z.ZodObject<{
503
+ id: z.ZodString;
504
+ object: z.ZodLiteral<"credit_note">;
505
+ livemode: z.ZodBoolean;
506
+ number: z.ZodString;
507
+ invoice: z.ZodType<string | import("../..").Ref<"invoice">, string | import("../..").Ref<"invoice">, z.core.$ZodTypeInternals<string | import("../..").Ref<"invoice">, string | import("../..").Ref<"invoice">>>;
508
+ customer: z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>;
509
+ status: z.ZodEnum<{
510
+ void: "void";
511
+ issued: "issued";
512
+ }>;
513
+ type: z.ZodEnum<{
514
+ pre_payment: "pre_payment";
515
+ post_payment: "post_payment";
516
+ }>;
517
+ reason: z.ZodNullable<z.ZodEnum<{
518
+ duplicate: "duplicate";
519
+ fraudulent: "fraudulent";
520
+ order_change: "order_change";
521
+ product_unsatisfactory: "product_unsatisfactory";
522
+ }>>;
523
+ currency: z.ZodEnum<{
524
+ FAIR: "FAIR";
525
+ EUR: "EUR";
526
+ USD: "USD";
527
+ GBP: "GBP";
528
+ CHF: "CHF";
529
+ SEK: "SEK";
530
+ NOK: "NOK";
531
+ DKK: "DKK";
532
+ PLN: "PLN";
533
+ CZK: "CZK";
534
+ CAD: "CAD";
535
+ AUD: "AUD";
536
+ JPY: "JPY";
537
+ }>;
538
+ lines: z.ZodObject<{
539
+ object: z.ZodLiteral<"list">;
540
+ data: z.ZodArray<z.ZodObject<{
541
+ id: z.ZodString;
542
+ object: z.ZodLiteral<"credit_note_line_item">;
543
+ type: z.ZodEnum<{
544
+ invoice_line_item: "invoice_line_item";
545
+ custom_line_item: "custom_line_item";
546
+ }>;
547
+ invoice_line_item: z.ZodNullable<z.ZodString>;
548
+ description: z.ZodNullable<z.ZodString>;
549
+ quantity: z.ZodNullable<z.ZodNumber>;
550
+ amount: z.ZodString;
551
+ tax_amount: z.ZodString;
552
+ }, z.core.$strict>>;
553
+ has_more: z.ZodBoolean;
554
+ url: z.ZodString;
555
+ }, z.core.$strict>;
556
+ subtotal: z.ZodString;
557
+ tax: z.ZodString;
558
+ total: z.ZodString;
559
+ refund_amount: z.ZodString;
560
+ credit_amount: z.ZodString;
561
+ out_of_band_amount: z.ZodString;
562
+ refund: z.ZodNullable<z.ZodString>;
563
+ customer_balance_transaction: z.ZodNullable<z.ZodString>;
564
+ memo: z.ZodNullable<z.ZodString>;
565
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
566
+ voided_at: z.ZodNullable<z.ZodNumber>;
567
+ created: z.ZodNumber;
568
+ }, z.core.$strict>;
569
+ readonly sdk: "creditNotes.retrieve";
570
+ readonly expandable: "credit_note";
571
+ }, {
572
+ readonly operationId: "voidCreditNote";
573
+ readonly method: "post";
574
+ readonly path: "/v1/credit_notes/{id}/void";
575
+ readonly tag: "Credit notes";
576
+ readonly summary: "Void a credit note";
577
+ readonly auth: "service";
578
+ readonly scope: "payments:write";
579
+ readonly idempotent: true;
580
+ readonly params: {
581
+ readonly id: "The credit note (`cn_…`).";
582
+ };
583
+ readonly body: z.ZodObject<{
584
+ 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>>>;
585
+ }, z.core.$strict>;
586
+ readonly response: z.ZodObject<{
587
+ id: z.ZodString;
588
+ object: z.ZodLiteral<"credit_note">;
589
+ livemode: z.ZodBoolean;
590
+ number: z.ZodString;
591
+ invoice: z.ZodType<string | import("../..").Ref<"invoice">, string | import("../..").Ref<"invoice">, z.core.$ZodTypeInternals<string | import("../..").Ref<"invoice">, string | import("../..").Ref<"invoice">>>;
592
+ customer: z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>;
593
+ status: z.ZodEnum<{
594
+ void: "void";
595
+ issued: "issued";
596
+ }>;
597
+ type: z.ZodEnum<{
598
+ pre_payment: "pre_payment";
599
+ post_payment: "post_payment";
600
+ }>;
601
+ reason: z.ZodNullable<z.ZodEnum<{
602
+ duplicate: "duplicate";
603
+ fraudulent: "fraudulent";
604
+ order_change: "order_change";
605
+ product_unsatisfactory: "product_unsatisfactory";
606
+ }>>;
607
+ currency: z.ZodEnum<{
608
+ FAIR: "FAIR";
609
+ EUR: "EUR";
610
+ USD: "USD";
611
+ GBP: "GBP";
612
+ CHF: "CHF";
613
+ SEK: "SEK";
614
+ NOK: "NOK";
615
+ DKK: "DKK";
616
+ PLN: "PLN";
617
+ CZK: "CZK";
618
+ CAD: "CAD";
619
+ AUD: "AUD";
620
+ JPY: "JPY";
621
+ }>;
622
+ lines: z.ZodObject<{
623
+ object: z.ZodLiteral<"list">;
624
+ data: z.ZodArray<z.ZodObject<{
625
+ id: z.ZodString;
626
+ object: z.ZodLiteral<"credit_note_line_item">;
627
+ type: z.ZodEnum<{
628
+ invoice_line_item: "invoice_line_item";
629
+ custom_line_item: "custom_line_item";
630
+ }>;
631
+ invoice_line_item: z.ZodNullable<z.ZodString>;
632
+ description: z.ZodNullable<z.ZodString>;
633
+ quantity: z.ZodNullable<z.ZodNumber>;
634
+ amount: z.ZodString;
635
+ tax_amount: z.ZodString;
636
+ }, z.core.$strict>>;
637
+ has_more: z.ZodBoolean;
638
+ url: z.ZodString;
639
+ }, z.core.$strict>;
640
+ subtotal: z.ZodString;
641
+ tax: z.ZodString;
642
+ total: z.ZodString;
643
+ refund_amount: z.ZodString;
644
+ credit_amount: z.ZodString;
645
+ out_of_band_amount: z.ZodString;
646
+ refund: z.ZodNullable<z.ZodString>;
647
+ customer_balance_transaction: z.ZodNullable<z.ZodString>;
648
+ memo: z.ZodNullable<z.ZodString>;
649
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
650
+ voided_at: z.ZodNullable<z.ZodNumber>;
651
+ created: z.ZodNumber;
652
+ }, z.core.$strict>;
653
+ readonly sdk: "creditNotes.voidCreditNote";
654
+ readonly expandable: "credit_note";
655
+ }];