@revenexx/node 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/README.md +3 -0
  2. package/dist/client.d.mts +25 -0
  3. package/dist/client.d.ts +25 -0
  4. package/dist/client.js +39 -18
  5. package/dist/client.js.map +1 -1
  6. package/dist/client.mjs +35 -14
  7. package/dist/client.mjs.map +1 -1
  8. package/dist/enums/approval-rule-approver-type.d.mts +7 -0
  9. package/dist/enums/approval-rule-approver-type.d.ts +7 -0
  10. package/dist/enums/approval-rule-approver-type.js +12 -0
  11. package/dist/enums/approval-rule-approver-type.js.map +1 -0
  12. package/dist/enums/approval-rule-approver-type.mjs +11 -0
  13. package/dist/enums/approval-rule-approver-type.mjs.map +1 -0
  14. package/dist/enums/approval-rule-condition.d.mts +10 -0
  15. package/dist/enums/approval-rule-condition.d.ts +10 -0
  16. package/dist/enums/approval-rule-condition.js +15 -0
  17. package/dist/enums/approval-rule-condition.js.map +1 -0
  18. package/dist/enums/approval-rule-condition.mjs +14 -0
  19. package/dist/enums/approval-rule-condition.mjs.map +1 -0
  20. package/dist/enums/approval-rule-create-request-approver-type.d.mts +7 -0
  21. package/dist/enums/approval-rule-create-request-approver-type.d.ts +7 -0
  22. package/dist/enums/approval-rule-create-request-approver-type.js +12 -0
  23. package/dist/enums/approval-rule-create-request-approver-type.js.map +1 -0
  24. package/dist/enums/approval-rule-create-request-approver-type.mjs +11 -0
  25. package/dist/enums/approval-rule-create-request-approver-type.mjs.map +1 -0
  26. package/dist/enums/approval-rule-create-request-condition.d.mts +10 -0
  27. package/dist/enums/approval-rule-create-request-condition.d.ts +10 -0
  28. package/dist/enums/approval-rule-create-request-condition.js +15 -0
  29. package/dist/enums/approval-rule-create-request-condition.js.map +1 -0
  30. package/dist/enums/approval-rule-create-request-condition.mjs +14 -0
  31. package/dist/enums/approval-rule-create-request-condition.mjs.map +1 -0
  32. package/dist/enums/approval-rule-create-request-effect.d.mts +7 -0
  33. package/dist/enums/approval-rule-create-request-effect.d.ts +7 -0
  34. package/dist/enums/approval-rule-create-request-effect.js +12 -0
  35. package/dist/enums/approval-rule-create-request-effect.js.map +1 -0
  36. package/dist/enums/approval-rule-create-request-effect.mjs +11 -0
  37. package/dist/enums/approval-rule-create-request-effect.mjs.map +1 -0
  38. package/dist/enums/approval-rule-effect.d.mts +7 -0
  39. package/dist/enums/approval-rule-effect.d.ts +7 -0
  40. package/dist/enums/approval-rule-effect.js +12 -0
  41. package/dist/enums/approval-rule-effect.js.map +1 -0
  42. package/dist/enums/approval-rule-effect.mjs +11 -0
  43. package/dist/enums/approval-rule-effect.mjs.map +1 -0
  44. package/dist/enums/approval-rule-update-request-approver-type.d.mts +7 -0
  45. package/dist/enums/approval-rule-update-request-approver-type.d.ts +7 -0
  46. package/dist/enums/approval-rule-update-request-approver-type.js +12 -0
  47. package/dist/enums/approval-rule-update-request-approver-type.js.map +1 -0
  48. package/dist/enums/approval-rule-update-request-approver-type.mjs +11 -0
  49. package/dist/enums/approval-rule-update-request-approver-type.mjs.map +1 -0
  50. package/dist/enums/approval-rule-update-request-condition.d.mts +10 -0
  51. package/dist/enums/approval-rule-update-request-condition.d.ts +10 -0
  52. package/dist/enums/approval-rule-update-request-condition.js +15 -0
  53. package/dist/enums/approval-rule-update-request-condition.js.map +1 -0
  54. package/dist/enums/approval-rule-update-request-condition.mjs +14 -0
  55. package/dist/enums/approval-rule-update-request-condition.mjs.map +1 -0
  56. package/dist/enums/approval-rule-update-request-effect.d.mts +7 -0
  57. package/dist/enums/approval-rule-update-request-effect.d.ts +7 -0
  58. package/dist/enums/approval-rule-update-request-effect.js +12 -0
  59. package/dist/enums/approval-rule-update-request-effect.js.map +1 -0
  60. package/dist/enums/approval-rule-update-request-effect.mjs +11 -0
  61. package/dist/enums/approval-rule-update-request-effect.mjs.map +1 -0
  62. package/dist/enums/approver-type.d.mts +7 -0
  63. package/dist/enums/approver-type.d.ts +7 -0
  64. package/dist/enums/approver-type.js +12 -0
  65. package/dist/enums/approver-type.js.map +1 -0
  66. package/dist/enums/approver-type.mjs +11 -0
  67. package/dist/enums/approver-type.mjs.map +1 -0
  68. package/dist/enums/condition.d.mts +10 -0
  69. package/dist/enums/condition.d.ts +10 -0
  70. package/dist/enums/condition.js +15 -0
  71. package/dist/enums/condition.js.map +1 -0
  72. package/dist/enums/condition.mjs +14 -0
  73. package/dist/enums/condition.mjs.map +1 -0
  74. package/dist/enums/effect.d.mts +7 -0
  75. package/dist/enums/effect.d.ts +7 -0
  76. package/dist/enums/effect.js +12 -0
  77. package/dist/enums/effect.js.map +1 -0
  78. package/dist/enums/effect.mjs +11 -0
  79. package/dist/enums/effect.mjs.map +1 -0
  80. package/dist/enums/pending-approval-approver-type.d.mts +7 -0
  81. package/dist/enums/pending-approval-approver-type.d.ts +7 -0
  82. package/dist/enums/pending-approval-approver-type.js +12 -0
  83. package/dist/enums/pending-approval-approver-type.js.map +1 -0
  84. package/dist/enums/pending-approval-approver-type.mjs +11 -0
  85. package/dist/enums/pending-approval-approver-type.mjs.map +1 -0
  86. package/dist/enums/pending-approval-status.d.mts +7 -0
  87. package/dist/enums/pending-approval-status.d.ts +7 -0
  88. package/dist/enums/pending-approval-status.js +12 -0
  89. package/dist/enums/pending-approval-status.js.map +1 -0
  90. package/dist/enums/pending-approval-status.mjs +11 -0
  91. package/dist/enums/pending-approval-status.mjs.map +1 -0
  92. package/dist/enums/procurement-purchase-request-items-create-type.d.mts +7 -0
  93. package/dist/enums/procurement-purchase-request-items-create-type.d.ts +7 -0
  94. package/dist/enums/procurement-purchase-request-items-create-type.js +12 -0
  95. package/dist/enums/procurement-purchase-request-items-create-type.js.map +1 -0
  96. package/dist/enums/procurement-purchase-request-items-create-type.mjs +11 -0
  97. package/dist/enums/procurement-purchase-request-items-create-type.mjs.map +1 -0
  98. package/dist/enums/purchase-request-event-name.d.mts +12 -0
  99. package/dist/enums/purchase-request-event-name.d.ts +12 -0
  100. package/dist/enums/purchase-request-event-name.js +17 -0
  101. package/dist/enums/purchase-request-event-name.js.map +1 -0
  102. package/dist/enums/purchase-request-event-name.mjs +16 -0
  103. package/dist/enums/purchase-request-event-name.mjs.map +1 -0
  104. package/dist/enums/purchase-request-item-create-request-type.d.mts +7 -0
  105. package/dist/enums/purchase-request-item-create-request-type.d.ts +7 -0
  106. package/dist/enums/purchase-request-item-create-request-type.js +12 -0
  107. package/dist/enums/purchase-request-item-create-request-type.js.map +1 -0
  108. package/dist/enums/purchase-request-item-create-request-type.mjs +11 -0
  109. package/dist/enums/purchase-request-item-create-request-type.mjs.map +1 -0
  110. package/dist/enums/purchase-request-item-type.d.mts +7 -0
  111. package/dist/enums/purchase-request-item-type.d.ts +7 -0
  112. package/dist/enums/purchase-request-item-type.js +12 -0
  113. package/dist/enums/purchase-request-item-type.js.map +1 -0
  114. package/dist/enums/purchase-request-item-type.mjs +11 -0
  115. package/dist/enums/purchase-request-item-type.mjs.map +1 -0
  116. package/dist/enums/purchase-request-item-update-request-type.d.mts +7 -0
  117. package/dist/enums/purchase-request-item-update-request-type.d.ts +7 -0
  118. package/dist/enums/purchase-request-item-update-request-type.js +12 -0
  119. package/dist/enums/purchase-request-item-update-request-type.js.map +1 -0
  120. package/dist/enums/purchase-request-item-update-request-type.mjs +11 -0
  121. package/dist/enums/purchase-request-item-update-request-type.mjs.map +1 -0
  122. package/dist/enums/purchase-request-status.d.mts +9 -0
  123. package/dist/enums/purchase-request-status.d.ts +9 -0
  124. package/dist/enums/purchase-request-status.js +14 -0
  125. package/dist/enums/purchase-request-status.js.map +1 -0
  126. package/dist/enums/purchase-request-status.mjs +13 -0
  127. package/dist/enums/purchase-request-status.mjs.map +1 -0
  128. package/dist/enums/submit-item-type.d.mts +7 -0
  129. package/dist/enums/submit-item-type.d.ts +7 -0
  130. package/dist/enums/submit-item-type.js +12 -0
  131. package/dist/enums/submit-item-type.js.map +1 -0
  132. package/dist/enums/submit-item-type.mjs +11 -0
  133. package/dist/enums/submit-item-type.mjs.map +1 -0
  134. package/dist/enums/submit-result-outcome.d.mts +9 -0
  135. package/dist/enums/submit-result-outcome.d.ts +9 -0
  136. package/dist/enums/submit-result-outcome.js +14 -0
  137. package/dist/enums/submit-result-outcome.js.map +1 -0
  138. package/dist/enums/submit-result-outcome.mjs +13 -0
  139. package/dist/enums/submit-result-outcome.mjs.map +1 -0
  140. package/dist/index.d.mts +23 -0
  141. package/dist/index.d.ts +23 -0
  142. package/dist/index.js +115 -0
  143. package/dist/index.js.map +1 -1
  144. package/dist/index.mjs +23 -0
  145. package/dist/index.mjs.map +1 -1
  146. package/dist/inputFile.js +1 -2
  147. package/dist/inputFile.js.map +1 -1
  148. package/dist/inputFile.mjs +0 -1
  149. package/dist/inputFile.mjs.map +1 -1
  150. package/dist/models.d.mts +1027 -36
  151. package/dist/models.d.ts +1027 -36
  152. package/dist/operator.js +243 -204
  153. package/dist/operator.js.map +1 -1
  154. package/dist/operator.mjs +242 -203
  155. package/dist/operator.mjs.map +1 -1
  156. package/dist/permission.js +58 -48
  157. package/dist/permission.js.map +1 -1
  158. package/dist/permission.mjs +58 -48
  159. package/dist/permission.mjs.map +1 -1
  160. package/dist/query.js +525 -422
  161. package/dist/query.js.map +1 -1
  162. package/dist/query.mjs +524 -421
  163. package/dist/query.mjs.map +1 -1
  164. package/dist/services/apps.d.mts +18 -0
  165. package/dist/services/apps.d.ts +18 -0
  166. package/dist/services/avatars.d.mts +18 -0
  167. package/dist/services/avatars.d.ts +18 -0
  168. package/dist/services/carts-io.d.mts +46 -28
  169. package/dist/services/carts-io.d.ts +46 -28
  170. package/dist/services/carts-io.js.map +1 -1
  171. package/dist/services/carts-io.mjs.map +1 -1
  172. package/dist/services/carts-items.d.mts +42 -24
  173. package/dist/services/carts-items.d.ts +42 -24
  174. package/dist/services/carts-items.js.map +1 -1
  175. package/dist/services/carts-items.mjs.map +1 -1
  176. package/dist/services/carts.d.mts +70 -52
  177. package/dist/services/carts.d.ts +70 -52
  178. package/dist/services/carts.js.map +1 -1
  179. package/dist/services/carts.mjs.map +1 -1
  180. package/dist/services/channels.d.mts +64 -46
  181. package/dist/services/channels.d.ts +64 -46
  182. package/dist/services/channels.js +1 -1
  183. package/dist/services/channels.js.map +1 -1
  184. package/dist/services/channels.mjs +1 -1
  185. package/dist/services/channels.mjs.map +1 -1
  186. package/dist/services/cost-centers.d.mts +18 -0
  187. package/dist/services/cost-centers.d.ts +18 -0
  188. package/dist/services/customers-contacts.d.mts +62 -44
  189. package/dist/services/customers-contacts.d.ts +62 -44
  190. package/dist/services/customers-contacts.js.map +1 -1
  191. package/dist/services/customers-contacts.mjs.map +1 -1
  192. package/dist/services/customers-organizations.d.mts +58 -40
  193. package/dist/services/customers-organizations.d.ts +58 -40
  194. package/dist/services/customers-organizations.js.map +1 -1
  195. package/dist/services/customers-organizations.mjs.map +1 -1
  196. package/dist/services/customers-roles.d.mts +26 -8
  197. package/dist/services/customers-roles.d.ts +26 -8
  198. package/dist/services/customers-roles.js.map +1 -1
  199. package/dist/services/customers-roles.mjs.map +1 -1
  200. package/dist/services/customers-segments.d.mts +62 -44
  201. package/dist/services/customers-segments.d.ts +62 -44
  202. package/dist/services/customers-segments.js.map +1 -1
  203. package/dist/services/customers-segments.mjs.map +1 -1
  204. package/dist/services/customers-value-lists.d.mts +90 -72
  205. package/dist/services/customers-value-lists.d.ts +90 -72
  206. package/dist/services/customers-value-lists.js.map +1 -1
  207. package/dist/services/customers-value-lists.mjs.map +1 -1
  208. package/dist/services/customers.d.mts +78 -60
  209. package/dist/services/customers.d.ts +78 -60
  210. package/dist/services/customers.js.map +1 -1
  211. package/dist/services/customers.mjs.map +1 -1
  212. package/dist/services/events.d.mts +18 -0
  213. package/dist/services/events.d.ts +18 -0
  214. package/dist/services/forms.d.mts +66 -48
  215. package/dist/services/forms.d.ts +66 -48
  216. package/dist/services/forms.js.map +1 -1
  217. package/dist/services/forms.mjs.map +1 -1
  218. package/dist/services/health.d.mts +18 -0
  219. package/dist/services/health.d.ts +18 -0
  220. package/dist/services/inventories-locations.d.mts +38 -20
  221. package/dist/services/inventories-locations.d.ts +38 -20
  222. package/dist/services/inventories-locations.js.map +1 -1
  223. package/dist/services/inventories-locations.mjs.map +1 -1
  224. package/dist/services/inventories-reservations.d.mts +38 -20
  225. package/dist/services/inventories-reservations.d.ts +38 -20
  226. package/dist/services/inventories-reservations.js.map +1 -1
  227. package/dist/services/inventories-reservations.mjs.map +1 -1
  228. package/dist/services/inventories-stock.d.mts +70 -52
  229. package/dist/services/inventories-stock.d.ts +70 -52
  230. package/dist/services/inventories-stock.js.map +1 -1
  231. package/dist/services/inventories-stock.mjs.map +1 -1
  232. package/dist/services/io.d.mts +66 -48
  233. package/dist/services/io.d.ts +66 -48
  234. package/dist/services/io.js +2 -2
  235. package/dist/services/io.js.map +1 -1
  236. package/dist/services/io.mjs +2 -2
  237. package/dist/services/io.mjs.map +1 -1
  238. package/dist/services/locale.d.mts +18 -0
  239. package/dist/services/locale.d.ts +18 -0
  240. package/dist/services/markets.d.mts +122 -104
  241. package/dist/services/markets.d.ts +122 -104
  242. package/dist/services/markets.js.map +1 -1
  243. package/dist/services/markets.mjs.map +1 -1
  244. package/dist/services/messaging.d.mts +194 -176
  245. package/dist/services/messaging.d.ts +194 -176
  246. package/dist/services/messaging.js +3 -3
  247. package/dist/services/messaging.js.map +1 -1
  248. package/dist/services/messaging.mjs +3 -3
  249. package/dist/services/messaging.mjs.map +1 -1
  250. package/dist/services/orderlists.d.mts +96 -78
  251. package/dist/services/orderlists.d.ts +96 -78
  252. package/dist/services/orderlists.js +1 -1
  253. package/dist/services/orderlists.js.map +1 -1
  254. package/dist/services/orderlists.mjs +1 -1
  255. package/dist/services/orderlists.mjs.map +1 -1
  256. package/dist/services/orders.d.mts +114 -96
  257. package/dist/services/orders.d.ts +114 -96
  258. package/dist/services/orders.js.map +1 -1
  259. package/dist/services/orders.mjs.map +1 -1
  260. package/dist/services/pages-collaboration.d.mts +34 -16
  261. package/dist/services/pages-collaboration.d.ts +34 -16
  262. package/dist/services/pages-collaboration.js.map +1 -1
  263. package/dist/services/pages-collaboration.mjs.map +1 -1
  264. package/dist/services/pages-delivery.d.mts +26 -8
  265. package/dist/services/pages-delivery.d.ts +26 -8
  266. package/dist/services/pages-delivery.js.map +1 -1
  267. package/dist/services/pages-delivery.mjs.map +1 -1
  268. package/dist/services/pages-editor.d.mts +34 -16
  269. package/dist/services/pages-editor.d.ts +34 -16
  270. package/dist/services/pages-editor.js.map +1 -1
  271. package/dist/services/pages-editor.mjs.map +1 -1
  272. package/dist/services/pages.d.mts +82 -64
  273. package/dist/services/pages.d.ts +82 -64
  274. package/dist/services/pages.js.map +1 -1
  275. package/dist/services/pages.mjs.map +1 -1
  276. package/dist/services/payments-ledger.d.mts +54 -36
  277. package/dist/services/payments-ledger.d.ts +54 -36
  278. package/dist/services/payments-ledger.js.map +1 -1
  279. package/dist/services/payments-ledger.mjs.map +1 -1
  280. package/dist/services/payments-methods.d.mts +34 -16
  281. package/dist/services/payments-methods.d.ts +34 -16
  282. package/dist/services/payments-methods.js.map +1 -1
  283. package/dist/services/payments-methods.mjs.map +1 -1
  284. package/dist/services/payments-providers.d.mts +38 -20
  285. package/dist/services/payments-providers.d.ts +38 -20
  286. package/dist/services/payments-providers.js.map +1 -1
  287. package/dist/services/payments-providers.mjs.map +1 -1
  288. package/dist/services/prices.d.mts +86 -68
  289. package/dist/services/prices.d.ts +86 -68
  290. package/dist/services/prices.js.map +1 -1
  291. package/dist/services/prices.mjs.map +1 -1
  292. package/dist/services/procurement.d.mts +991 -0
  293. package/dist/services/procurement.d.ts +991 -0
  294. package/dist/services/procurement.js +1185 -0
  295. package/dist/services/procurement.js.map +1 -0
  296. package/dist/services/procurement.mjs +1184 -0
  297. package/dist/services/procurement.mjs.map +1 -0
  298. package/dist/services/products-assets.d.mts +34 -16
  299. package/dist/services/products-assets.d.ts +34 -16
  300. package/dist/services/products-assets.js.map +1 -1
  301. package/dist/services/products-assets.mjs.map +1 -1
  302. package/dist/services/products-categories.d.mts +66 -48
  303. package/dist/services/products-categories.d.ts +66 -48
  304. package/dist/services/products-categories.js.map +1 -1
  305. package/dist/services/products-categories.mjs.map +1 -1
  306. package/dist/services/products-data-model.d.mts +166 -148
  307. package/dist/services/products-data-model.d.ts +166 -148
  308. package/dist/services/products-data-model.js.map +1 -1
  309. package/dist/services/products-data-model.mjs.map +1 -1
  310. package/dist/services/products-references.d.mts +50 -32
  311. package/dist/services/products-references.d.ts +50 -32
  312. package/dist/services/products-references.js.map +1 -1
  313. package/dist/services/products-references.mjs.map +1 -1
  314. package/dist/services/products.d.mts +70 -52
  315. package/dist/services/products.d.ts +70 -52
  316. package/dist/services/products.js.map +1 -1
  317. package/dist/services/products.mjs.map +1 -1
  318. package/dist/services/search.d.mts +40 -22
  319. package/dist/services/search.d.ts +40 -22
  320. package/dist/services/search.js +1 -1
  321. package/dist/services/search.js.map +1 -1
  322. package/dist/services/search.mjs +1 -1
  323. package/dist/services/search.mjs.map +1 -1
  324. package/dist/services/settings.d.mts +18 -0
  325. package/dist/services/settings.d.ts +18 -0
  326. package/dist/services/shipping-carriers.d.mts +42 -24
  327. package/dist/services/shipping-carriers.d.ts +42 -24
  328. package/dist/services/shipping-carriers.js.map +1 -1
  329. package/dist/services/shipping-carriers.mjs.map +1 -1
  330. package/dist/services/shipping-methods.d.mts +70 -52
  331. package/dist/services/shipping-methods.d.ts +70 -52
  332. package/dist/services/shipping-methods.js.map +1 -1
  333. package/dist/services/shipping-methods.mjs.map +1 -1
  334. package/dist/services/shipping-value-lists.d.mts +62 -44
  335. package/dist/services/shipping-value-lists.d.ts +62 -44
  336. package/dist/services/shipping-value-lists.js.map +1 -1
  337. package/dist/services/shipping-value-lists.mjs.map +1 -1
  338. package/dist/services/sites.d.mts +18 -0
  339. package/dist/services/sites.d.ts +18 -0
  340. package/dist/services/storage.d.mts +18 -0
  341. package/dist/services/storage.d.ts +18 -0
  342. package/package.json +6 -3
@@ -1 +1 @@
1
- {"version":3,"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AAM,aAA2C;AAAA,MAC7C,gBAAgB;AAAA,IACpB;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AACJ","sourcesContent":["import { RevenexxException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\nimport { PaymentMethodKind } from '../enums/payment-method-kind';\nimport { PaymentFeeType } from '../enums/payment-fee-type';\n\nexport class PaymentsMethods {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Every method this tenant has configured, enabled or not — what the Cockpit's Payment methods screen shows and how an integration finds out which codes exist. It answers CONFIGURATION, never an offer: nothing here is evaluated against a buyer, so a method restricted to Germany, one whose order-value bounds exclude this basket and one whose PSP was never set up all come back the same way. The call a checkout makes is POST /payments/methods/eligible. Rows come back in whatever order the database returns them, so a storefront-shaped list needs `?order=position.asc` — `position` is the merchant's intended sequence and nothing sorts by it here on its own.\n *\n * @param {number} params.limit - Page size (default 50, max 200).\n * @param {number} params.offset - Row offset for pagination (default 0).\n * @param {string} params.order - Sort by one column: 'column' | 'column.asc' | 'column.desc'. A bare column sorts ascending. Anything else is refused with 400.\n * @param {string} params.code - Exact method code.\n * @param {PaymentMethodKind} params.kind - Restrict to self-managed or PSP-backed methods.\n * @param {boolean} params.enabled - Restrict to enabled or disabled methods. Indexed.\n * @param {string} params.provider - Exact PSP code.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n */\n paymentsMethodsList(params?: { limit?: number, offset?: number, order?: string, code?: string, kind?: PaymentMethodKind, enabled?: boolean, provider?: string }): Promise<{}>;\n /**\n * Every method this tenant has configured, enabled or not — what the Cockpit's Payment methods screen shows and how an integration finds out which codes exist. It answers CONFIGURATION, never an offer: nothing here is evaluated against a buyer, so a method restricted to Germany, one whose order-value bounds exclude this basket and one whose PSP was never set up all come back the same way. The call a checkout makes is POST /payments/methods/eligible. Rows come back in whatever order the database returns them, so a storefront-shaped list needs `?order=position.asc` — `position` is the merchant's intended sequence and nothing sorts by it here on its own.\n *\n * @param {number} limit - Page size (default 50, max 200).\n * @param {number} offset - Row offset for pagination (default 0).\n * @param {string} order - Sort by one column: 'column' | 'column.asc' | 'column.desc'. A bare column sorts ascending. Anything else is refused with 400.\n * @param {string} code - Exact method code.\n * @param {PaymentMethodKind} kind - Restrict to self-managed or PSP-backed methods.\n * @param {boolean} enabled - Restrict to enabled or disabled methods. Indexed.\n * @param {string} provider - Exact PSP code.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n paymentsMethodsList(limit?: number, offset?: number, order?: string, code?: string, kind?: PaymentMethodKind, enabled?: boolean, provider?: string): Promise<{}>;\n paymentsMethodsList(\n paramsOrFirst?: { limit?: number, offset?: number, order?: string, code?: string, kind?: PaymentMethodKind, enabled?: boolean, provider?: string } | number,\n ...rest: [(number)?, (string)?, (string)?, (PaymentMethodKind)?, (boolean)?, (string)?] \n ): Promise<{}> {\n let params: { limit?: number, offset?: number, order?: string, code?: string, kind?: PaymentMethodKind, enabled?: boolean, provider?: string };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { limit?: number, offset?: number, order?: string, code?: string, kind?: PaymentMethodKind, enabled?: boolean, provider?: string };\n } else {\n params = {\n limit: paramsOrFirst as number,\n offset: rest[0] as number,\n order: rest[1] as string,\n code: rest[2] as string,\n kind: rest[3] as PaymentMethodKind,\n enabled: rest[4] as boolean,\n provider: rest[5] as string \n };\n }\n \n const limit = params.limit;\n const offset = params.offset;\n const order = params.order;\n const code = params.code;\n const kind = params.kind;\n const enabled = params.enabled;\n const provider = params.provider;\n\n\n const apiPath = '/v1/payments/methods';\n const apiPayload: Payload = {};\n if (typeof limit !== 'undefined') {\n apiPayload['limit'] = limit;\n }\n if (typeof offset !== 'undefined') {\n apiPayload['offset'] = offset;\n }\n if (typeof order !== 'undefined') {\n apiPayload['order'] = order;\n }\n if (typeof code !== 'undefined') {\n apiPayload['code'] = code;\n }\n if (typeof kind !== 'undefined') {\n apiPayload['kind'] = kind;\n }\n if (typeof enabled !== 'undefined') {\n apiPayload['enabled'] = enabled;\n }\n if (typeof provider !== 'undefined') {\n apiPayload['provider'] = provider;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * Adds a line a checkout can offer. A create cannot omit `code` and `name`; every other column is optional or defaulted by the database. Two rows of this tenant may not share `code` — that is the 409. Two defaults are worth knowing before the first call: `enabled` is false, so a new method reaches no checkout until it is switched on, and `kind` is 'self_managed' — a card or wallet method needs `kind: \"psp\"` plus a `provider` the catalog carries, or it falls back to the tenant's `default_provider` at payment time and fails there if none is set. The `code` is the value every payment, every checkout and every ERP will name this method by from now on, and once a single payment has been made under it a rename is refused with 409: choose it once.\n *\n * @param {string} params.code - The machine name of the method, unique per tenant and lower case by convention ('invoice', 'prepayment', 'card', 'paypal'). It is the string the checkout asks for, the string every payment stores, and therefore the one value here that cannot be changed freely: renaming it would leave the ledger naming something that no longer exists, so it is refused with 409 for as long as any payment names it. Required on create.\n * @param {string} params.name - Operator-facing name, in the language the merchant administers in. What a buyer sees comes from `labels`. Required on create.\n * @param {string[]} params.countries - Allowed ISO 3166-1 alpha-2 country codes, compared upper-cased against the buyer country. null or an empty list means unrestricted — the invoice method this app seeds is restricted to DE, which is why an eligibility call without a country sees it excluded.\n * @param {string} params.description - One line explaining the method where it is offered — payment terms, what happens after the order. Shown to the buyer, so it is the merchant's wording rather than the app's.\n * @param {boolean} params.enabled - A disabled method is never eligible and never reaches a checkout. This is the switch an operator wants: deleting a method the ledger still names — or renaming its `code` — is refused with 409. Defaults to false, so a half-configured method cannot reach a checkout by accident.\n * @param {number} params.feeAmount - The surcharge this method costs the buyer, read as an amount or as a percentage depending on `fee_type`. Never negative — a discount for paying a certain way is not expressible here. Defaults to 0.\n * @param {string} params.feeCurrency - ISO 4217 code a fixed fee is expressed in. The database bounds the length at three characters and nothing else, so lower case is stored as written. Defaults to EUR, and lower case is accepted here exactly as the handlers accept it.\n * @param {PaymentFeeType} params.feeType - How `fee_amount` applies: 'none' (no surcharge), 'fixed' (that many units of `fee_currency`) or 'percent' (that share of the order amount). Defaults to 'none'.\n * @param {PaymentMethodKind} params.kind - Who moves the money. 'self_managed' — invoice, prepayment — means the merchant fulfils and reconciles it outside any PSP, and such a payment authorizes the moment it is created. 'psp' means a configured provider authorizes, captures and refunds it. Defaults to 'self_managed'; 'psp' needs a 'provider' to transact.\n * @param {object} params.labels - Buyer-facing names keyed by language tag — what a storefront shows instead of the operator-facing `name`. Free jsonb: the database constrains neither the tags nor the values, so a client reads the tag it wants and falls back to `en`.\n * @param {number} params.maxOrderValue - Largest order amount this method may be used for — the usual credit-risk cap on invoice and prepayment. null means no upper bound.\n * @param {object} params.metadata - Free-form merchant data carried on the configuration. This app never reads it — it is storage for the integrations that do (an ERP key for the method, a ledger account, a display hint).\n * @param {number} params.minOrderValue - Smallest order amount this method may be used for — the usual guard against paying a €5 order by invoice. null means no lower bound.\n * @param {number} params.position - Sort order at checkout, ascending — the merchant's preferred payment method first. Defaults to 0.\n * @param {string} params.provider - The PSP code this method transacts through, from GET /payments/providers/catalog. Only meaningful for kind 'psp'; a PSP method that names none falls back to the tenant's `default_provider` setting. Must be a code GET /payments/providers/catalog carries.\n * @param {string} params.providerMethod - The provider's own payment-method id ('card', 'paypal', 'sepa_debit') — what the driver is told to charge. Copied onto every payment created with this method as `metadata.provider_method`.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n paymentsMethodsCreate(params: { code: string, name: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, position?: number, provider?: string, providerMethod?: string }): Promise<Models.Error>;\n /**\n * Adds a line a checkout can offer. A create cannot omit `code` and `name`; every other column is optional or defaulted by the database. Two rows of this tenant may not share `code` — that is the 409. Two defaults are worth knowing before the first call: `enabled` is false, so a new method reaches no checkout until it is switched on, and `kind` is 'self_managed' — a card or wallet method needs `kind: \"psp\"` plus a `provider` the catalog carries, or it falls back to the tenant's `default_provider` at payment time and fails there if none is set. The `code` is the value every payment, every checkout and every ERP will name this method by from now on, and once a single payment has been made under it a rename is refused with 409: choose it once.\n *\n * @param {string} code - The machine name of the method, unique per tenant and lower case by convention ('invoice', 'prepayment', 'card', 'paypal'). It is the string the checkout asks for, the string every payment stores, and therefore the one value here that cannot be changed freely: renaming it would leave the ledger naming something that no longer exists, so it is refused with 409 for as long as any payment names it. Required on create.\n * @param {string} name - Operator-facing name, in the language the merchant administers in. What a buyer sees comes from `labels`. Required on create.\n * @param {string[]} countries - Allowed ISO 3166-1 alpha-2 country codes, compared upper-cased against the buyer country. null or an empty list means unrestricted — the invoice method this app seeds is restricted to DE, which is why an eligibility call without a country sees it excluded.\n * @param {string} description - One line explaining the method where it is offered — payment terms, what happens after the order. Shown to the buyer, so it is the merchant's wording rather than the app's.\n * @param {boolean} enabled - A disabled method is never eligible and never reaches a checkout. This is the switch an operator wants: deleting a method the ledger still names — or renaming its `code` — is refused with 409. Defaults to false, so a half-configured method cannot reach a checkout by accident.\n * @param {number} feeAmount - The surcharge this method costs the buyer, read as an amount or as a percentage depending on `fee_type`. Never negative — a discount for paying a certain way is not expressible here. Defaults to 0.\n * @param {string} feeCurrency - ISO 4217 code a fixed fee is expressed in. The database bounds the length at three characters and nothing else, so lower case is stored as written. Defaults to EUR, and lower case is accepted here exactly as the handlers accept it.\n * @param {PaymentFeeType} feeType - How `fee_amount` applies: 'none' (no surcharge), 'fixed' (that many units of `fee_currency`) or 'percent' (that share of the order amount). Defaults to 'none'.\n * @param {PaymentMethodKind} kind - Who moves the money. 'self_managed' — invoice, prepayment — means the merchant fulfils and reconciles it outside any PSP, and such a payment authorizes the moment it is created. 'psp' means a configured provider authorizes, captures and refunds it. Defaults to 'self_managed'; 'psp' needs a 'provider' to transact.\n * @param {object} labels - Buyer-facing names keyed by language tag — what a storefront shows instead of the operator-facing `name`. Free jsonb: the database constrains neither the tags nor the values, so a client reads the tag it wants and falls back to `en`.\n * @param {number} maxOrderValue - Largest order amount this method may be used for — the usual credit-risk cap on invoice and prepayment. null means no upper bound.\n * @param {object} metadata - Free-form merchant data carried on the configuration. This app never reads it — it is storage for the integrations that do (an ERP key for the method, a ledger account, a display hint).\n * @param {number} minOrderValue - Smallest order amount this method may be used for — the usual guard against paying a €5 order by invoice. null means no lower bound.\n * @param {number} position - Sort order at checkout, ascending — the merchant's preferred payment method first. Defaults to 0.\n * @param {string} provider - The PSP code this method transacts through, from GET /payments/providers/catalog. Only meaningful for kind 'psp'; a PSP method that names none falls back to the tenant's `default_provider` setting. Must be a code GET /payments/providers/catalog carries.\n * @param {string} providerMethod - The provider's own payment-method id ('card', 'paypal', 'sepa_debit') — what the driver is told to charge. Copied onto every payment created with this method as `metadata.provider_method`.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n paymentsMethodsCreate(code: string, name: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, position?: number, provider?: string, providerMethod?: string): Promise<Models.Error>;\n paymentsMethodsCreate(\n paramsOrFirst: { code: string, name: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, position?: number, provider?: string, providerMethod?: string } | string,\n ...rest: [(string)?, (string[])?, (string)?, (boolean)?, (number)?, (string)?, (PaymentFeeType)?, (PaymentMethodKind)?, (object)?, (number)?, (object)?, (number)?, (number)?, (string)?, (string)?] \n ): Promise<Models.Error> {\n let params: { code: string, name: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, position?: number, provider?: string, providerMethod?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { code: string, name: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, position?: number, provider?: string, providerMethod?: string };\n } else {\n params = {\n code: paramsOrFirst as string,\n name: rest[0] as string,\n countries: rest[1] as string[],\n description: rest[2] as string,\n enabled: rest[3] as boolean,\n feeAmount: rest[4] as number,\n feeCurrency: rest[5] as string,\n feeType: rest[6] as PaymentFeeType,\n kind: rest[7] as PaymentMethodKind,\n labels: rest[8] as object,\n maxOrderValue: rest[9] as number,\n metadata: rest[10] as object,\n minOrderValue: rest[11] as number,\n position: rest[12] as number,\n provider: rest[13] as string,\n providerMethod: rest[14] as string \n };\n }\n \n const code = params.code;\n const name = params.name;\n const countries = params.countries;\n const description = params.description;\n const enabled = params.enabled;\n const feeAmount = params.feeAmount;\n const feeCurrency = params.feeCurrency;\n const feeType = params.feeType;\n const kind = params.kind;\n const labels = params.labels;\n const maxOrderValue = params.maxOrderValue;\n const metadata = params.metadata;\n const minOrderValue = params.minOrderValue;\n const position = params.position;\n const provider = params.provider;\n const providerMethod = params.providerMethod;\n\n if (typeof code === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"code\"');\n }\n if (typeof name === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/v1/payments/methods';\n const apiPayload: Payload = {};\n if (typeof code !== 'undefined') {\n apiPayload['code'] = code;\n }\n if (typeof countries !== 'undefined') {\n apiPayload['countries'] = countries;\n }\n if (typeof description !== 'undefined') {\n apiPayload['description'] = description;\n }\n if (typeof enabled !== 'undefined') {\n apiPayload['enabled'] = enabled;\n }\n if (typeof feeAmount !== 'undefined') {\n apiPayload['fee_amount'] = feeAmount;\n }\n if (typeof feeCurrency !== 'undefined') {\n apiPayload['fee_currency'] = feeCurrency;\n }\n if (typeof feeType !== 'undefined') {\n apiPayload['fee_type'] = feeType;\n }\n if (typeof kind !== 'undefined') {\n apiPayload['kind'] = kind;\n }\n if (typeof labels !== 'undefined') {\n apiPayload['labels'] = labels;\n }\n if (typeof maxOrderValue !== 'undefined') {\n apiPayload['max_order_value'] = maxOrderValue;\n }\n if (typeof metadata !== 'undefined') {\n apiPayload['metadata'] = metadata;\n }\n if (typeof minOrderValue !== 'undefined') {\n apiPayload['min_order_value'] = minOrderValue;\n }\n if (typeof name !== 'undefined') {\n apiPayload['name'] = name;\n }\n if (typeof position !== 'undefined') {\n apiPayload['position'] = position;\n }\n if (typeof provider !== 'undefined') {\n apiPayload['provider'] = provider;\n }\n if (typeof providerMethod !== 'undefined') {\n apiPayload['provider_method'] = providerMethod;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * Writes the four methods a shop starts with — invoice and prepayment as self-managed, card and PayPal routed at the mock PSP so a fresh install can complete a checkout end to end — together with the four provider rows behind them: the built-in mock plus Stripe, PayPal and Novalnet, the three connectors this app opens outbound. The app already runs this for itself when it is installed (it listens on app.installed), so calling the route is for the second time and after: a method someone deleted, or a row a later release added that an existing install never got. Stripe, PayPal and Novalnet arrive disabled, in test mode and without credentials — the operator fills those in — while the mock arrives enabled, because it moves no money. Re-running is safe by design: it never duplicates a row and never overwrites an existing one, so nothing an operator has set can be undone by calling it again. Only genuinely missing option keys (a logo added after the first install) are filled, and those rows are reported as \"updated\" rather than created.\n *\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n */\n paymentsMethodsDefaults(): Promise<{}> {\n\n const apiPath = '/v1/payments/methods/defaults';\n const apiPayload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * The checkout's question — \"what can THIS buyer pay with?\" — answered server-side before any PSP is involved, so the storefront never renders a method the create would then refuse with 422. It evaluates the buyer context against every configured method: disabled, a country outside `countries`, an amount outside `min_order_value`/`max_order_value`. Restriction dimensions are ANDed and entries within one are ORed, and an empty dimension means unrestricted. Eligible methods come back sorted by `position` with their fee already computed for this amount; everything else lands in `excluded` with the reason in words, which is what makes a support question answerable. It reads only — nothing is written and no provider is called. Two things it does NOT check: whether the method's PSP is configured and enabled (a method whose provider is switched off is still offered here and fails at POST /payments — a provider a method names can no longer be deleted, which closes the other half of the same gap), and anything about the buyer beyond country and amount. A context that matches nothing is 200 with an empty `methods` list, never 404.\n *\n * @param {number} params.amount - The order amount the order-value bounds are checked against and the percentage fees are computed from. Defaults to 0, which excludes every method carrying a minimum. Nothing is written, so the ledger's own amount bound does not apply here.\n * @param {string} params.country - The buyer's ISO 3166-1 alpha-2 country code. A method restricted to countries is excluded without it — an unknown buyer sees only the unrestricted methods, which is the safe default and not a bug.\n * @param {string} params.currency - ISO 4217 code the amount is in, echoed onto every computed fee. Defaults to EUR. This app does no conversion: the fee comes back in the currency it was asked with.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n */\n paymentsMethodsEligible(params?: { amount?: number, country?: string, currency?: string }): Promise<{}>;\n /**\n * The checkout's question — \"what can THIS buyer pay with?\" — answered server-side before any PSP is involved, so the storefront never renders a method the create would then refuse with 422. It evaluates the buyer context against every configured method: disabled, a country outside `countries`, an amount outside `min_order_value`/`max_order_value`. Restriction dimensions are ANDed and entries within one are ORed, and an empty dimension means unrestricted. Eligible methods come back sorted by `position` with their fee already computed for this amount; everything else lands in `excluded` with the reason in words, which is what makes a support question answerable. It reads only — nothing is written and no provider is called. Two things it does NOT check: whether the method's PSP is configured and enabled (a method whose provider is switched off is still offered here and fails at POST /payments — a provider a method names can no longer be deleted, which closes the other half of the same gap), and anything about the buyer beyond country and amount. A context that matches nothing is 200 with an empty `methods` list, never 404.\n *\n * @param {number} amount - The order amount the order-value bounds are checked against and the percentage fees are computed from. Defaults to 0, which excludes every method carrying a minimum. Nothing is written, so the ledger's own amount bound does not apply here.\n * @param {string} country - The buyer's ISO 3166-1 alpha-2 country code. A method restricted to countries is excluded without it — an unknown buyer sees only the unrestricted methods, which is the safe default and not a bug.\n * @param {string} currency - ISO 4217 code the amount is in, echoed onto every computed fee. Defaults to EUR. This app does no conversion: the fee comes back in the currency it was asked with.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n paymentsMethodsEligible(amount?: number, country?: string, currency?: string): Promise<{}>;\n paymentsMethodsEligible(\n paramsOrFirst?: { amount?: number, country?: string, currency?: string } | number,\n ...rest: [(string)?, (string)?] \n ): Promise<{}> {\n let params: { amount?: number, country?: string, currency?: string };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { amount?: number, country?: string, currency?: string };\n } else {\n params = {\n amount: paramsOrFirst as number,\n country: rest[0] as string,\n currency: rest[1] as string \n };\n }\n \n const amount = params.amount;\n const country = params.country;\n const currency = params.currency;\n\n\n const apiPath = '/v1/payments/methods/eligible';\n const apiPayload: Payload = {};\n if (typeof amount !== 'undefined') {\n apiPayload['amount'] = amount;\n }\n if (typeof country !== 'undefined') {\n apiPayload['country'] = country;\n }\n if (typeof currency !== 'undefined') {\n apiPayload['currency'] = currency;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * payments.method_code is a CODE, not a foreign key: a payment records what happened and has to survive the configuration it was made with. The cost of that looseness is that deleting a method turns every payment made with it into a row naming something that no longer exists. So the count is taken HERE and answered as 409 with the number, rather than left to whoever is about to click delete — a client that pre-counts asks a second question whose answer disagrees the moment a payment lands between the two calls. Disabling the method (enabled: false) is what an operator usually meant and stays available.\n *\n * @param {string} params.id - The payment method configuration. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n paymentsMethodsDelete(params: { id: string }): Promise<Models.Error>;\n /**\n * payments.method_code is a CODE, not a foreign key: a payment records what happened and has to survive the configuration it was made with. The cost of that looseness is that deleting a method turns every payment made with it into a row naming something that no longer exists. So the count is taken HERE and answered as 409 with the number, rather than left to whoever is about to click delete — a client that pre-counts asks a second question whose answer disagrees the moment a payment lands between the two calls. Disabling the method (enabled: false) is what an operator usually meant and stays available.\n *\n * @param {string} id - The payment method configuration. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n paymentsMethodsDelete(id: string): Promise<Models.Error>;\n paymentsMethodsDelete(\n paramsOrFirst: { id: string } | string \n ): Promise<Models.Error> {\n let params: { id: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string };\n } else {\n params = {\n id: paramsOrFirst as string \n };\n }\n \n const id = params.id;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/payments/methods/{id}'.replace('{id}', id);\n const apiPayload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * One configuration, every column, addressed by its row id — the edit form's read. It is addressed by ID and there is no route that takes a `code`, which matters because the CODE is what a checkout, a payment and an ERP name a method by: to resolve one, filter the list (`GET /payments/methods?code=invoice`), which answers a page of at most one row because (tenant_id, code) is unique. Reading a method says nothing about whether a buyer may use it — that is POST /payments/methods/eligible — and nothing about whether its PSP can transact, which is under the provider configuration.\n *\n * @param {string} params.id - The payment method configuration. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n paymentsMethodsGet(params: { id: string }): Promise<Models.Error>;\n /**\n * One configuration, every column, addressed by its row id — the edit form's read. It is addressed by ID and there is no route that takes a `code`, which matters because the CODE is what a checkout, a payment and an ERP name a method by: to resolve one, filter the list (`GET /payments/methods?code=invoice`), which answers a page of at most one row because (tenant_id, code) is unique. Reading a method says nothing about whether a buyer may use it — that is POST /payments/methods/eligible — and nothing about whether its PSP can transact, which is under the provider configuration.\n *\n * @param {string} id - The payment method configuration. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n paymentsMethodsGet(id: string): Promise<Models.Error>;\n paymentsMethodsGet(\n paramsOrFirst: { id: string } | string \n ): Promise<Models.Error> {\n let params: { id: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string };\n } else {\n params = {\n id: paramsOrFirst as string \n };\n }\n \n const id = params.id;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/payments/methods/{id}'.replace('{id}', id);\n const apiPayload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * A PUT that PATCHES: only the keys in the body are written and every omitted column keeps its value, so `{\"enabled\": false}` is the whole request for taking a method out of checkout. A body with no writable key is refused with 400 rather than treated as a no-op. This is the route for all three things an operator changes about a method after it exists — the `enabled` switch that puts it in or out of checkout, the fee it charges (`fee_type`, `fee_amount`, `fee_currency`) and the restrictions that decide who is offered it (`countries`, `min_order_value`, `max_order_value`) — alongside its labels, description and `position`. `enabled: false` is the safe way to retire one — it disappears from POST /payments/methods/eligible immediately and stays on every payment ever made with it. The one write this route refuses is a rename of `code` while the ledger still names the old one. The three tables of this app carry no foreign keys at all: a payment names its method by `method_code` and its acquirer by `provider`, both plain text, because a payment records what happened and has to survive the configuration it was made with. So the database will not stop this — whatever the ledger still names, it goes on naming. A rename would therefore leave every recorded payment pointing at a code no configuration carries, which is the same harm DELETE on this row answers 409 for — so it answers the same 409, with the same `method_in_use` code and the same count. Renaming a method nothing has been paid with is still free, and so is every other column at any time.\n *\n * @param {string} params.id - The payment method configuration. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.\n * @param {string} params.code - The machine name of the method, unique per tenant and lower case by convention ('invoice', 'prepayment', 'card', 'paypal'). It is the string the checkout asks for, the string every payment stores, and therefore the one value here that cannot be changed freely: renaming it would leave the ledger naming something that no longer exists, so it is refused with 409 for as long as any payment names it. Required on create.\n * @param {string[]} params.countries - Allowed ISO 3166-1 alpha-2 country codes, compared upper-cased against the buyer country. null or an empty list means unrestricted — the invoice method this app seeds is restricted to DE, which is why an eligibility call without a country sees it excluded.\n * @param {string} params.description - One line explaining the method where it is offered — payment terms, what happens after the order. Shown to the buyer, so it is the merchant's wording rather than the app's.\n * @param {boolean} params.enabled - A disabled method is never eligible and never reaches a checkout. This is the switch an operator wants: deleting a method the ledger still names — or renaming its `code` — is refused with 409. Defaults to false, so a half-configured method cannot reach a checkout by accident.\n * @param {number} params.feeAmount - The surcharge this method costs the buyer, read as an amount or as a percentage depending on `fee_type`. Never negative — a discount for paying a certain way is not expressible here. Defaults to 0.\n * @param {string} params.feeCurrency - ISO 4217 code a fixed fee is expressed in. The database bounds the length at three characters and nothing else, so lower case is stored as written. Defaults to EUR, and lower case is accepted here exactly as the handlers accept it.\n * @param {PaymentFeeType} params.feeType - How `fee_amount` applies: 'none' (no surcharge), 'fixed' (that many units of `fee_currency`) or 'percent' (that share of the order amount). Defaults to 'none'.\n * @param {PaymentMethodKind} params.kind - Who moves the money. 'self_managed' — invoice, prepayment — means the merchant fulfils and reconciles it outside any PSP, and such a payment authorizes the moment it is created. 'psp' means a configured provider authorizes, captures and refunds it. Defaults to 'self_managed'; 'psp' needs a 'provider' to transact.\n * @param {object} params.labels - Buyer-facing names keyed by language tag — what a storefront shows instead of the operator-facing `name`. Free jsonb: the database constrains neither the tags nor the values, so a client reads the tag it wants and falls back to `en`.\n * @param {number} params.maxOrderValue - Largest order amount this method may be used for — the usual credit-risk cap on invoice and prepayment. null means no upper bound.\n * @param {object} params.metadata - Free-form merchant data carried on the configuration. This app never reads it — it is storage for the integrations that do (an ERP key for the method, a ledger account, a display hint).\n * @param {number} params.minOrderValue - Smallest order amount this method may be used for — the usual guard against paying a €5 order by invoice. null means no lower bound.\n * @param {string} params.name - Operator-facing name, in the language the merchant administers in. What a buyer sees comes from `labels`. Required on create.\n * @param {number} params.position - Sort order at checkout, ascending — the merchant's preferred payment method first. Defaults to 0.\n * @param {string} params.provider - The PSP code this method transacts through, from GET /payments/providers/catalog. Only meaningful for kind 'psp'; a PSP method that names none falls back to the tenant's `default_provider` setting. Must be a code GET /payments/providers/catalog carries.\n * @param {string} params.providerMethod - The provider's own payment-method id ('card', 'paypal', 'sepa_debit') — what the driver is told to charge. Copied onto every payment created with this method as `metadata.provider_method`.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n */\n paymentsMethodsUpdate(params: { id: string, code?: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, name?: string, position?: number, provider?: string, providerMethod?: string }): Promise<Models.Error>;\n /**\n * A PUT that PATCHES: only the keys in the body are written and every omitted column keeps its value, so `{\"enabled\": false}` is the whole request for taking a method out of checkout. A body with no writable key is refused with 400 rather than treated as a no-op. This is the route for all three things an operator changes about a method after it exists — the `enabled` switch that puts it in or out of checkout, the fee it charges (`fee_type`, `fee_amount`, `fee_currency`) and the restrictions that decide who is offered it (`countries`, `min_order_value`, `max_order_value`) — alongside its labels, description and `position`. `enabled: false` is the safe way to retire one — it disappears from POST /payments/methods/eligible immediately and stays on every payment ever made with it. The one write this route refuses is a rename of `code` while the ledger still names the old one. The three tables of this app carry no foreign keys at all: a payment names its method by `method_code` and its acquirer by `provider`, both plain text, because a payment records what happened and has to survive the configuration it was made with. So the database will not stop this — whatever the ledger still names, it goes on naming. A rename would therefore leave every recorded payment pointing at a code no configuration carries, which is the same harm DELETE on this row answers 409 for — so it answers the same 409, with the same `method_in_use` code and the same count. Renaming a method nothing has been paid with is still free, and so is every other column at any time.\n *\n * @param {string} id - The payment method configuration. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.\n * @param {string} code - The machine name of the method, unique per tenant and lower case by convention ('invoice', 'prepayment', 'card', 'paypal'). It is the string the checkout asks for, the string every payment stores, and therefore the one value here that cannot be changed freely: renaming it would leave the ledger naming something that no longer exists, so it is refused with 409 for as long as any payment names it. Required on create.\n * @param {string[]} countries - Allowed ISO 3166-1 alpha-2 country codes, compared upper-cased against the buyer country. null or an empty list means unrestricted — the invoice method this app seeds is restricted to DE, which is why an eligibility call without a country sees it excluded.\n * @param {string} description - One line explaining the method where it is offered — payment terms, what happens after the order. Shown to the buyer, so it is the merchant's wording rather than the app's.\n * @param {boolean} enabled - A disabled method is never eligible and never reaches a checkout. This is the switch an operator wants: deleting a method the ledger still names — or renaming its `code` — is refused with 409. Defaults to false, so a half-configured method cannot reach a checkout by accident.\n * @param {number} feeAmount - The surcharge this method costs the buyer, read as an amount or as a percentage depending on `fee_type`. Never negative — a discount for paying a certain way is not expressible here. Defaults to 0.\n * @param {string} feeCurrency - ISO 4217 code a fixed fee is expressed in. The database bounds the length at three characters and nothing else, so lower case is stored as written. Defaults to EUR, and lower case is accepted here exactly as the handlers accept it.\n * @param {PaymentFeeType} feeType - How `fee_amount` applies: 'none' (no surcharge), 'fixed' (that many units of `fee_currency`) or 'percent' (that share of the order amount). Defaults to 'none'.\n * @param {PaymentMethodKind} kind - Who moves the money. 'self_managed' — invoice, prepayment — means the merchant fulfils and reconciles it outside any PSP, and such a payment authorizes the moment it is created. 'psp' means a configured provider authorizes, captures and refunds it. Defaults to 'self_managed'; 'psp' needs a 'provider' to transact.\n * @param {object} labels - Buyer-facing names keyed by language tag — what a storefront shows instead of the operator-facing `name`. Free jsonb: the database constrains neither the tags nor the values, so a client reads the tag it wants and falls back to `en`.\n * @param {number} maxOrderValue - Largest order amount this method may be used for — the usual credit-risk cap on invoice and prepayment. null means no upper bound.\n * @param {object} metadata - Free-form merchant data carried on the configuration. This app never reads it — it is storage for the integrations that do (an ERP key for the method, a ledger account, a display hint).\n * @param {number} minOrderValue - Smallest order amount this method may be used for — the usual guard against paying a €5 order by invoice. null means no lower bound.\n * @param {string} name - Operator-facing name, in the language the merchant administers in. What a buyer sees comes from `labels`. Required on create.\n * @param {number} position - Sort order at checkout, ascending — the merchant's preferred payment method first. Defaults to 0.\n * @param {string} provider - The PSP code this method transacts through, from GET /payments/providers/catalog. Only meaningful for kind 'psp'; a PSP method that names none falls back to the tenant's `default_provider` setting. Must be a code GET /payments/providers/catalog carries.\n * @param {string} providerMethod - The provider's own payment-method id ('card', 'paypal', 'sepa_debit') — what the driver is told to charge. Copied onto every payment created with this method as `metadata.provider_method`.\n * @throws {RevenexxException}\n * @returns {Promise<Models.Error>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n paymentsMethodsUpdate(id: string, code?: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, name?: string, position?: number, provider?: string, providerMethod?: string): Promise<Models.Error>;\n paymentsMethodsUpdate(\n paramsOrFirst: { id: string, code?: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, name?: string, position?: number, provider?: string, providerMethod?: string } | string,\n ...rest: [(string)?, (string[])?, (string)?, (boolean)?, (number)?, (string)?, (PaymentFeeType)?, (PaymentMethodKind)?, (object)?, (number)?, (object)?, (number)?, (string)?, (number)?, (string)?, (string)?] \n ): Promise<Models.Error> {\n let params: { id: string, code?: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, name?: string, position?: number, provider?: string, providerMethod?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, code?: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, name?: string, position?: number, provider?: string, providerMethod?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n code: rest[0] as string,\n countries: rest[1] as string[],\n description: rest[2] as string,\n enabled: rest[3] as boolean,\n feeAmount: rest[4] as number,\n feeCurrency: rest[5] as string,\n feeType: rest[6] as PaymentFeeType,\n kind: rest[7] as PaymentMethodKind,\n labels: rest[8] as object,\n maxOrderValue: rest[9] as number,\n metadata: rest[10] as object,\n minOrderValue: rest[11] as number,\n name: rest[12] as string,\n position: rest[13] as number,\n provider: rest[14] as string,\n providerMethod: rest[15] as string \n };\n }\n \n const id = params.id;\n const code = params.code;\n const countries = params.countries;\n const description = params.description;\n const enabled = params.enabled;\n const feeAmount = params.feeAmount;\n const feeCurrency = params.feeCurrency;\n const feeType = params.feeType;\n const kind = params.kind;\n const labels = params.labels;\n const maxOrderValue = params.maxOrderValue;\n const metadata = params.metadata;\n const minOrderValue = params.minOrderValue;\n const name = params.name;\n const position = params.position;\n const provider = params.provider;\n const providerMethod = params.providerMethod;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/payments/methods/{id}'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof code !== 'undefined') {\n apiPayload['code'] = code;\n }\n if (typeof countries !== 'undefined') {\n apiPayload['countries'] = countries;\n }\n if (typeof description !== 'undefined') {\n apiPayload['description'] = description;\n }\n if (typeof enabled !== 'undefined') {\n apiPayload['enabled'] = enabled;\n }\n if (typeof feeAmount !== 'undefined') {\n apiPayload['fee_amount'] = feeAmount;\n }\n if (typeof feeCurrency !== 'undefined') {\n apiPayload['fee_currency'] = feeCurrency;\n }\n if (typeof feeType !== 'undefined') {\n apiPayload['fee_type'] = feeType;\n }\n if (typeof kind !== 'undefined') {\n apiPayload['kind'] = kind;\n }\n if (typeof labels !== 'undefined') {\n apiPayload['labels'] = labels;\n }\n if (typeof maxOrderValue !== 'undefined') {\n apiPayload['max_order_value'] = maxOrderValue;\n }\n if (typeof metadata !== 'undefined') {\n apiPayload['metadata'] = metadata;\n }\n if (typeof minOrderValue !== 'undefined') {\n apiPayload['min_order_value'] = minOrderValue;\n }\n if (typeof name !== 'undefined') {\n apiPayload['name'] = name;\n }\n if (typeof position !== 'undefined') {\n apiPayload['position'] = position;\n }\n if (typeof provider !== 'undefined') {\n apiPayload['provider'] = provider;\n }\n if (typeof providerMethod !== 'undefined') {\n apiPayload['provider_method'] = providerMethod;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 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ACA,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,gBAAgB;AAAA,IACpB;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AACJ","sourcesContent":["import { RevenexxException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\nimport { PaymentMethodKind } from '../enums/payment-method-kind';\nimport { PaymentFeeType } from '../enums/payment-fee-type';\n\nexport class PaymentsMethods {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Every method this tenant has configured, enabled or not — what the Cockpit's Payment methods screen shows and how an integration finds out which codes exist. It answers CONFIGURATION, never an offer: nothing here is evaluated against a buyer, so a method restricted to Germany, one whose order-value bounds exclude this basket and one whose PSP was never set up all come back the same way. The call a checkout makes is POST /payments/methods/eligible. Rows come back in whatever order the database returns them, so a storefront-shaped list needs `?order=position.asc` — `position` is the merchant's intended sequence and nothing sorts by it here on its own.\n *\n * @param {number} params.limit - Page size (default 50, max 200).\n * @param {number} params.offset - Row offset for pagination (default 0).\n * @param {string} params.order - Sort by one column: 'column' | 'column.asc' | 'column.desc'. A bare column sorts ascending. Anything else is refused with 400.\n * @param {string} params.code - Exact method code.\n * @param {PaymentMethodKind} params.kind - Restrict to self-managed or PSP-backed methods.\n * @param {boolean} params.enabled - Restrict to enabled or disabled methods. Indexed.\n * @param {string} params.provider - Exact PSP code.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n */\n paymentsMethodsList(params?: { limit?: number, offset?: number, order?: string, code?: string, kind?: PaymentMethodKind, enabled?: boolean, provider?: string }): Promise<{}>;\n /**\n * Every method this tenant has configured, enabled or not — what the Cockpit's Payment methods screen shows and how an integration finds out which codes exist. It answers CONFIGURATION, never an offer: nothing here is evaluated against a buyer, so a method restricted to Germany, one whose order-value bounds exclude this basket and one whose PSP was never set up all come back the same way. The call a checkout makes is POST /payments/methods/eligible. Rows come back in whatever order the database returns them, so a storefront-shaped list needs `?order=position.asc` — `position` is the merchant's intended sequence and nothing sorts by it here on its own.\n *\n * @param {number} limit - Page size (default 50, max 200).\n * @param {number} offset - Row offset for pagination (default 0).\n * @param {string} order - Sort by one column: 'column' | 'column.asc' | 'column.desc'. A bare column sorts ascending. Anything else is refused with 400.\n * @param {string} code - Exact method code.\n * @param {PaymentMethodKind} kind - Restrict to self-managed or PSP-backed methods.\n * @param {boolean} enabled - Restrict to enabled or disabled methods. Indexed.\n * @param {string} provider - Exact PSP code.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n paymentsMethodsList(limit?: number, offset?: number, order?: string, code?: string, kind?: PaymentMethodKind, enabled?: boolean, provider?: string): Promise<{}>;\n paymentsMethodsList(\n paramsOrFirst?: { limit?: number, offset?: number, order?: string, code?: string, kind?: PaymentMethodKind, enabled?: boolean, provider?: string } | number,\n ...rest: [(number)?, (string)?, (string)?, (PaymentMethodKind)?, (boolean)?, (string)?] \n ): Promise<{}> {\n let params: { limit?: number, offset?: number, order?: string, code?: string, kind?: PaymentMethodKind, enabled?: boolean, provider?: string };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { limit?: number, offset?: number, order?: string, code?: string, kind?: PaymentMethodKind, enabled?: boolean, provider?: string };\n } else {\n params = {\n limit: paramsOrFirst as number,\n offset: rest[0] as number,\n order: rest[1] as string,\n code: rest[2] as string,\n kind: rest[3] as PaymentMethodKind,\n enabled: rest[4] as boolean,\n provider: rest[5] as string \n };\n }\n \n const limit = params.limit;\n const offset = params.offset;\n const order = params.order;\n const code = params.code;\n const kind = params.kind;\n const enabled = params.enabled;\n const provider = params.provider;\n\n\n const apiPath = '/v1/payments/methods';\n const apiPayload: Payload = {};\n if (typeof limit !== 'undefined') {\n apiPayload['limit'] = limit;\n }\n if (typeof offset !== 'undefined') {\n apiPayload['offset'] = offset;\n }\n if (typeof order !== 'undefined') {\n apiPayload['order'] = order;\n }\n if (typeof code !== 'undefined') {\n apiPayload['code'] = code;\n }\n if (typeof kind !== 'undefined') {\n apiPayload['kind'] = kind;\n }\n if (typeof enabled !== 'undefined') {\n apiPayload['enabled'] = enabled;\n }\n if (typeof provider !== 'undefined') {\n apiPayload['provider'] = provider;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * Adds a line a checkout can offer. A create cannot omit `code` and `name`; every other column is optional or defaulted by the database. Two rows of this tenant may not share `code` — that is the 409. Two defaults are worth knowing before the first call: `enabled` is false, so a new method reaches no checkout until it is switched on, and `kind` is 'self_managed' — a card or wallet method needs `kind: \"psp\"` plus a `provider` the catalog carries, or it falls back to the tenant's `default_provider` at payment time and fails there if none is set. The `code` is the value every payment, every checkout and every ERP will name this method by from now on, and once a single payment has been made under it a rename is refused with 409: choose it once.\n *\n * @param {string} params.code - The machine name of the method, unique per tenant and lower case by convention ('invoice', 'prepayment', 'card', 'paypal'). It is the string the checkout asks for, the string every payment stores, and therefore the one value here that cannot be changed freely: renaming it would leave the ledger naming something that no longer exists, so it is refused with 409 for as long as any payment names it. Required on create.\n * @param {string} params.name - Operator-facing name, in the language the merchant administers in. What a buyer sees comes from `labels`. Required on create.\n * @param {string[]} params.countries - Allowed ISO 3166-1 alpha-2 country codes, compared upper-cased against the buyer country. null or an empty list means unrestricted — the invoice method this app seeds is restricted to DE, which is why an eligibility call without a country sees it excluded.\n * @param {string} params.description - One line explaining the method where it is offered — payment terms, what happens after the order. Shown to the buyer, so it is the merchant's wording rather than the app's.\n * @param {boolean} params.enabled - A disabled method is never eligible and never reaches a checkout. This is the switch an operator wants: deleting a method the ledger still names — or renaming its `code` — is refused with 409. Defaults to false, so a half-configured method cannot reach a checkout by accident.\n * @param {number} params.feeAmount - The surcharge this method costs the buyer, read as an amount or as a percentage depending on `fee_type`. Never negative — a discount for paying a certain way is not expressible here. Defaults to 0.\n * @param {string} params.feeCurrency - ISO 4217 code a fixed fee is expressed in. The database bounds the length at three characters and nothing else, so lower case is stored as written. Defaults to EUR, and lower case is accepted here exactly as the handlers accept it.\n * @param {PaymentFeeType} params.feeType - How `fee_amount` applies: 'none' (no surcharge), 'fixed' (that many units of `fee_currency`) or 'percent' (that share of the order amount). Defaults to 'none'.\n * @param {PaymentMethodKind} params.kind - Who moves the money. 'self_managed' — invoice, prepayment — means the merchant fulfils and reconciles it outside any PSP, and such a payment authorizes the moment it is created. 'psp' means a configured provider authorizes, captures and refunds it. Defaults to 'self_managed'; 'psp' needs a 'provider' to transact.\n * @param {object} params.labels - Buyer-facing names keyed by language tag — what a storefront shows instead of the operator-facing `name`. Free jsonb: the database constrains neither the tags nor the values, so a client reads the tag it wants and falls back to `en`.\n * @param {number} params.maxOrderValue - Largest order amount this method may be used for — the usual credit-risk cap on invoice and prepayment. null means no upper bound.\n * @param {object} params.metadata - Free-form merchant data carried on the configuration. This app never reads it — it is storage for the integrations that do (an ERP key for the method, a ledger account, a display hint).\n * @param {number} params.minOrderValue - Smallest order amount this method may be used for — the usual guard against paying a €5 order by invoice. null means no lower bound.\n * @param {number} params.position - Sort order at checkout, ascending — the merchant's preferred payment method first. Defaults to 0.\n * @param {string} params.provider - The PSP code this method transacts through, from GET /payments/providers/catalog. Only meaningful for kind 'psp'; a PSP method that names none falls back to the tenant's `default_provider` setting. Must be a code GET /payments/providers/catalog carries.\n * @param {string} params.providerMethod - The provider's own payment-method id ('card', 'paypal', 'sepa_debit') — what the driver is told to charge. Copied onto every payment created with this method as `metadata.provider_method`.\n * @throws {RevenexxException}\n * @returns {Promise<Models.PaymentMethod>}\n */\n paymentsMethodsCreate(params: { code: string, name: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, position?: number, provider?: string, providerMethod?: string }): Promise<Models.PaymentMethod>;\n /**\n * Adds a line a checkout can offer. A create cannot omit `code` and `name`; every other column is optional or defaulted by the database. Two rows of this tenant may not share `code` — that is the 409. Two defaults are worth knowing before the first call: `enabled` is false, so a new method reaches no checkout until it is switched on, and `kind` is 'self_managed' — a card or wallet method needs `kind: \"psp\"` plus a `provider` the catalog carries, or it falls back to the tenant's `default_provider` at payment time and fails there if none is set. The `code` is the value every payment, every checkout and every ERP will name this method by from now on, and once a single payment has been made under it a rename is refused with 409: choose it once.\n *\n * @param {string} code - The machine name of the method, unique per tenant and lower case by convention ('invoice', 'prepayment', 'card', 'paypal'). It is the string the checkout asks for, the string every payment stores, and therefore the one value here that cannot be changed freely: renaming it would leave the ledger naming something that no longer exists, so it is refused with 409 for as long as any payment names it. Required on create.\n * @param {string} name - Operator-facing name, in the language the merchant administers in. What a buyer sees comes from `labels`. Required on create.\n * @param {string[]} countries - Allowed ISO 3166-1 alpha-2 country codes, compared upper-cased against the buyer country. null or an empty list means unrestricted — the invoice method this app seeds is restricted to DE, which is why an eligibility call without a country sees it excluded.\n * @param {string} description - One line explaining the method where it is offered — payment terms, what happens after the order. Shown to the buyer, so it is the merchant's wording rather than the app's.\n * @param {boolean} enabled - A disabled method is never eligible and never reaches a checkout. This is the switch an operator wants: deleting a method the ledger still names — or renaming its `code` — is refused with 409. Defaults to false, so a half-configured method cannot reach a checkout by accident.\n * @param {number} feeAmount - The surcharge this method costs the buyer, read as an amount or as a percentage depending on `fee_type`. Never negative — a discount for paying a certain way is not expressible here. Defaults to 0.\n * @param {string} feeCurrency - ISO 4217 code a fixed fee is expressed in. The database bounds the length at three characters and nothing else, so lower case is stored as written. Defaults to EUR, and lower case is accepted here exactly as the handlers accept it.\n * @param {PaymentFeeType} feeType - How `fee_amount` applies: 'none' (no surcharge), 'fixed' (that many units of `fee_currency`) or 'percent' (that share of the order amount). Defaults to 'none'.\n * @param {PaymentMethodKind} kind - Who moves the money. 'self_managed' — invoice, prepayment — means the merchant fulfils and reconciles it outside any PSP, and such a payment authorizes the moment it is created. 'psp' means a configured provider authorizes, captures and refunds it. Defaults to 'self_managed'; 'psp' needs a 'provider' to transact.\n * @param {object} labels - Buyer-facing names keyed by language tag — what a storefront shows instead of the operator-facing `name`. Free jsonb: the database constrains neither the tags nor the values, so a client reads the tag it wants and falls back to `en`.\n * @param {number} maxOrderValue - Largest order amount this method may be used for — the usual credit-risk cap on invoice and prepayment. null means no upper bound.\n * @param {object} metadata - Free-form merchant data carried on the configuration. This app never reads it — it is storage for the integrations that do (an ERP key for the method, a ledger account, a display hint).\n * @param {number} minOrderValue - Smallest order amount this method may be used for — the usual guard against paying a €5 order by invoice. null means no lower bound.\n * @param {number} position - Sort order at checkout, ascending — the merchant's preferred payment method first. Defaults to 0.\n * @param {string} provider - The PSP code this method transacts through, from GET /payments/providers/catalog. Only meaningful for kind 'psp'; a PSP method that names none falls back to the tenant's `default_provider` setting. Must be a code GET /payments/providers/catalog carries.\n * @param {string} providerMethod - The provider's own payment-method id ('card', 'paypal', 'sepa_debit') — what the driver is told to charge. Copied onto every payment created with this method as `metadata.provider_method`.\n * @throws {RevenexxException}\n * @returns {Promise<Models.PaymentMethod>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n paymentsMethodsCreate(code: string, name: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, position?: number, provider?: string, providerMethod?: string): Promise<Models.PaymentMethod>;\n paymentsMethodsCreate(\n paramsOrFirst: { code: string, name: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, position?: number, provider?: string, providerMethod?: string } | string,\n ...rest: [(string)?, (string[])?, (string)?, (boolean)?, (number)?, (string)?, (PaymentFeeType)?, (PaymentMethodKind)?, (object)?, (number)?, (object)?, (number)?, (number)?, (string)?, (string)?] \n ): Promise<Models.PaymentMethod> {\n let params: { code: string, name: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, position?: number, provider?: string, providerMethod?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { code: string, name: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, position?: number, provider?: string, providerMethod?: string };\n } else {\n params = {\n code: paramsOrFirst as string,\n name: rest[0] as string,\n countries: rest[1] as string[],\n description: rest[2] as string,\n enabled: rest[3] as boolean,\n feeAmount: rest[4] as number,\n feeCurrency: rest[5] as string,\n feeType: rest[6] as PaymentFeeType,\n kind: rest[7] as PaymentMethodKind,\n labels: rest[8] as object,\n maxOrderValue: rest[9] as number,\n metadata: rest[10] as object,\n minOrderValue: rest[11] as number,\n position: rest[12] as number,\n provider: rest[13] as string,\n providerMethod: rest[14] as string \n };\n }\n \n const code = params.code;\n const name = params.name;\n const countries = params.countries;\n const description = params.description;\n const enabled = params.enabled;\n const feeAmount = params.feeAmount;\n const feeCurrency = params.feeCurrency;\n const feeType = params.feeType;\n const kind = params.kind;\n const labels = params.labels;\n const maxOrderValue = params.maxOrderValue;\n const metadata = params.metadata;\n const minOrderValue = params.minOrderValue;\n const position = params.position;\n const provider = params.provider;\n const providerMethod = params.providerMethod;\n\n if (typeof code === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"code\"');\n }\n if (typeof name === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/v1/payments/methods';\n const apiPayload: Payload = {};\n if (typeof code !== 'undefined') {\n apiPayload['code'] = code;\n }\n if (typeof countries !== 'undefined') {\n apiPayload['countries'] = countries;\n }\n if (typeof description !== 'undefined') {\n apiPayload['description'] = description;\n }\n if (typeof enabled !== 'undefined') {\n apiPayload['enabled'] = enabled;\n }\n if (typeof feeAmount !== 'undefined') {\n apiPayload['fee_amount'] = feeAmount;\n }\n if (typeof feeCurrency !== 'undefined') {\n apiPayload['fee_currency'] = feeCurrency;\n }\n if (typeof feeType !== 'undefined') {\n apiPayload['fee_type'] = feeType;\n }\n if (typeof kind !== 'undefined') {\n apiPayload['kind'] = kind;\n }\n if (typeof labels !== 'undefined') {\n apiPayload['labels'] = labels;\n }\n if (typeof maxOrderValue !== 'undefined') {\n apiPayload['max_order_value'] = maxOrderValue;\n }\n if (typeof metadata !== 'undefined') {\n apiPayload['metadata'] = metadata;\n }\n if (typeof minOrderValue !== 'undefined') {\n apiPayload['min_order_value'] = minOrderValue;\n }\n if (typeof name !== 'undefined') {\n apiPayload['name'] = name;\n }\n if (typeof position !== 'undefined') {\n apiPayload['position'] = position;\n }\n if (typeof provider !== 'undefined') {\n apiPayload['provider'] = provider;\n }\n if (typeof providerMethod !== 'undefined') {\n apiPayload['provider_method'] = providerMethod;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * Writes the four methods a shop starts with — invoice and prepayment as self-managed, card and PayPal routed at the mock PSP so a fresh install can complete a checkout end to end — together with the four provider rows behind them: the built-in mock plus Stripe, PayPal and Novalnet, the three connectors this app opens outbound. The app already runs this for itself when it is installed (it listens on app.installed), so calling the route is for the second time and after: a method someone deleted, or a row a later release added that an existing install never got. Stripe, PayPal and Novalnet arrive disabled, in test mode and without credentials — the operator fills those in — while the mock arrives enabled, because it moves no money. Re-running is safe by design: it never duplicates a row and never overwrites an existing one, so nothing an operator has set can be undone by calling it again. Only genuinely missing option keys (a logo added after the first install) are filled, and those rows are reported as \"updated\" rather than created.\n *\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n */\n paymentsMethodsDefaults(): Promise<{}> {\n\n const apiPath = '/v1/payments/methods/defaults';\n const apiPayload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * The checkout's question — \"what can THIS buyer pay with?\" — answered server-side before any PSP is involved, so the storefront never renders a method the create would then refuse with 422. It evaluates the buyer context against every configured method: disabled, a country outside `countries`, an amount outside `min_order_value`/`max_order_value`. Restriction dimensions are ANDed and entries within one are ORed, and an empty dimension means unrestricted. Eligible methods come back sorted by `position` with their fee already computed for this amount; everything else lands in `excluded` with the reason in words, which is what makes a support question answerable. It reads only — nothing is written and no provider is called. Two things it does NOT check: whether the method's PSP is configured and enabled (a method whose provider is switched off is still offered here and fails at POST /payments — a provider a method names can no longer be deleted, which closes the other half of the same gap), and anything about the buyer beyond country and amount. A context that matches nothing is 200 with an empty `methods` list, never 404.\n *\n * @param {number} params.amount - The order amount the order-value bounds are checked against and the percentage fees are computed from. Defaults to 0, which excludes every method carrying a minimum. Nothing is written, so the ledger's own amount bound does not apply here.\n * @param {string} params.country - The buyer's ISO 3166-1 alpha-2 country code. A method restricted to countries is excluded without it — an unknown buyer sees only the unrestricted methods, which is the safe default and not a bug.\n * @param {string} params.currency - ISO 4217 code the amount is in, echoed onto every computed fee. Defaults to EUR. This app does no conversion: the fee comes back in the currency it was asked with.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n */\n paymentsMethodsEligible(params?: { amount?: number, country?: string, currency?: string }): Promise<{}>;\n /**\n * The checkout's question — \"what can THIS buyer pay with?\" — answered server-side before any PSP is involved, so the storefront never renders a method the create would then refuse with 422. It evaluates the buyer context against every configured method: disabled, a country outside `countries`, an amount outside `min_order_value`/`max_order_value`. Restriction dimensions are ANDed and entries within one are ORed, and an empty dimension means unrestricted. Eligible methods come back sorted by `position` with their fee already computed for this amount; everything else lands in `excluded` with the reason in words, which is what makes a support question answerable. It reads only — nothing is written and no provider is called. Two things it does NOT check: whether the method's PSP is configured and enabled (a method whose provider is switched off is still offered here and fails at POST /payments — a provider a method names can no longer be deleted, which closes the other half of the same gap), and anything about the buyer beyond country and amount. A context that matches nothing is 200 with an empty `methods` list, never 404.\n *\n * @param {number} amount - The order amount the order-value bounds are checked against and the percentage fees are computed from. Defaults to 0, which excludes every method carrying a minimum. Nothing is written, so the ledger's own amount bound does not apply here.\n * @param {string} country - The buyer's ISO 3166-1 alpha-2 country code. A method restricted to countries is excluded without it — an unknown buyer sees only the unrestricted methods, which is the safe default and not a bug.\n * @param {string} currency - ISO 4217 code the amount is in, echoed onto every computed fee. Defaults to EUR. This app does no conversion: the fee comes back in the currency it was asked with.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n paymentsMethodsEligible(amount?: number, country?: string, currency?: string): Promise<{}>;\n paymentsMethodsEligible(\n paramsOrFirst?: { amount?: number, country?: string, currency?: string } | number,\n ...rest: [(string)?, (string)?] \n ): Promise<{}> {\n let params: { amount?: number, country?: string, currency?: string };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { amount?: number, country?: string, currency?: string };\n } else {\n params = {\n amount: paramsOrFirst as number,\n country: rest[0] as string,\n currency: rest[1] as string \n };\n }\n \n const amount = params.amount;\n const country = params.country;\n const currency = params.currency;\n\n\n const apiPath = '/v1/payments/methods/eligible';\n const apiPayload: Payload = {};\n if (typeof amount !== 'undefined') {\n apiPayload['amount'] = amount;\n }\n if (typeof country !== 'undefined') {\n apiPayload['country'] = country;\n }\n if (typeof currency !== 'undefined') {\n apiPayload['currency'] = currency;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * payments.method_code is a CODE, not a foreign key: a payment records what happened and has to survive the configuration it was made with. The cost of that looseness is that deleting a method turns every payment made with it into a row naming something that no longer exists. So the count is taken HERE and answered as 409 with the number, rather than left to whoever is about to click delete — a client that pre-counts asks a second question whose answer disagrees the moment a payment lands between the two calls. Disabling the method (enabled: false) is what an operator usually meant and stays available.\n *\n * @param {string} params.id - The payment method configuration. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n */\n paymentsMethodsDelete(params: { id: string }): Promise<{}>;\n /**\n * payments.method_code is a CODE, not a foreign key: a payment records what happened and has to survive the configuration it was made with. The cost of that looseness is that deleting a method turns every payment made with it into a row naming something that no longer exists. So the count is taken HERE and answered as 409 with the number, rather than left to whoever is about to click delete — a client that pre-counts asks a second question whose answer disagrees the moment a payment lands between the two calls. Disabling the method (enabled: false) is what an operator usually meant and stays available.\n *\n * @param {string} id - The payment method configuration. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.\n * @throws {RevenexxException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n paymentsMethodsDelete(id: string): Promise<{}>;\n paymentsMethodsDelete(\n paramsOrFirst: { id: string } | string \n ): Promise<{}> {\n let params: { id: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string };\n } else {\n params = {\n id: paramsOrFirst as string \n };\n }\n \n const id = params.id;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/payments/methods/{id}'.replace('{id}', id);\n const apiPayload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * One configuration, every column, addressed by its row id — the edit form's read. It is addressed by ID and there is no route that takes a `code`, which matters because the CODE is what a checkout, a payment and an ERP name a method by: to resolve one, filter the list (`GET /payments/methods?code=invoice`), which answers a page of at most one row because (tenant_id, code) is unique. Reading a method says nothing about whether a buyer may use it — that is POST /payments/methods/eligible — and nothing about whether its PSP can transact, which is under the provider configuration.\n *\n * @param {string} params.id - The payment method configuration. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.\n * @throws {RevenexxException}\n * @returns {Promise<Models.PaymentMethod>}\n */\n paymentsMethodsGet(params: { id: string }): Promise<Models.PaymentMethod>;\n /**\n * One configuration, every column, addressed by its row id — the edit form's read. It is addressed by ID and there is no route that takes a `code`, which matters because the CODE is what a checkout, a payment and an ERP name a method by: to resolve one, filter the list (`GET /payments/methods?code=invoice`), which answers a page of at most one row because (tenant_id, code) is unique. Reading a method says nothing about whether a buyer may use it — that is POST /payments/methods/eligible — and nothing about whether its PSP can transact, which is under the provider configuration.\n *\n * @param {string} id - The payment method configuration. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.\n * @throws {RevenexxException}\n * @returns {Promise<Models.PaymentMethod>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n paymentsMethodsGet(id: string): Promise<Models.PaymentMethod>;\n paymentsMethodsGet(\n paramsOrFirst: { id: string } | string \n ): Promise<Models.PaymentMethod> {\n let params: { id: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string };\n } else {\n params = {\n id: paramsOrFirst as string \n };\n }\n \n const id = params.id;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/payments/methods/{id}'.replace('{id}', id);\n const apiPayload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n\n /**\n * A PUT that PATCHES: only the keys in the body are written and every omitted column keeps its value, so `{\"enabled\": false}` is the whole request for taking a method out of checkout. A body with no writable key is refused with 400 rather than treated as a no-op. This is the route for all three things an operator changes about a method after it exists — the `enabled` switch that puts it in or out of checkout, the fee it charges (`fee_type`, `fee_amount`, `fee_currency`) and the restrictions that decide who is offered it (`countries`, `min_order_value`, `max_order_value`) — alongside its labels, description and `position`. `enabled: false` is the safe way to retire one — it disappears from POST /payments/methods/eligible immediately and stays on every payment ever made with it. The one write this route refuses is a rename of `code` while the ledger still names the old one. The three tables of this app carry no foreign keys at all: a payment names its method by `method_code` and its acquirer by `provider`, both plain text, because a payment records what happened and has to survive the configuration it was made with. So the database will not stop this — whatever the ledger still names, it goes on naming. A rename would therefore leave every recorded payment pointing at a code no configuration carries, which is the same harm DELETE on this row answers 409 for — so it answers the same 409, with the same `method_in_use` code and the same count. Renaming a method nothing has been paid with is still free, and so is every other column at any time.\n *\n * @param {string} params.id - The payment method configuration. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.\n * @param {string} params.code - The machine name of the method, unique per tenant and lower case by convention ('invoice', 'prepayment', 'card', 'paypal'). It is the string the checkout asks for, the string every payment stores, and therefore the one value here that cannot be changed freely: renaming it would leave the ledger naming something that no longer exists, so it is refused with 409 for as long as any payment names it. Required on create.\n * @param {string[]} params.countries - Allowed ISO 3166-1 alpha-2 country codes, compared upper-cased against the buyer country. null or an empty list means unrestricted — the invoice method this app seeds is restricted to DE, which is why an eligibility call without a country sees it excluded.\n * @param {string} params.description - One line explaining the method where it is offered — payment terms, what happens after the order. Shown to the buyer, so it is the merchant's wording rather than the app's.\n * @param {boolean} params.enabled - A disabled method is never eligible and never reaches a checkout. This is the switch an operator wants: deleting a method the ledger still names — or renaming its `code` — is refused with 409. Defaults to false, so a half-configured method cannot reach a checkout by accident.\n * @param {number} params.feeAmount - The surcharge this method costs the buyer, read as an amount or as a percentage depending on `fee_type`. Never negative — a discount for paying a certain way is not expressible here. Defaults to 0.\n * @param {string} params.feeCurrency - ISO 4217 code a fixed fee is expressed in. The database bounds the length at three characters and nothing else, so lower case is stored as written. Defaults to EUR, and lower case is accepted here exactly as the handlers accept it.\n * @param {PaymentFeeType} params.feeType - How `fee_amount` applies: 'none' (no surcharge), 'fixed' (that many units of `fee_currency`) or 'percent' (that share of the order amount). Defaults to 'none'.\n * @param {PaymentMethodKind} params.kind - Who moves the money. 'self_managed' — invoice, prepayment — means the merchant fulfils and reconciles it outside any PSP, and such a payment authorizes the moment it is created. 'psp' means a configured provider authorizes, captures and refunds it. Defaults to 'self_managed'; 'psp' needs a 'provider' to transact.\n * @param {object} params.labels - Buyer-facing names keyed by language tag — what a storefront shows instead of the operator-facing `name`. Free jsonb: the database constrains neither the tags nor the values, so a client reads the tag it wants and falls back to `en`.\n * @param {number} params.maxOrderValue - Largest order amount this method may be used for — the usual credit-risk cap on invoice and prepayment. null means no upper bound.\n * @param {object} params.metadata - Free-form merchant data carried on the configuration. This app never reads it — it is storage for the integrations that do (an ERP key for the method, a ledger account, a display hint).\n * @param {number} params.minOrderValue - Smallest order amount this method may be used for — the usual guard against paying a €5 order by invoice. null means no lower bound.\n * @param {string} params.name - Operator-facing name, in the language the merchant administers in. What a buyer sees comes from `labels`. Required on create.\n * @param {number} params.position - Sort order at checkout, ascending — the merchant's preferred payment method first. Defaults to 0.\n * @param {string} params.provider - The PSP code this method transacts through, from GET /payments/providers/catalog. Only meaningful for kind 'psp'; a PSP method that names none falls back to the tenant's `default_provider` setting. Must be a code GET /payments/providers/catalog carries.\n * @param {string} params.providerMethod - The provider's own payment-method id ('card', 'paypal', 'sepa_debit') — what the driver is told to charge. Copied onto every payment created with this method as `metadata.provider_method`.\n * @throws {RevenexxException}\n * @returns {Promise<Models.PaymentMethod>}\n */\n paymentsMethodsUpdate(params: { id: string, code?: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, name?: string, position?: number, provider?: string, providerMethod?: string }): Promise<Models.PaymentMethod>;\n /**\n * A PUT that PATCHES: only the keys in the body are written and every omitted column keeps its value, so `{\"enabled\": false}` is the whole request for taking a method out of checkout. A body with no writable key is refused with 400 rather than treated as a no-op. This is the route for all three things an operator changes about a method after it exists — the `enabled` switch that puts it in or out of checkout, the fee it charges (`fee_type`, `fee_amount`, `fee_currency`) and the restrictions that decide who is offered it (`countries`, `min_order_value`, `max_order_value`) — alongside its labels, description and `position`. `enabled: false` is the safe way to retire one — it disappears from POST /payments/methods/eligible immediately and stays on every payment ever made with it. The one write this route refuses is a rename of `code` while the ledger still names the old one. The three tables of this app carry no foreign keys at all: a payment names its method by `method_code` and its acquirer by `provider`, both plain text, because a payment records what happened and has to survive the configuration it was made with. So the database will not stop this — whatever the ledger still names, it goes on naming. A rename would therefore leave every recorded payment pointing at a code no configuration carries, which is the same harm DELETE on this row answers 409 for — so it answers the same 409, with the same `method_in_use` code and the same count. Renaming a method nothing has been paid with is still free, and so is every other column at any time.\n *\n * @param {string} id - The payment method configuration. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.\n * @param {string} code - The machine name of the method, unique per tenant and lower case by convention ('invoice', 'prepayment', 'card', 'paypal'). It is the string the checkout asks for, the string every payment stores, and therefore the one value here that cannot be changed freely: renaming it would leave the ledger naming something that no longer exists, so it is refused with 409 for as long as any payment names it. Required on create.\n * @param {string[]} countries - Allowed ISO 3166-1 alpha-2 country codes, compared upper-cased against the buyer country. null or an empty list means unrestricted — the invoice method this app seeds is restricted to DE, which is why an eligibility call without a country sees it excluded.\n * @param {string} description - One line explaining the method where it is offered — payment terms, what happens after the order. Shown to the buyer, so it is the merchant's wording rather than the app's.\n * @param {boolean} enabled - A disabled method is never eligible and never reaches a checkout. This is the switch an operator wants: deleting a method the ledger still names — or renaming its `code` — is refused with 409. Defaults to false, so a half-configured method cannot reach a checkout by accident.\n * @param {number} feeAmount - The surcharge this method costs the buyer, read as an amount or as a percentage depending on `fee_type`. Never negative — a discount for paying a certain way is not expressible here. Defaults to 0.\n * @param {string} feeCurrency - ISO 4217 code a fixed fee is expressed in. The database bounds the length at three characters and nothing else, so lower case is stored as written. Defaults to EUR, and lower case is accepted here exactly as the handlers accept it.\n * @param {PaymentFeeType} feeType - How `fee_amount` applies: 'none' (no surcharge), 'fixed' (that many units of `fee_currency`) or 'percent' (that share of the order amount). Defaults to 'none'.\n * @param {PaymentMethodKind} kind - Who moves the money. 'self_managed' — invoice, prepayment — means the merchant fulfils and reconciles it outside any PSP, and such a payment authorizes the moment it is created. 'psp' means a configured provider authorizes, captures and refunds it. Defaults to 'self_managed'; 'psp' needs a 'provider' to transact.\n * @param {object} labels - Buyer-facing names keyed by language tag — what a storefront shows instead of the operator-facing `name`. Free jsonb: the database constrains neither the tags nor the values, so a client reads the tag it wants and falls back to `en`.\n * @param {number} maxOrderValue - Largest order amount this method may be used for — the usual credit-risk cap on invoice and prepayment. null means no upper bound.\n * @param {object} metadata - Free-form merchant data carried on the configuration. This app never reads it — it is storage for the integrations that do (an ERP key for the method, a ledger account, a display hint).\n * @param {number} minOrderValue - Smallest order amount this method may be used for — the usual guard against paying a €5 order by invoice. null means no lower bound.\n * @param {string} name - Operator-facing name, in the language the merchant administers in. What a buyer sees comes from `labels`. Required on create.\n * @param {number} position - Sort order at checkout, ascending — the merchant's preferred payment method first. Defaults to 0.\n * @param {string} provider - The PSP code this method transacts through, from GET /payments/providers/catalog. Only meaningful for kind 'psp'; a PSP method that names none falls back to the tenant's `default_provider` setting. Must be a code GET /payments/providers/catalog carries.\n * @param {string} providerMethod - The provider's own payment-method id ('card', 'paypal', 'sepa_debit') — what the driver is told to charge. Copied onto every payment created with this method as `metadata.provider_method`.\n * @throws {RevenexxException}\n * @returns {Promise<Models.PaymentMethod>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n paymentsMethodsUpdate(id: string, code?: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, name?: string, position?: number, provider?: string, providerMethod?: string): Promise<Models.PaymentMethod>;\n paymentsMethodsUpdate(\n paramsOrFirst: { id: string, code?: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, name?: string, position?: number, provider?: string, providerMethod?: string } | string,\n ...rest: [(string)?, (string[])?, (string)?, (boolean)?, (number)?, (string)?, (PaymentFeeType)?, (PaymentMethodKind)?, (object)?, (number)?, (object)?, (number)?, (string)?, (number)?, (string)?, (string)?] \n ): Promise<Models.PaymentMethod> {\n let params: { id: string, code?: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, name?: string, position?: number, provider?: string, providerMethod?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { id: string, code?: string, countries?: string[], description?: string, enabled?: boolean, feeAmount?: number, feeCurrency?: string, feeType?: PaymentFeeType, kind?: PaymentMethodKind, labels?: object, maxOrderValue?: number, metadata?: object, minOrderValue?: number, name?: string, position?: number, provider?: string, providerMethod?: string };\n } else {\n params = {\n id: paramsOrFirst as string,\n code: rest[0] as string,\n countries: rest[1] as string[],\n description: rest[2] as string,\n enabled: rest[3] as boolean,\n feeAmount: rest[4] as number,\n feeCurrency: rest[5] as string,\n feeType: rest[6] as PaymentFeeType,\n kind: rest[7] as PaymentMethodKind,\n labels: rest[8] as object,\n maxOrderValue: rest[9] as number,\n metadata: rest[10] as object,\n minOrderValue: rest[11] as number,\n name: rest[12] as string,\n position: rest[13] as number,\n provider: rest[14] as string,\n providerMethod: rest[15] as string \n };\n }\n \n const id = params.id;\n const code = params.code;\n const countries = params.countries;\n const description = params.description;\n const enabled = params.enabled;\n const feeAmount = params.feeAmount;\n const feeCurrency = params.feeCurrency;\n const feeType = params.feeType;\n const kind = params.kind;\n const labels = params.labels;\n const maxOrderValue = params.maxOrderValue;\n const metadata = params.metadata;\n const minOrderValue = params.minOrderValue;\n const name = params.name;\n const position = params.position;\n const provider = params.provider;\n const providerMethod = params.providerMethod;\n\n if (typeof id === 'undefined') {\n throw new RevenexxException('Missing required parameter: \"id\"');\n }\n\n const apiPath = '/v1/payments/methods/{id}'.replace('{id}', id);\n const apiPayload: Payload = {};\n if (typeof code !== 'undefined') {\n apiPayload['code'] = code;\n }\n if (typeof countries !== 'undefined') {\n apiPayload['countries'] = countries;\n }\n if (typeof description !== 'undefined') {\n apiPayload['description'] = description;\n }\n if (typeof enabled !== 'undefined') {\n apiPayload['enabled'] = enabled;\n }\n if (typeof feeAmount !== 'undefined') {\n apiPayload['fee_amount'] = feeAmount;\n }\n if (typeof feeCurrency !== 'undefined') {\n apiPayload['fee_currency'] = feeCurrency;\n }\n if (typeof feeType !== 'undefined') {\n apiPayload['fee_type'] = feeType;\n }\n if (typeof kind !== 'undefined') {\n apiPayload['kind'] = kind;\n }\n if (typeof labels !== 'undefined') {\n apiPayload['labels'] = labels;\n }\n if (typeof maxOrderValue !== 'undefined') {\n apiPayload['max_order_value'] = maxOrderValue;\n }\n if (typeof metadata !== 'undefined') {\n apiPayload['metadata'] = metadata;\n }\n if (typeof minOrderValue !== 'undefined') {\n apiPayload['min_order_value'] = minOrderValue;\n }\n if (typeof name !== 'undefined') {\n apiPayload['name'] = name;\n }\n if (typeof position !== 'undefined') {\n apiPayload['position'] = position;\n }\n if (typeof provider !== 'undefined') {\n apiPayload['provider'] = provider;\n }\n if (typeof providerMethod !== 'undefined') {\n apiPayload['provider_method'] = providerMethod;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n apiPayload,\n );\n }\n}\n"]}
@@ -4,6 +4,15 @@ import '../query.mjs';
4
4
  import '../enums/address-type-row-tone.mjs';
5
5
  import '../enums/address-type-row-create-request-tone.mjs';
6
6
  import '../enums/address-type-row-update-request-tone.mjs';
7
+ import '../enums/approval-rule-approver-type.mjs';
8
+ import '../enums/approval-rule-condition.mjs';
9
+ import '../enums/approval-rule-effect.mjs';
10
+ import '../enums/approval-rule-create-request-approver-type.mjs';
11
+ import '../enums/approval-rule-create-request-condition.mjs';
12
+ import '../enums/approval-rule-create-request-effect.mjs';
13
+ import '../enums/approval-rule-update-request-approver-type.mjs';
14
+ import '../enums/approval-rule-update-request-condition.mjs';
15
+ import '../enums/approval-rule-update-request-effect.mjs';
7
16
  import '../enums/assets-source.mjs';
8
17
  import '../enums/attribute-value-bucket.mjs';
9
18
  import '../enums/auth-mail-source.mjs';
@@ -117,6 +126,8 @@ import '../enums/payment-term-tone.mjs';
117
126
  import '../enums/payment-term-create-request-tone.mjs';
118
127
  import '../enums/payment-term-update-request-tone.mjs';
119
128
  import '../enums/payment-vocabulary-tone.mjs';
129
+ import '../enums/pending-approval-approver-type.mjs';
130
+ import '../enums/pending-approval-status.mjs';
120
131
  import '../enums/price-ending-rule.mjs';
121
132
  import '../enums/price-entries-adjust-response-rounding.mjs';
122
133
  import '../enums/price-entries-adjust-response-rounding-mode.mjs';
@@ -139,6 +150,11 @@ import '../enums/product-grid-column-source.mjs';
139
150
  import '../enums/product-label-source.mjs';
140
151
  import '../enums/product-label-attribute-source.mjs';
141
152
  import '../enums/products-kind.mjs';
153
+ import '../enums/purchase-request-status.mjs';
154
+ import '../enums/purchase-request-event-name.mjs';
155
+ import '../enums/purchase-request-item-type.mjs';
156
+ import '../enums/purchase-request-item-create-request-type.mjs';
157
+ import '../enums/purchase-request-item-update-request-type.mjs';
142
158
  import '../enums/reorder-point-source.mjs';
143
159
  import '../enums/reservation-status.mjs';
144
160
  import '../enums/price-on-request-reason.mjs';
@@ -176,6 +192,8 @@ import '../enums/shipping-weight-unit-row-tone.mjs';
176
192
  import '../enums/shipping-weight-unit-update-request-tone.mjs';
177
193
  import '../enums/stock-movement-type.mjs';
178
194
  import '../enums/store-asset-request-visibility.mjs';
195
+ import '../enums/submit-item-type.mjs';
196
+ import '../enums/submit-result-outcome.mjs';
179
197
  import '../enums/validation-failed-response-status.mjs';
180
198
  import '../enums/vocabulary-default-tone.mjs';
181
199
  import '../enums/vocabulary-source.mjs';
@@ -231,20 +249,20 @@ declare class PaymentsProviders {
231
249
  *
232
250
  * @param {string} params.slug - A catalog provider code, as GET /payments/providers/catalog lists it. Case-insensitive, and a trailing '.svg' is ignored. Not tenant data: the logos ship with the app and are identical for everyone.
233
251
  * @throws {RevenexxException}
234
- * @returns {Promise<Models.Error>}
252
+ * @returns {Promise<{}>}
235
253
  */
236
254
  paymentsLogosGet(params: {
237
255
  slug: string;
238
- }): Promise<Models.Error>;
256
+ }): Promise<{}>;
239
257
  /**
240
258
  * Answers the SVG document for a catalog provider code (a shipped assets/logos/{code}.svg, otherwise a generated monogram tile), with content-type image/svg+xml and a one-day cache. It is the one route in this app that needs no tenant identity: the logos are bundled with the app rather than owned by anyone, so nothing here is tenant data and no key or tenant header is required to fetch one — which is what lets a storefront or a Cockpit screen point an <img> straight at it. Called directly on the app domain (https://revenexx-payments.apps.revenexx.io/payments/logos/stripe) the response carries its real content-type; through the gateway the body is passed through but labelled application/json, so use the app domain for <img> sources.
241
259
  *
242
260
  * @param {string} slug - A catalog provider code, as GET /payments/providers/catalog lists it. Case-insensitive, and a trailing '.svg' is ignored. Not tenant data: the logos ship with the app and are identical for everyone.
243
261
  * @throws {RevenexxException}
244
- * @returns {Promise<Models.Error>}
262
+ * @returns {Promise<{}>}
245
263
  * @deprecated Use the object parameter style method for a better developer experience.
246
264
  */
247
- paymentsLogosGet(slug: string): Promise<Models.Error>;
265
+ paymentsLogosGet(slug: string): Promise<{}>;
248
266
  /**
249
267
  * PSP secrets are write-only: 'credentials' and 'webhook_secret' are accepted on create/update, stored for the drivers, and never returned by any route — the responses carry the public columns only (id, provider, name, enabled, test_mode, options, timestamps). To rotate a secret, write the new value; there is no way to read the current one back.
250
268
  *
@@ -290,7 +308,7 @@ declare class PaymentsProviders {
290
308
  * @param {boolean} params.testMode - Whether the driver talks to the PSP's sandbox. New configurations start in test mode: a provider nobody verified must not touch live money. Unstated takes the tenant's own `test_mode_default` setting.
291
309
  * @param {string} params.webhookSecret - The signing secret the PSP issues when its webhook endpoint is created, in the provider's own dashboard. webhooks.revenexx.com verifies each callback against it before the dispatcher hands the envelope to this app. Write-only, like `credentials`: it is stored, used, and never read back by any route, so there is nothing to compare a value against — to rotate it, write the new one. Whatever a document shows here is a generated placeholder, not a usable secret — writing it verbatim leaves every callback failing verification.
292
310
  * @throws {RevenexxException}
293
- * @returns {Promise<Models.Error>}
311
+ * @returns {Promise<Models.PaymentProvider>}
294
312
  */
295
313
  paymentsProvidersCreate(params: {
296
314
  provider: string;
@@ -300,7 +318,7 @@ declare class PaymentsProviders {
300
318
  options?: object;
301
319
  testMode?: boolean;
302
320
  webhookSecret?: string;
303
- }): Promise<Models.Error>;
321
+ }): Promise<Models.PaymentProvider>;
304
322
  /**
305
323
  * Activates one PSP account of this tenant. The `provider` code is not free text: it has to be one the catalog carries, and anything else is refused with 400 and a message listing the codes that are — so GET /payments/providers/catalog is the call that comes first, both for the code itself and for the credential field names this provider expects. PSP secrets are write-only: 'credentials' and 'webhook_secret' are accepted on create/update, stored for the drivers, and never returned by any route — the responses carry the public columns only (id, provider, name, enabled, test_mode, options, timestamps). To rotate a secret, write the new value; there is no way to read the current one back.
306
324
  *
@@ -312,10 +330,10 @@ declare class PaymentsProviders {
312
330
  * @param {boolean} testMode - Whether the driver talks to the PSP's sandbox. New configurations start in test mode: a provider nobody verified must not touch live money. Unstated takes the tenant's own `test_mode_default` setting.
313
331
  * @param {string} webhookSecret - The signing secret the PSP issues when its webhook endpoint is created, in the provider's own dashboard. webhooks.revenexx.com verifies each callback against it before the dispatcher hands the envelope to this app. Write-only, like `credentials`: it is stored, used, and never read back by any route, so there is nothing to compare a value against — to rotate it, write the new one. Whatever a document shows here is a generated placeholder, not a usable secret — writing it verbatim leaves every callback failing verification.
314
332
  * @throws {RevenexxException}
315
- * @returns {Promise<Models.Error>}
333
+ * @returns {Promise<Models.PaymentProvider>}
316
334
  * @deprecated Use the object parameter style method for a better developer experience.
317
335
  */
318
- paymentsProvidersCreate(provider: string, credentials?: object, enabled?: boolean, name?: string, options?: object, testMode?: boolean, webhookSecret?: string): Promise<Models.Error>;
336
+ paymentsProvidersCreate(provider: string, credentials?: object, enabled?: boolean, name?: string, options?: object, testMode?: boolean, webhookSecret?: string): Promise<Models.PaymentProvider>;
319
337
  /**
320
338
  * The closed set of `provider` codes POST /payments/providers accepts — anything else is refused with 400 and a message listing these. It runs to roughly thirty connectors, and each entry says which `driver` moves the money for it: nearly all of them go through the one connector layer this app embeds, hyperswitch-prism, with the built-in mock PSP alongside for demos and E2E. Read it to build the picker on an "add provider" form and to know what a credentials form has to ask for: `auth_type` is the scheme the connector authenticates with and `credential_fields` are the KEY NAMES to put inside `credentials` (never values, which come from the PSP's own dashboard). It says nothing about this tenant: no credential, no enabled flag, no test mode — that is GET /payments/providers. Watch `available`: a code with `false` has no driver in this deployment yet, so it can be created and stored and every transaction through it fails with `provider_unavailable`. The list is app-shipped and identical for everyone, so it is safe to cache hard and it changes only with a release of this app.
321
339
  *
@@ -328,39 +346,39 @@ declare class PaymentsProviders {
328
346
  *
329
347
  * @param {string} params.id - The PSP configuration. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
330
348
  * @throws {RevenexxException}
331
- * @returns {Promise<Models.Error>}
349
+ * @returns {Promise<{}>}
332
350
  */
333
351
  paymentsProvidersDelete(params: {
334
352
  id: string;
335
- }): Promise<Models.Error>;
353
+ }): Promise<{}>;
336
354
  /**
337
355
  * Removes the PSP account row and its stored secrets, once nothing depends on it any more. The three tables of this app carry no foreign keys at all: a payment names its method by `method_code` and its acquirer by `provider`, both plain text, because a payment records what happened and has to survive the configuration it was made with. So the database will not stop this — whatever the ledger still names, it goes on naming. So the database will not stop this and the count is taken HERE, exactly as DELETE /payments/methods/{id} takes it, and answered as one 409 carrying both numbers. Counted first: every payment still in a status a transition starts from — created, requires_action, authorized or captured — because capture, cancel and refund all resolve the provider BY CODE and would answer 422 `provider_not_configured` with the row gone, leaving an authorization that can neither be collected nor released and a captured payment that can no longer be refunded here at all. Counted second: every payment method naming this provider, because POST /payments/methods/eligible does not check providers, so a checkout would go on offering a method whose next POST /payments fails at authorization unless the tenant's `fallback_provider` names one that is still configured. What is deliberately NOT counted is a settled payment — failed, cancelled or refunded: no transition starts there, so nothing will ask this provider about it again, and a `provider` code is closed catalog data that goes on meaning Stripe or PayPal with no configuration behind it. The refusal names `enabled: false` because that is usually what was meant: a disabled provider stops taking NEW payments exactly as a deleted one does, and every transition on the payments it already holds keeps working, since only the create path asks whether it is enabled.
338
356
  *
339
357
  * @param {string} id - The PSP configuration. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
340
358
  * @throws {RevenexxException}
341
- * @returns {Promise<Models.Error>}
359
+ * @returns {Promise<{}>}
342
360
  * @deprecated Use the object parameter style method for a better developer experience.
343
361
  */
344
- paymentsProvidersDelete(id: string): Promise<Models.Error>;
362
+ paymentsProvidersDelete(id: string): Promise<{}>;
345
363
  /**
346
364
  * PSP secrets are write-only: 'credentials' and 'webhook_secret' are accepted on create/update, stored for the drivers, and never returned by any route — the responses carry the public columns only (id, provider, name, enabled, test_mode, options, timestamps). To rotate a secret, write the new value; there is no way to read the current one back.
347
365
  *
348
366
  * @param {string} params.id - The PSP configuration. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
349
367
  * @throws {RevenexxException}
350
- * @returns {Promise<Models.Error>}
368
+ * @returns {Promise<Models.PaymentProvider>}
351
369
  */
352
370
  paymentsProvidersGet(params: {
353
371
  id: string;
354
- }): Promise<Models.Error>;
372
+ }): Promise<Models.PaymentProvider>;
355
373
  /**
356
374
  * PSP secrets are write-only: 'credentials' and 'webhook_secret' are accepted on create/update, stored for the drivers, and never returned by any route — the responses carry the public columns only (id, provider, name, enabled, test_mode, options, timestamps). To rotate a secret, write the new value; there is no way to read the current one back.
357
375
  *
358
376
  * @param {string} id - The PSP configuration. A uuid — the data plane casts this segment and answers 400, not 404, for anything else.
359
377
  * @throws {RevenexxException}
360
- * @returns {Promise<Models.Error>}
378
+ * @returns {Promise<Models.PaymentProvider>}
361
379
  * @deprecated Use the object parameter style method for a better developer experience.
362
380
  */
363
- paymentsProvidersGet(id: string): Promise<Models.Error>;
381
+ paymentsProvidersGet(id: string): Promise<Models.PaymentProvider>;
364
382
  /**
365
383
  * A partial write: omitted fields keep their value. Three things are changed here in practice — the `credentials` (and `webhook_secret`) when a key is rotated, `test_mode` when an account moves from the PSP's sandbox to live, and `enabled` when it is switched on or taken out of service. PSP secrets are write-only: 'credentials' and 'webhook_secret' are accepted on create/update, stored for the drivers, and never returned by any route — the responses carry the public columns only (id, provider, name, enabled, test_mode, options, timestamps). To rotate a secret, write the new value; there is no way to read the current one back. One field is not like the others: `provider` is the CODE every payment and every method resolves this PSP by, so writing a different one is the delete through another door and is refused with the same 409 while anything still names the current code. Switching acquirer is a second configuration plus `enabled: false` on this one, never a rename.
366
384
  *
@@ -373,7 +391,7 @@ declare class PaymentsProviders {
373
391
  * @param {boolean} params.testMode - Whether the driver talks to the PSP's sandbox. New configurations start in test mode: a provider nobody verified must not touch live money. Unstated takes the tenant's own `test_mode_default` setting.
374
392
  * @param {string} params.webhookSecret - The signing secret the PSP issues when its webhook endpoint is created, in the provider's own dashboard. webhooks.revenexx.com verifies each callback against it before the dispatcher hands the envelope to this app. Write-only, like `credentials`: it is stored, used, and never read back by any route, so there is nothing to compare a value against — to rotate it, write the new one. Whatever a document shows here is a generated placeholder, not a usable secret — writing it verbatim leaves every callback failing verification.
375
393
  * @throws {RevenexxException}
376
- * @returns {Promise<Models.Error>}
394
+ * @returns {Promise<Models.PaymentProvider>}
377
395
  */
378
396
  paymentsProvidersUpdate(params: {
379
397
  id: string;
@@ -384,7 +402,7 @@ declare class PaymentsProviders {
384
402
  provider?: string;
385
403
  testMode?: boolean;
386
404
  webhookSecret?: string;
387
- }): Promise<Models.Error>;
405
+ }): Promise<Models.PaymentProvider>;
388
406
  /**
389
407
  * A partial write: omitted fields keep their value. Three things are changed here in practice — the `credentials` (and `webhook_secret`) when a key is rotated, `test_mode` when an account moves from the PSP's sandbox to live, and `enabled` when it is switched on or taken out of service. PSP secrets are write-only: 'credentials' and 'webhook_secret' are accepted on create/update, stored for the drivers, and never returned by any route — the responses carry the public columns only (id, provider, name, enabled, test_mode, options, timestamps). To rotate a secret, write the new value; there is no way to read the current one back. One field is not like the others: `provider` is the CODE every payment and every method resolves this PSP by, so writing a different one is the delete through another door and is refused with the same 409 while anything still names the current code. Switching acquirer is a second configuration plus `enabled: false` on this one, never a rename.
390
408
  *
@@ -397,10 +415,10 @@ declare class PaymentsProviders {
397
415
  * @param {boolean} testMode - Whether the driver talks to the PSP's sandbox. New configurations start in test mode: a provider nobody verified must not touch live money. Unstated takes the tenant's own `test_mode_default` setting.
398
416
  * @param {string} webhookSecret - The signing secret the PSP issues when its webhook endpoint is created, in the provider's own dashboard. webhooks.revenexx.com verifies each callback against it before the dispatcher hands the envelope to this app. Write-only, like `credentials`: it is stored, used, and never read back by any route, so there is nothing to compare a value against — to rotate it, write the new one. Whatever a document shows here is a generated placeholder, not a usable secret — writing it verbatim leaves every callback failing verification.
399
417
  * @throws {RevenexxException}
400
- * @returns {Promise<Models.Error>}
418
+ * @returns {Promise<Models.PaymentProvider>}
401
419
  * @deprecated Use the object parameter style method for a better developer experience.
402
420
  */
403
- paymentsProvidersUpdate(id: string, credentials?: object, enabled?: boolean, name?: string, options?: object, provider?: string, testMode?: boolean, webhookSecret?: string): Promise<Models.Error>;
421
+ paymentsProvidersUpdate(id: string, credentials?: object, enabled?: boolean, name?: string, options?: object, provider?: string, testMode?: boolean, webhookSecret?: string): Promise<Models.PaymentProvider>;
404
422
  }
405
423
 
406
424
  export { PaymentsProviders };