@boxrouter/sdk 0.0.1-alpha.0 → 0.12.190

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 (338) hide show
  1. package/NOTICE +29 -5
  2. package/README.md +497 -24
  3. package/dist/addresses.d.ts +5 -0
  4. package/dist/addresses.js +10 -0
  5. package/dist/api-error.d.ts +62 -0
  6. package/dist/api-error.js +264 -0
  7. package/dist/boxrouter.d.ts +68 -0
  8. package/dist/boxrouter.js +291 -0
  9. package/dist/browser-session/index.d.ts +17 -0
  10. package/dist/browser-session/index.js +48 -0
  11. package/dist/browser-session/operations.gen.d.ts +272 -0
  12. package/dist/browser-session/operations.gen.js +58 -0
  13. package/dist/browser-session/responseContracts/api_keys.d.ts +2 -0
  14. package/dist/browser-session/responseContracts/api_keys.js +10 -0
  15. package/dist/browser-session/responseContracts/credits.d.ts +2 -0
  16. package/dist/browser-session/responseContracts/credits.js +8 -0
  17. package/dist/browser-session/responseContracts/github.d.ts +2 -0
  18. package/dist/browser-session/responseContracts/github.js +11 -0
  19. package/dist/browser-session/responseContracts/identity.d.ts +2 -0
  20. package/dist/browser-session/responseContracts/identity.js +30 -0
  21. package/dist/browser-session/responseContracts/organizations.d.ts +2 -0
  22. package/dist/browser-session/responseContracts/organizations.js +17 -0
  23. package/dist/browser-session/responseContracts/privacy.d.ts +2 -0
  24. package/dist/browser-session/responseContracts/privacy.js +7 -0
  25. package/dist/browser-session/responseContracts.gen.d.ts +3 -0
  26. package/dist/browser-session/responseContracts.gen.js +10 -0
  27. package/dist/browser-session/responseValidators/api_keys-diagnostics.cjs +1 -0
  28. package/dist/browser-session/responseValidators/api_keys-diagnostics.d.cts +4 -0
  29. package/dist/browser-session/responseValidators/api_keys.cjs +2 -0
  30. package/dist/browser-session/responseValidators/api_keys.d.cts +4 -0
  31. package/dist/browser-session/responseValidators/credits-diagnostics.cjs +1 -0
  32. package/dist/browser-session/responseValidators/credits-diagnostics.d.cts +3 -0
  33. package/dist/browser-session/responseValidators/credits.cjs +2 -0
  34. package/dist/browser-session/responseValidators/credits.d.cts +3 -0
  35. package/dist/browser-session/responseValidators/github-diagnostics.cjs +1 -0
  36. package/dist/browser-session/responseValidators/github-diagnostics.d.cts +3 -0
  37. package/dist/browser-session/responseValidators/github.cjs +2 -0
  38. package/dist/browser-session/responseValidators/github.d.cts +3 -0
  39. package/dist/browser-session/responseValidators/identity-diagnostics.cjs +1 -0
  40. package/dist/browser-session/responseValidators/identity-diagnostics.d.cts +23 -0
  41. package/dist/browser-session/responseValidators/identity.cjs +2 -0
  42. package/dist/browser-session/responseValidators/identity.d.cts +23 -0
  43. package/dist/browser-session/responseValidators/organizations-diagnostics.cjs +1 -0
  44. package/dist/browser-session/responseValidators/organizations-diagnostics.d.cts +15 -0
  45. package/dist/browser-session/responseValidators/organizations.cjs +2 -0
  46. package/dist/browser-session/responseValidators/organizations.d.cts +15 -0
  47. package/dist/browser-session/responseValidators/privacy-diagnostics.cjs +1 -0
  48. package/dist/browser-session/responseValidators/privacy-diagnostics.d.cts +2 -0
  49. package/dist/browser-session/responseValidators/privacy.cjs +2 -0
  50. package/dist/browser-session/responseValidators/privacy.d.cts +2 -0
  51. package/dist/client/client.gen.d.ts +1 -1
  52. package/dist/client/client.gen.js +46 -94
  53. package/dist/client/index.d.ts +10 -10
  54. package/dist/client/index.js +16 -5
  55. package/dist/client/types.gen.d.ts +6 -6
  56. package/dist/client/types.gen.js +2 -1
  57. package/dist/client/utils.gen.d.ts +2 -2
  58. package/dist/client/utils.gen.js +31 -20
  59. package/dist/client.gen.d.ts +2 -2
  60. package/dist/client.gen.js +5 -2
  61. package/dist/command-check.gen.d.ts +14 -0
  62. package/dist/command-check.gen.js +23 -0
  63. package/dist/command-input.gen.d.ts +6 -0
  64. package/dist/command-input.gen.js +45 -0
  65. package/dist/core/auth.gen.js +5 -1
  66. package/dist/core/binaryStream.d.ts +8 -0
  67. package/dist/core/binaryStream.js +76 -0
  68. package/dist/core/bodySerializer.gen.d.ts +1 -1
  69. package/dist/core/bodySerializer.gen.js +8 -5
  70. package/dist/core/commandValidators.cjs +1 -0
  71. package/dist/core/commandValidators.d.cts +14 -0
  72. package/dist/core/eventValidation.d.ts +17 -0
  73. package/dist/core/eventValidation.js +56 -0
  74. package/dist/core/eventValidators.cjs +1 -0
  75. package/dist/core/eventValidators.d.cts +2 -0
  76. package/dist/core/json.d.ts +3 -0
  77. package/dist/core/json.js +33 -0
  78. package/dist/core/params.gen.js +4 -1
  79. package/dist/core/pathSerializer.gen.js +20 -11
  80. package/dist/core/queryKeySerializer.gen.js +12 -6
  81. package/dist/core/responseContracts/actions.d.ts +2 -0
  82. package/dist/core/responseContracts/actions.js +30 -0
  83. package/dist/core/responseContracts/agents.d.ts +2 -0
  84. package/dist/core/responseContracts/agents.js +7 -0
  85. package/dist/core/responseContracts/artifacts.d.ts +2 -0
  86. package/dist/core/responseContracts/artifacts.js +8 -0
  87. package/dist/core/responseContracts/commands.d.ts +2 -0
  88. package/dist/core/responseContracts/commands.js +6 -0
  89. package/dist/core/responseContracts/credits.d.ts +2 -0
  90. package/dist/core/responseContracts/credits.js +27 -0
  91. package/dist/core/responseContracts/files.d.ts +2 -0
  92. package/dist/core/responseContracts/files.js +15 -0
  93. package/dist/core/responseContracts/github.d.ts +2 -0
  94. package/dist/core/responseContracts/github.js +8 -0
  95. package/dist/core/responseContracts/images.d.ts +2 -0
  96. package/dist/core/responseContracts/images.js +8 -0
  97. package/dist/core/responseContracts/launchRuns.d.ts +2 -0
  98. package/dist/core/responseContracts/launchRuns.js +10 -0
  99. package/dist/core/responseContracts/launches.d.ts +2 -0
  100. package/dist/core/responseContracts/launches.js +10 -0
  101. package/dist/core/responseContracts/operations.d.ts +2 -0
  102. package/dist/core/responseContracts/operations.js +7 -0
  103. package/dist/core/responseContracts/previews.d.ts +2 -0
  104. package/dist/core/responseContracts/previews.js +8 -0
  105. package/dist/core/responseContracts/pricing.d.ts +2 -0
  106. package/dist/core/responseContracts/pricing.js +6 -0
  107. package/dist/core/responseContracts/processes.d.ts +2 -0
  108. package/dist/core/responseContracts/processes.js +11 -0
  109. package/dist/core/responseContracts/provider_accounts.d.ts +2 -0
  110. package/dist/core/responseContracts/provider_accounts.js +13 -0
  111. package/dist/core/responseContracts/providers.d.ts +2 -0
  112. package/dist/core/responseContracts/providers.js +6 -0
  113. package/dist/core/responseContracts/routing.d.ts +2 -0
  114. package/dist/core/responseContracts/routing.js +8 -0
  115. package/dist/core/responseContracts/sandboxes.d.ts +2 -0
  116. package/dist/core/responseContracts/sandboxes.js +15 -0
  117. package/dist/core/responseContracts/secrets.d.ts +2 -0
  118. package/dist/core/responseContracts/secrets.js +8 -0
  119. package/dist/core/responseContracts/spend_limits.d.ts +2 -0
  120. package/dist/core/responseContracts/spend_limits.js +8 -0
  121. package/dist/core/responseContracts/terminals.d.ts +2 -0
  122. package/dist/core/responseContracts/terminals.js +11 -0
  123. package/dist/core/responseContracts/usage.d.ts +2 -0
  124. package/dist/core/responseContracts/usage.js +7 -0
  125. package/dist/core/responseContracts/volumes.d.ts +2 -0
  126. package/dist/core/responseContracts/volumes.js +19 -0
  127. package/dist/core/responseContracts.gen.d.ts +3 -0
  128. package/dist/core/responseContracts.gen.js +27 -0
  129. package/dist/core/responseModes.d.ts +19 -0
  130. package/dist/core/responseModes.js +13 -0
  131. package/dist/core/responseValidation.d.ts +44 -0
  132. package/dist/core/responseValidation.js +174 -0
  133. package/dist/core/responseValidators/actions-diagnostics.cjs +4 -0
  134. package/dist/core/responseValidators/actions-diagnostics.d.cts +24 -0
  135. package/dist/core/responseValidators/actions.cjs +2 -0
  136. package/dist/core/responseValidators/actions.d.cts +24 -0
  137. package/dist/core/responseValidators/agents-diagnostics.cjs +1 -0
  138. package/dist/core/responseValidators/agents-diagnostics.d.cts +2 -0
  139. package/dist/core/responseValidators/agents.cjs +2 -0
  140. package/dist/core/responseValidators/agents.d.cts +2 -0
  141. package/dist/core/responseValidators/artifacts-diagnostics.cjs +1 -0
  142. package/dist/core/responseValidators/artifacts-diagnostics.d.cts +2 -0
  143. package/dist/core/responseValidators/artifacts.cjs +2 -0
  144. package/dist/core/responseValidators/artifacts.d.cts +2 -0
  145. package/dist/core/responseValidators/commands-diagnostics.cjs +1 -0
  146. package/dist/core/responseValidators/commands-diagnostics.d.cts +1 -0
  147. package/dist/core/responseValidators/commands.cjs +2 -0
  148. package/dist/core/responseValidators/commands.d.cts +1 -0
  149. package/dist/core/responseValidators/compact.cjs +122 -0
  150. package/dist/core/responseValidators/credits-diagnostics.cjs +1 -0
  151. package/dist/core/responseValidators/credits-diagnostics.d.cts +21 -0
  152. package/dist/core/responseValidators/credits.cjs +2 -0
  153. package/dist/core/responseValidators/credits.d.cts +21 -0
  154. package/dist/core/responseValidators/files-diagnostics.cjs +1 -0
  155. package/dist/core/responseValidators/files-diagnostics.d.cts +5 -0
  156. package/dist/core/responseValidators/files.cjs +2 -0
  157. package/dist/core/responseValidators/files.d.cts +5 -0
  158. package/dist/core/responseValidators/github-diagnostics.cjs +1 -0
  159. package/dist/core/responseValidators/github-diagnostics.d.cts +2 -0
  160. package/dist/core/responseValidators/github.cjs +2 -0
  161. package/dist/core/responseValidators/github.d.cts +2 -0
  162. package/dist/core/responseValidators/images-diagnostics.cjs +1 -0
  163. package/dist/core/responseValidators/images-diagnostics.d.cts +3 -0
  164. package/dist/core/responseValidators/images.cjs +2 -0
  165. package/dist/core/responseValidators/images.d.cts +3 -0
  166. package/dist/core/responseValidators/launchRuns-diagnostics.cjs +1 -0
  167. package/dist/core/responseValidators/launchRuns-diagnostics.d.cts +5 -0
  168. package/dist/core/responseValidators/launchRuns.cjs +2 -0
  169. package/dist/core/responseValidators/launchRuns.d.cts +5 -0
  170. package/dist/core/responseValidators/launches-diagnostics.cjs +10 -0
  171. package/dist/core/responseValidators/launches-diagnostics.d.cts +5 -0
  172. package/dist/core/responseValidators/launches.cjs +2 -0
  173. package/dist/core/responseValidators/launches.d.cts +5 -0
  174. package/dist/core/responseValidators/operations-diagnostics.cjs +1 -0
  175. package/dist/core/responseValidators/operations-diagnostics.d.cts +2 -0
  176. package/dist/core/responseValidators/operations.cjs +2 -0
  177. package/dist/core/responseValidators/operations.d.cts +2 -0
  178. package/dist/core/responseValidators/previews-diagnostics.cjs +1 -0
  179. package/dist/core/responseValidators/previews-diagnostics.d.cts +3 -0
  180. package/dist/core/responseValidators/previews.cjs +2 -0
  181. package/dist/core/responseValidators/previews.d.cts +3 -0
  182. package/dist/core/responseValidators/pricing-diagnostics.cjs +7 -0
  183. package/dist/core/responseValidators/pricing-diagnostics.d.cts +1 -0
  184. package/dist/core/responseValidators/pricing.cjs +2 -0
  185. package/dist/core/responseValidators/pricing.d.cts +1 -0
  186. package/dist/core/responseValidators/processes-diagnostics.cjs +1 -0
  187. package/dist/core/responseValidators/processes-diagnostics.d.cts +2 -0
  188. package/dist/core/responseValidators/processes.cjs +2 -0
  189. package/dist/core/responseValidators/processes.d.cts +2 -0
  190. package/dist/core/responseValidators/provider_accounts-diagnostics.cjs +1 -0
  191. package/dist/core/responseValidators/provider_accounts-diagnostics.d.cts +8 -0
  192. package/dist/core/responseValidators/provider_accounts.cjs +2 -0
  193. package/dist/core/responseValidators/provider_accounts.d.cts +8 -0
  194. package/dist/core/responseValidators/providers-diagnostics.cjs +1 -0
  195. package/dist/core/responseValidators/providers-diagnostics.d.cts +1 -0
  196. package/dist/core/responseValidators/providers.cjs +2 -0
  197. package/dist/core/responseValidators/providers.d.cts +1 -0
  198. package/dist/core/responseValidators/routing-diagnostics.cjs +1 -0
  199. package/dist/core/responseValidators/routing-diagnostics.d.cts +3 -0
  200. package/dist/core/responseValidators/routing.cjs +2 -0
  201. package/dist/core/responseValidators/routing.d.cts +3 -0
  202. package/dist/core/responseValidators/sandboxes-diagnostics.cjs +1 -0
  203. package/dist/core/responseValidators/sandboxes-diagnostics.d.cts +10 -0
  204. package/dist/core/responseValidators/sandboxes.cjs +2 -0
  205. package/dist/core/responseValidators/sandboxes.d.cts +10 -0
  206. package/dist/core/responseValidators/secrets-diagnostics.cjs +1 -0
  207. package/dist/core/responseValidators/secrets-diagnostics.d.cts +1 -0
  208. package/dist/core/responseValidators/secrets.cjs +2 -0
  209. package/dist/core/responseValidators/secrets.d.cts +1 -0
  210. package/dist/core/responseValidators/spend_limits-diagnostics.cjs +1 -0
  211. package/dist/core/responseValidators/spend_limits-diagnostics.d.cts +3 -0
  212. package/dist/core/responseValidators/spend_limits.cjs +2 -0
  213. package/dist/core/responseValidators/spend_limits.d.cts +3 -0
  214. package/dist/core/responseValidators/terminals-diagnostics.cjs +1 -0
  215. package/dist/core/responseValidators/terminals-diagnostics.d.cts +2 -0
  216. package/dist/core/responseValidators/terminals.cjs +2 -0
  217. package/dist/core/responseValidators/terminals.d.cts +2 -0
  218. package/dist/core/responseValidators/usage-diagnostics.cjs +1 -0
  219. package/dist/core/responseValidators/usage-diagnostics.d.cts +1 -0
  220. package/dist/core/responseValidators/usage.cjs +2 -0
  221. package/dist/core/responseValidators/usage.d.cts +1 -0
  222. package/dist/core/responseValidators/volumes-diagnostics.cjs +1 -0
  223. package/dist/core/responseValidators/volumes-diagnostics.d.cts +10 -0
  224. package/dist/core/responseValidators/volumes.cjs +2 -0
  225. package/dist/core/responseValidators/volumes.d.cts +10 -0
  226. package/dist/core/serverSentEvents.gen.d.ts +21 -62
  227. package/dist/core/serverSentEvents.gen.js +297 -116
  228. package/dist/core/streamErrors.d.ts +32 -0
  229. package/dist/core/streamErrors.js +51 -0
  230. package/dist/core/types.gen.d.ts +2 -2
  231. package/dist/core/types.gen.js +2 -1
  232. package/dist/core/utils.gen.d.ts +1 -1
  233. package/dist/core/utils.gen.js +16 -10
  234. package/dist/creation.gen.d.ts +21 -0
  235. package/dist/creation.gen.js +35 -0
  236. package/dist/data-origin.d.ts +25 -0
  237. package/dist/data-origin.js +57 -0
  238. package/dist/error-codes.gen.d.ts +2 -0
  239. package/dist/error-codes.gen.js +2 -0
  240. package/dist/idempotency.gen.d.ts +1 -0
  241. package/dist/idempotency.gen.js +60 -0
  242. package/dist/images.d.ts +74 -0
  243. package/dist/images.js +88 -0
  244. package/dist/index.d.ts +22 -2
  245. package/dist/index.js +79 -1
  246. package/dist/launch-input.gen.d.ts +9 -0
  247. package/dist/launch-input.gen.js +83 -0
  248. package/dist/launch.d.ts +28 -0
  249. package/dist/launch.js +222 -0
  250. package/dist/namespace-actions.d.mts +307 -0
  251. package/dist/namespace-actions.mjs +595 -0
  252. package/dist/namespace-agents.d.mts +33 -0
  253. package/dist/namespace-agents.mjs +40 -0
  254. package/dist/namespace-artifacts.d.mts +46 -0
  255. package/dist/namespace-artifacts.mjs +69 -0
  256. package/dist/namespace-base.d.mts +7 -0
  257. package/dist/namespace-base.mjs +7 -0
  258. package/dist/namespace-commands.d.mts +57 -0
  259. package/dist/namespace-commands.mjs +57 -0
  260. package/dist/namespace-credits.d.mts +213 -0
  261. package/dist/namespace-credits.mjs +476 -0
  262. package/dist/namespace-files.d.mts +203 -0
  263. package/dist/namespace-files.mjs +334 -0
  264. package/dist/namespace-github.d.mts +50 -0
  265. package/dist/namespace-github.mjs +68 -0
  266. package/dist/namespace-images.d.mts +52 -0
  267. package/dist/namespace-images.mjs +78 -0
  268. package/dist/namespace-launch_runs.d.mts +89 -0
  269. package/dist/namespace-launch_runs.mjs +133 -0
  270. package/dist/namespace-launches.d.mts +89 -0
  271. package/dist/namespace-launches.mjs +133 -0
  272. package/dist/namespace-operations.d.mts +45 -0
  273. package/dist/namespace-operations.mjs +52 -0
  274. package/dist/namespace-previews.d.mts +79 -0
  275. package/dist/namespace-previews.mjs +101 -0
  276. package/dist/namespace-pricing.d.mts +31 -0
  277. package/dist/namespace-pricing.mjs +22 -0
  278. package/dist/namespace-processes.d.mts +125 -0
  279. package/dist/namespace-processes.mjs +184 -0
  280. package/dist/namespace-provider_accounts.d.mts +156 -0
  281. package/dist/namespace-provider_accounts.mjs +241 -0
  282. package/dist/namespace-providers.d.mts +28 -0
  283. package/dist/namespace-providers.mjs +24 -0
  284. package/dist/namespace-routing.d.mts +64 -0
  285. package/dist/namespace-routing.mjs +86 -0
  286. package/dist/namespace-sandboxes.d.mts +287 -0
  287. package/dist/namespace-sandboxes.mjs +402 -0
  288. package/dist/namespace-secrets.d.mts +46 -0
  289. package/dist/namespace-secrets.mjs +68 -0
  290. package/dist/namespace-spend_limits.d.mts +48 -0
  291. package/dist/namespace-spend_limits.mjs +70 -0
  292. package/dist/namespace-terminals.d.mts +112 -0
  293. package/dist/namespace-terminals.mjs +177 -0
  294. package/dist/namespace-usage.d.mts +46 -0
  295. package/dist/namespace-usage.mjs +53 -0
  296. package/dist/namespace-volumes.d.mts +110 -0
  297. package/dist/namespace-volumes.mjs +269 -0
  298. package/dist/operations.d.ts +14 -0
  299. package/dist/operations.js +31 -0
  300. package/dist/retry.d.ts +8 -0
  301. package/dist/retry.js +63 -0
  302. package/dist/routing-choices.gen.d.ts +132 -0
  303. package/dist/routing-choices.gen.js +136 -0
  304. package/dist/routing.d.ts +23 -0
  305. package/dist/routing.js +38 -0
  306. package/dist/sandbox-handle.gen.d.ts +8 -0
  307. package/dist/sandbox-handle.gen.js +14 -0
  308. package/dist/sandboxes.d.ts +213 -0
  309. package/dist/sandboxes.js +507 -0
  310. package/dist/sdk.gen.d.ts +2016 -12
  311. package/dist/sdk.gen.js +3862 -16
  312. package/dist/server-timing.d.ts +19 -0
  313. package/dist/server-timing.gen.d.ts +265 -0
  314. package/dist/server-timing.gen.js +254 -0
  315. package/dist/server-timing.js +421 -0
  316. package/dist/spend-limits.d.ts +17 -0
  317. package/dist/spend-limits.js +26 -0
  318. package/dist/telemetry.d.ts +51 -0
  319. package/dist/telemetry.gen.d.ts +1 -0
  320. package/dist/telemetry.gen.js +5 -0
  321. package/dist/telemetry.js +438 -0
  322. package/dist/terminal.d.ts +61 -0
  323. package/dist/terminal.js +266 -0
  324. package/dist/transfer.d.ts +75 -0
  325. package/dist/transfer.js +389 -0
  326. package/dist/types.gen.d.ts +14936 -110
  327. package/dist/types.gen.js +2 -1
  328. package/dist/user-agent.d.ts +2 -0
  329. package/dist/user-agent.js +18 -0
  330. package/dist/version.gen.d.ts +1 -0
  331. package/dist/version.gen.js +5 -0
  332. package/dist/volumes.d.ts +33 -0
  333. package/dist/volumes.js +221 -0
  334. package/dist/waits.d.ts +31 -0
  335. package/dist/waits.js +42 -0
  336. package/dist/workflow-policy.gen.d.ts +41 -0
  337. package/dist/workflow-policy.gen.js +45 -0
  338. package/package.json +124 -14
@@ -0,0 +1 @@
1
+ "use strict";exports.validate0 = validate246;const schema250 = {"type":"object","required":["mode","currency","settled_nanodollars","held_nanodollars","available_nanodollars","purchase_bounds_minor"],"properties":{"mode":{"type":"string","enum":["test","live"],"description":"Stripe environment configured for purchases; live mode remains disabled until accepted for real money."},"currency":{"type":"string","const":"usd"},"settled_nanodollars":{"type":"string","maxLength":20,"pattern":"^(0|-?[1-9][0-9]{0,17}|-?[1-8][0-9]{18}|-?9[01][0-9]{17}|-?92[0-1][0-9]{16}|-?922[0-2][0-9]{15}|-?9223[0-2][0-9]{14}|-?92233[0-6][0-9]{13}|-?922337[0-1][0-9]{12}|-?92233720[0-2][0-9]{10}|-?922337203[0-5][0-9]{9}|-?9223372036[0-7][0-9]{8}|-?92233720368[0-4][0-9]{7}|-?922337203685[0-3][0-9]{6}|-?9223372036854[0-6][0-9]{5}|-?92233720368547[0-6][0-9]{4}|-?922337203685477[0-4][0-9]{3}|-?9223372036854775[0-7][0-9]{2}|922337203685477580[0-7]|-922337203685477580[0-8])$","description":"Canonical base-10 signed 64-bit nanodollar amount as a string, preserving exact integer precision across JSON clients. Confirmed purchases and adjustments less settled usage, in billionths of a US dollar. Negative after a refund of spent credit."},"held_nanodollars":{"type":"string","maxLength":19,"pattern":"^(0|[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[01][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-7])$","description":"Canonical base-10 nonnegative 64-bit nanodollar amount as a string, preserving exact integer precision across JSON clients. Credit reserved for work whose final cost is not yet settled."},"available_nanodollars":{"type":"string","maxLength":20,"pattern":"^(0|-?[1-9][0-9]{0,17}|-?[1-8][0-9]{18}|-?9[01][0-9]{17}|-?92[0-1][0-9]{16}|-?922[0-2][0-9]{15}|-?9223[0-2][0-9]{14}|-?92233[0-6][0-9]{13}|-?922337[0-1][0-9]{12}|-?92233720[0-2][0-9]{10}|-?922337203[0-5][0-9]{9}|-?9223372036[0-7][0-9]{8}|-?92233720368[0-4][0-9]{7}|-?922337203685[0-3][0-9]{6}|-?9223372036854[0-6][0-9]{5}|-?92233720368547[0-6][0-9]{4}|-?922337203685477[0-4][0-9]{3}|-?9223372036854775[0-7][0-9]{2}|922337203685477580[0-7]|-922337203685477580[0-8])$","description":"Canonical base-10 signed 64-bit nanodollar amount as a string, preserving exact integer precision across JSON clients; equals settled_nanodollars minus held_nanodollars."},"held_sandbox_count":{"minimum":0,"description":"How many sandboxes hold a reservation that makes up `held_nanodollars`; a create whose outcome is not yet known counts as one until it resolves. Absent from responses of a Cloud that does not report it yet.","allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"purchase_bounds_minor":{"type":"object","required":["minimum","maximum"],"properties":{"minimum":{"minimum":1,"description":"Smallest accepted top-up in US cents.","allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"maximum":{"minimum":1,"description":"Largest accepted top-up in US cents.","allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}}}}}};const func1 = require("ajv/dist/runtime/ucs2length").default;const pattern183 = new RegExp("^(0|-?[1-9][0-9]{0,17}|-?[1-8][0-9]{18}|-?9[01][0-9]{17}|-?92[0-1][0-9]{16}|-?922[0-2][0-9]{15}|-?9223[0-2][0-9]{14}|-?92233[0-6][0-9]{13}|-?922337[0-1][0-9]{12}|-?92233720[0-2][0-9]{10}|-?922337203[0-5][0-9]{9}|-?9223372036[0-7][0-9]{8}|-?92233720368[0-4][0-9]{7}|-?922337203685[0-3][0-9]{6}|-?9223372036854[0-6][0-9]{5}|-?92233720368547[0-6][0-9]{4}|-?922337203685477[0-4][0-9]{3}|-?9223372036854775[0-7][0-9]{2}|922337203685477580[0-7]|-922337203685477580[0-8])$", "u");const pattern184 = new RegExp("^(0|[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[01][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-7])$", "u");function validate246(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate246.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((((data.mode === undefined) && (missing0 = "mode")) || ((data.currency === undefined) && (missing0 = "currency"))) || ((data.settled_nanodollars === undefined) && (missing0 = "settled_nanodollars"))) || ((data.held_nanodollars === undefined) && (missing0 = "held_nanodollars"))) || ((data.available_nanodollars === undefined) && (missing0 = "available_nanodollars"))) || ((data.purchase_bounds_minor === undefined) && (missing0 = "purchase_bounds_minor"))){validate246.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.mode !== undefined){let data0 = data.mode;const _errs1 = errors;if(typeof data0 !== "string"){validate246.errors = [{instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if(!((data0 === "test") || (data0 === "live"))){validate246.errors = [{instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues: schema250.properties.mode.enum},message:"must be equal to one of the allowed values"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.currency !== undefined){let data1 = data.currency;const _errs3 = errors;if(typeof data1 !== "string"){validate246.errors = [{instancePath:instancePath+"/currency",schemaPath:"#/properties/currency/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if("usd" !== data1){validate246.errors = [{instancePath:instancePath+"/currency",schemaPath:"#/properties/currency/const",keyword:"const",params:{allowedValue: "usd"},message:"must be equal to constant"}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.settled_nanodollars !== undefined){let data2 = data.settled_nanodollars;const _errs5 = errors;if(errors === _errs5){if(typeof data2 === "string"){if(func1(data2) > 20){validate246.errors = [{instancePath:instancePath+"/settled_nanodollars",schemaPath:"#/properties/settled_nanodollars/maxLength",keyword:"maxLength",params:{limit: 20},message:"must NOT have more than 20 characters"}];return false;}else {if(!pattern183.test(data2)){validate246.errors = [{instancePath:instancePath+"/settled_nanodollars",schemaPath:"#/properties/settled_nanodollars/pattern",keyword:"pattern",params:{pattern: "^(0|-?[1-9][0-9]{0,17}|-?[1-8][0-9]{18}|-?9[01][0-9]{17}|-?92[0-1][0-9]{16}|-?922[0-2][0-9]{15}|-?9223[0-2][0-9]{14}|-?92233[0-6][0-9]{13}|-?922337[0-1][0-9]{12}|-?92233720[0-2][0-9]{10}|-?922337203[0-5][0-9]{9}|-?9223372036[0-7][0-9]{8}|-?92233720368[0-4][0-9]{7}|-?922337203685[0-3][0-9]{6}|-?9223372036854[0-6][0-9]{5}|-?92233720368547[0-6][0-9]{4}|-?922337203685477[0-4][0-9]{3}|-?9223372036854775[0-7][0-9]{2}|922337203685477580[0-7]|-922337203685477580[0-8])$"},message:"must match pattern \""+"^(0|-?[1-9][0-9]{0,17}|-?[1-8][0-9]{18}|-?9[01][0-9]{17}|-?92[0-1][0-9]{16}|-?922[0-2][0-9]{15}|-?9223[0-2][0-9]{14}|-?92233[0-6][0-9]{13}|-?922337[0-1][0-9]{12}|-?92233720[0-2][0-9]{10}|-?922337203[0-5][0-9]{9}|-?9223372036[0-7][0-9]{8}|-?92233720368[0-4][0-9]{7}|-?922337203685[0-3][0-9]{6}|-?9223372036854[0-6][0-9]{5}|-?92233720368547[0-6][0-9]{4}|-?922337203685477[0-4][0-9]{3}|-?9223372036854775[0-7][0-9]{2}|922337203685477580[0-7]|-922337203685477580[0-8])$"+"\""}];return false;}}}else {validate246.errors = [{instancePath:instancePath+"/settled_nanodollars",schemaPath:"#/properties/settled_nanodollars/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}if(valid0){if(data.held_nanodollars !== undefined){let data3 = data.held_nanodollars;const _errs7 = errors;if(errors === _errs7){if(typeof data3 === "string"){if(func1(data3) > 19){validate246.errors = [{instancePath:instancePath+"/held_nanodollars",schemaPath:"#/properties/held_nanodollars/maxLength",keyword:"maxLength",params:{limit: 19},message:"must NOT have more than 19 characters"}];return false;}else {if(!pattern184.test(data3)){validate246.errors = [{instancePath:instancePath+"/held_nanodollars",schemaPath:"#/properties/held_nanodollars/pattern",keyword:"pattern",params:{pattern: "^(0|[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[01][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-7])$"},message:"must match pattern \""+"^(0|[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[01][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-7])$"+"\""}];return false;}}}else {validate246.errors = [{instancePath:instancePath+"/held_nanodollars",schemaPath:"#/properties/held_nanodollars/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid0 = _errs7 === errors;}else {var valid0 = true;}if(valid0){if(data.available_nanodollars !== undefined){let data4 = data.available_nanodollars;const _errs9 = errors;if(errors === _errs9){if(typeof data4 === "string"){if(func1(data4) > 20){validate246.errors = [{instancePath:instancePath+"/available_nanodollars",schemaPath:"#/properties/available_nanodollars/maxLength",keyword:"maxLength",params:{limit: 20},message:"must NOT have more than 20 characters"}];return false;}else {if(!pattern183.test(data4)){validate246.errors = [{instancePath:instancePath+"/available_nanodollars",schemaPath:"#/properties/available_nanodollars/pattern",keyword:"pattern",params:{pattern: "^(0|-?[1-9][0-9]{0,17}|-?[1-8][0-9]{18}|-?9[01][0-9]{17}|-?92[0-1][0-9]{16}|-?922[0-2][0-9]{15}|-?9223[0-2][0-9]{14}|-?92233[0-6][0-9]{13}|-?922337[0-1][0-9]{12}|-?92233720[0-2][0-9]{10}|-?922337203[0-5][0-9]{9}|-?9223372036[0-7][0-9]{8}|-?92233720368[0-4][0-9]{7}|-?922337203685[0-3][0-9]{6}|-?9223372036854[0-6][0-9]{5}|-?92233720368547[0-6][0-9]{4}|-?922337203685477[0-4][0-9]{3}|-?9223372036854775[0-7][0-9]{2}|922337203685477580[0-7]|-922337203685477580[0-8])$"},message:"must match pattern \""+"^(0|-?[1-9][0-9]{0,17}|-?[1-8][0-9]{18}|-?9[01][0-9]{17}|-?92[0-1][0-9]{16}|-?922[0-2][0-9]{15}|-?9223[0-2][0-9]{14}|-?92233[0-6][0-9]{13}|-?922337[0-1][0-9]{12}|-?92233720[0-2][0-9]{10}|-?922337203[0-5][0-9]{9}|-?9223372036[0-7][0-9]{8}|-?92233720368[0-4][0-9]{7}|-?922337203685[0-3][0-9]{6}|-?9223372036854[0-6][0-9]{5}|-?92233720368547[0-6][0-9]{4}|-?922337203685477[0-4][0-9]{3}|-?9223372036854775[0-7][0-9]{2}|922337203685477580[0-7]|-922337203685477580[0-8])$"+"\""}];return false;}}}else {validate246.errors = [{instancePath:instancePath+"/available_nanodollars",schemaPath:"#/properties/available_nanodollars/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid0 = _errs9 === errors;}else {var valid0 = true;}if(valid0){if(data.held_sandbox_count !== undefined){let data5 = data.held_sandbox_count;const _errs11 = errors;const _errs12 = errors;const _errs13 = errors;let valid2 = false;const _errs14 = errors;if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){const err0 = {instancePath:instancePath+"/held_sandbox_count",schemaPath:"#/properties/held_sandbox_count/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs14 === errors;valid2 = valid2 || _valid0;const _errs16 = errors;if(typeof data5 !== "bigint"){const err1 = {instancePath:instancePath+"/held_sandbox_count",schemaPath:"#/properties/held_sandbox_count/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs16 === errors;valid2 = valid2 || _valid0;if(!valid2){const err2 = {instancePath:instancePath+"/held_sandbox_count",schemaPath:"#/properties/held_sandbox_count/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;validate246.errors = vErrors;return false;}else {errors = _errs13;if(vErrors !== null){if(_errs13){vErrors.length = _errs13;}else {vErrors = null;}}}var valid1 = _errs12 === errors;if(valid1){if(typeof data5 === "bigint"){if(data5 < 0){validate246.errors = [{instancePath:instancePath+"/held_sandbox_count",schemaPath:"#/properties/held_sandbox_count/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs11){if((typeof data5 == "number") && (isFinite(data5))){if(data5 < 0 || isNaN(data5)){validate246.errors = [{instancePath:instancePath+"/held_sandbox_count",schemaPath:"#/properties/held_sandbox_count/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid0 = _errs11 === errors;}else {var valid0 = true;}if(valid0){if(data.purchase_bounds_minor !== undefined){let data6 = data.purchase_bounds_minor;const _errs17 = errors;if(errors === _errs17){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing1;if(((data6.minimum === undefined) && (missing1 = "minimum")) || ((data6.maximum === undefined) && (missing1 = "maximum"))){validate246.errors = [{instancePath:instancePath+"/purchase_bounds_minor",schemaPath:"#/properties/purchase_bounds_minor/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data6.minimum !== undefined){let data7 = data6.minimum;const _errs19 = errors;const _errs20 = errors;const _errs21 = errors;let valid5 = false;const _errs22 = errors;if(!(((typeof data7 == "number") && (!(data7 % 1) && !isNaN(data7))) && (isFinite(data7)))){const err3 = {instancePath:instancePath+"/purchase_bounds_minor/minimum",schemaPath:"#/properties/purchase_bounds_minor/properties/minimum/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid1 = _errs22 === errors;valid5 = valid5 || _valid1;const _errs24 = errors;if(typeof data7 !== "bigint"){const err4 = {instancePath:instancePath+"/purchase_bounds_minor/minimum",schemaPath:"#/properties/purchase_bounds_minor/properties/minimum/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid1 = _errs24 === errors;valid5 = valid5 || _valid1;if(!valid5){const err5 = {instancePath:instancePath+"/purchase_bounds_minor/minimum",schemaPath:"#/properties/purchase_bounds_minor/properties/minimum/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;validate246.errors = vErrors;return false;}else {errors = _errs21;if(vErrors !== null){if(_errs21){vErrors.length = _errs21;}else {vErrors = null;}}}var valid4 = _errs20 === errors;if(valid4){if(typeof data7 === "bigint"){if(data7 < 1){validate246.errors = [{instancePath:instancePath+"/purchase_bounds_minor/minimum",schemaPath:"#/properties/purchase_bounds_minor/properties/minimum/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs19){if((typeof data7 == "number") && (isFinite(data7))){if(data7 < 1 || isNaN(data7)){validate246.errors = [{instancePath:instancePath+"/purchase_bounds_minor/minimum",schemaPath:"#/properties/purchase_bounds_minor/properties/minimum/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}var valid3 = _errs19 === errors;}else {var valid3 = true;}if(valid3){if(data6.maximum !== undefined){let data8 = data6.maximum;const _errs25 = errors;const _errs26 = errors;const _errs27 = errors;let valid7 = false;const _errs28 = errors;if(!(((typeof data8 == "number") && (!(data8 % 1) && !isNaN(data8))) && (isFinite(data8)))){const err6 = {instancePath:instancePath+"/purchase_bounds_minor/maximum",schemaPath:"#/properties/purchase_bounds_minor/properties/maximum/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid2 = _errs28 === errors;valid7 = valid7 || _valid2;const _errs30 = errors;if(typeof data8 !== "bigint"){const err7 = {instancePath:instancePath+"/purchase_bounds_minor/maximum",schemaPath:"#/properties/purchase_bounds_minor/properties/maximum/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid2 = _errs30 === errors;valid7 = valid7 || _valid2;if(!valid7){const err8 = {instancePath:instancePath+"/purchase_bounds_minor/maximum",schemaPath:"#/properties/purchase_bounds_minor/properties/maximum/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;validate246.errors = vErrors;return false;}else {errors = _errs27;if(vErrors !== null){if(_errs27){vErrors.length = _errs27;}else {vErrors = null;}}}var valid6 = _errs26 === errors;if(valid6){if(typeof data8 === "bigint"){if(data8 < 1){validate246.errors = [{instancePath:instancePath+"/purchase_bounds_minor/maximum",schemaPath:"#/properties/purchase_bounds_minor/properties/maximum/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs25){if((typeof data8 == "number") && (isFinite(data8))){if(data8 < 1 || isNaN(data8)){validate246.errors = [{instancePath:instancePath+"/purchase_bounds_minor/maximum",schemaPath:"#/properties/purchase_bounds_minor/properties/maximum/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}var valid3 = _errs25 === errors;}else {var valid3 = true;}}}}else {validate246.errors = [{instancePath:instancePath+"/purchase_bounds_minor",schemaPath:"#/properties/purchase_bounds_minor/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs17 === errors;}else {var valid0 = true;}}}}}}}}}else {validate246.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate246.errors = vErrors;return errors === 0;}validate246.evaluated = {"props":{"mode":true,"currency":true,"settled_nanodollars":true,"held_nanodollars":true,"available_nanodollars":true,"held_sandbox_count":true,"purchase_bounds_minor":true},"dynamicProps":false,"dynamicItems":false};exports.validate1 = validate247;const schema251 = {"anyOf":[{"$ref":"#/components/schemas/StartedCreditPurchase"},{"$ref":"#/components/schemas/AuthenticatedCreditPurchase"},{"$ref":"#/components/schemas/ConfirmedSavedCardCreditPurchase"}]};const schema252 = {"allOf":[{"$ref":"#/components/schemas/CreditPurchase"},{"type":"object","required":["checkout_url"],"properties":{"status":{"type":"string","const":"pending"},"method":{"type":"string","const":"checkout"},"checkout_url":{"type":"string","format":"uri","description":"Hosted payment page for this purchase. Send the payer here."}},"not":{"required":["authentication_url"],"properties":{"authentication_url":true}}}]};const schema253 = {"type":"object","required":["id","status","amount_minor","currency","created_at","updated_at"],"properties":{"id":{"type":"string"},"status":{"type":"string","description":"pending until the payment provider's verified notification arrives; confirmed\nonce the payment has been verified; canceled when an unpaid Checkout session\nexpires; failed when a saved-card attempt is definitively declined. Later\nrefunds and disputes are separate adjustments and do not change this status.\nClients must handle unknown values explicitly.\n"},"amount_minor":{"minimum":1,"description":"Credit added to the balance, in US cents. The purchase fee is never part of it.","allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"fee_minor":{"minimum":0,"description":"BoxRouter's fee for adding credits, in US cents, charged on top of amount_minor and never credited. Zero when the purchase carried no fee. Absent on older services.","allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"total_minor":{"minimum":1,"description":"amount_minor plus fee_minor, in US cents, before any tax. This is what the payer is asked to pay. Absent on older services.","allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"currency":{"type":"string","const":"usd"},"method":{"type":"string","enum":["checkout","saved_card","auto_top_up"],"description":"How this purchase was started. New services report existing purchases as checkout; absent on older services."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"failure_reason":{"type":"string","minLength":1,"maxLength":100,"description":"Short safe description present only when a saved-card attempt failed."},"adjustments":{"type":"array","description":"Later refunds, dispute adjustments and verified dispute outcomes, oldest first.","items":{"$ref":"#/components/schemas/CreditAdjustment"}},"invoice":{"$ref":"#/components/schemas/CreditInvoice","description":"Present only after payment is confirmed and Stripe provides invoice links. Older purchases can have no invoice."},"receipt_url":{"type":"string","format":"uri","description":"Stripe receipt for the confirmed payment; never returned for an unpaid purchase. Links can change."},"refund":{"$ref":"#/components/schemas/CreditPurchaseRefund","description":"Self-serve refund eligibility and the newest refund. Present only when refund routes are enabled; never contains a stale quote."}},"allOf":[{"if":{"properties":{"status":{"not":{"const":"confirmed"}}},"required":["status"]},"then":{"not":{"anyOf":[{"required":["invoice"],"properties":{"invoice":true}},{"required":["receipt_url"],"properties":{"receipt_url":true}}]}}},{"if":{"properties":{"status":{"const":"failed"}},"required":["status"]},"then":{"properties":{"failure_reason":{"$ref":"#/components/schemas/failure_reason"}},"required":["failure_reason"]}},{"if":{"properties":{"status":{"not":{"const":"failed"}}},"required":["status"]},"then":{"not":{"required":["failure_reason"],"properties":{"failure_reason":true}}}}]};const schema254 = {"type":"string","minLength":1,"maxLength":100,"description":"Short safe description present only when a saved-card attempt failed."};const schema256 = {"type":"object","required":["number","pdf_url","hosted_url"],"properties":{"number":{"type":"string","minLength":1},"pdf_url":{"type":"string","format":"uri"},"hosted_url":{"type":"string","format":"uri"}}};const formats0 = require("ajv-formats/dist/formats").fullFormats["date-time"];const schema255 = {"type":"object","required":["kind","amount_minor","created_at"],"properties":{"kind":{"type":"string","x-boxrouter-open-enum":true,"description":"Refund or dispute history. dispute_reinstated is an exact positive restoration of\nfunds returned by Stripe. dispute_lost is a verified final outcome marker and does\nnot change the credit balance.\n"},"amount_minor":{"description":"Signed amount in US cents; negative reduces the balance and positive restores it.\nA dispute_reinstated adjustment is positive; a dispute_lost outcome marker has amount zero.\n","allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}]},"created_at":{"type":"string","format":"date-time"}},"allOf":[{"if":{"properties":{"kind":{"const":"dispute_reinstated"}},"required":["kind"]},"then":{"properties":{"amount_minor":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}}}}},{"if":{"properties":{"kind":{"const":"dispute_lost"}},"required":["kind"]},"then":{"properties":{"amount_minor":{"const":0}}}}]};function validate250(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate250.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs1 = errors;const _errs2 = errors;let valid1 = true;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.kind === undefined) && (missing0 = "kind")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.kind !== undefined){if("dispute_reinstated" !== data.kind){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var _valid0 = _errs3 === errors;errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}if(_valid0){const _errs5 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.amount_minor !== undefined){let data1 = data.amount_minor;const _errs6 = errors;const _errs7 = errors;const _errs8 = errors;let valid5 = false;const _errs9 = errors;if(!(((typeof data1 == "number") && (!(data1 % 1) && !isNaN(data1))) && (isFinite(data1)))){const err2 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/allOf/0/then/properties/amount_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var _valid1 = _errs9 === errors;valid5 = valid5 || _valid1;const _errs11 = errors;if(typeof data1 !== "bigint"){const err3 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/allOf/0/then/properties/amount_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid1 = _errs11 === errors;valid5 = valid5 || _valid1;if(!valid5){const err4 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/allOf/0/then/properties/amount_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;validate250.errors = vErrors;return false;}else {errors = _errs8;if(vErrors !== null){if(_errs8){vErrors.length = _errs8;}else {vErrors = null;}}}var valid4 = _errs7 === errors;if(valid4){if(typeof data1 === "bigint"){if(data1 < 1){validate250.errors = [{instancePath:instancePath+"/amount_minor",schemaPath:"#/allOf/0/then/properties/amount_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs6){if((typeof data1 == "number") && (isFinite(data1))){if(data1 < 1 || isNaN(data1)){validate250.errors = [{instancePath:instancePath+"/amount_minor",schemaPath:"#/allOf/0/then/properties/amount_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}}}var _valid0 = _errs5 === errors;valid1 = _valid0;if(valid1){var props0 = {};props0.amount_minor = true;props0.kind = true;}}if(!valid1){const err5 = {instancePath,schemaPath:"#/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;validate250.errors = vErrors;return false;}var valid0 = _errs1 === errors;if(valid0){const _errs12 = errors;const _errs13 = errors;let valid6 = true;const _errs14 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((data.kind === undefined) && (missing1 = "kind")){const err6 = {};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.kind !== undefined){if("dispute_lost" !== data.kind){const err7 = {};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}}var _valid2 = _errs14 === errors;errors = _errs13;if(vErrors !== null){if(_errs13){vErrors.length = _errs13;}else {vErrors = null;}}if(_valid2){const _errs16 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.amount_minor !== undefined){if(0 !== data.amount_minor){validate250.errors = [{instancePath:instancePath+"/amount_minor",schemaPath:"#/allOf/1/then/properties/amount_minor/const",keyword:"const",params:{allowedValue: 0},message:"must be equal to constant"}];return false;}}}var _valid2 = _errs16 === errors;valid6 = _valid2;if(valid6){var props1 = {};props1.amount_minor = true;props1.kind = true;}}if(!valid6){const err8 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;validate250.errors = vErrors;return false;}var valid0 = _errs12 === errors;if(valid0){if(props0 !== true && props1 !== undefined){if(props1 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props1);}}}}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing2;if((((data.kind === undefined) && (missing2 = "kind")) || ((data.amount_minor === undefined) && (missing2 = "amount_minor"))) || ((data.created_at === undefined) && (missing2 = "created_at"))){validate250.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"}];return false;}else {if(props0 !== true){props0 = props0 || {};props0.kind = true;props0.amount_minor = true;props0.created_at = true;}if(data.kind !== undefined){const _errs18 = errors;if(typeof data.kind !== "string"){validate250.errors = [{instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid9 = _errs18 === errors;}else {var valid9 = true;}if(valid9){if(data.amount_minor !== undefined){let data5 = data.amount_minor;const _errs20 = errors;const _errs22 = errors;let valid11 = false;const _errs23 = errors;if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){const err9 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var _valid3 = _errs23 === errors;valid11 = valid11 || _valid3;const _errs25 = errors;if(typeof data5 !== "bigint"){const err10 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var _valid3 = _errs25 === errors;valid11 = valid11 || _valid3;if(!valid11){const err11 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;validate250.errors = vErrors;return false;}else {errors = _errs22;if(vErrors !== null){if(_errs22){vErrors.length = _errs22;}else {vErrors = null;}}}var valid9 = _errs20 === errors;}else {var valid9 = true;}if(valid9){if(data.created_at !== undefined){let data6 = data.created_at;const _errs26 = errors;if(errors === _errs26){if(errors === _errs26){if(typeof data6 === "string"){if(!(formats0.validate(data6))){validate250.errors = [{instancePath:instancePath+"/created_at",schemaPath:"#/properties/created_at/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate250.errors = [{instancePath:instancePath+"/created_at",schemaPath:"#/properties/created_at/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid9 = _errs26 === errors;}else {var valid9 = true;}}}}}else {validate250.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate250.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate250.evaluated = {"dynamicProps":true,"dynamicItems":false};const schema257 = {"type":"object","required":["state"],"properties":{"state":{"type":"string","x-boxrouter-open-enum":true,"description":"Current refund state; clients must tolerate future values."},"disabled_reason":{"type":"string","x-boxrouter-open-enum":true,"description":"Why a refund cannot currently be requested."},"refundable_until":{"type":"string","format":"date-time","description":"Exclusive 24-hour deadline from payment confirmation, in UTC."},"fee_minor":{"minimum":0,"description":"Stripe processing fee in US cents, which is not refunded.","allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"latest_refund":{"$ref":"#/components/schemas/CreditRefundSummary","description":"Most recent refund, including pending or failed refunds."}}};const schema258 = {"type":"object","required":["id","status","unused","total","fee","card","requested_at"],"properties":{"id":{"type":"string"},"status":{"type":"string","x-boxrouter-open-enum":true},"unused":{"minimum":0,"description":"Credit debited from the balance in US cents.","allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"total":{"minimum":0,"description":"Stripe's total refund including tax, in US cents.","allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"fee":{"minimum":0,"description":"Original Stripe processing fee retained, in US cents.","allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"card":{"$ref":"#/components/schemas/RefundCard"},"requested_at":{"type":"string","format":"date-time"}}};const schema259 = {"type":"object","required":["type"],"properties":{"brand":{"type":"string"},"last4":{"type":"string","pattern":"^[0-9]{4}$","description":"Last four digits of the refunded card; absent for a Link refund, which has no card number."},"type":{"type":"string","x-boxrouter-open-enum":true}},"allOf":[{"if":{"properties":{"type":{"const":"card"}},"required":["type"]},"then":{"required":["brand","last4"]}},{"if":{"properties":{"type":{"const":"link"}},"required":["type"]},"then":{"not":{"required":["last4"],"properties":{"last4":true}}}}]};const pattern186 = new RegExp("^[0-9]{4}$", "u");function validate254(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate254.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs1 = errors;const _errs2 = errors;let valid1 = true;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.type === undefined) && (missing0 = "type")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){if("card" !== data.type){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var _valid0 = _errs3 === errors;errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}if(_valid0){const _errs5 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if(((data.brand === undefined) && (missing1 = "brand")) || ((data.last4 === undefined) && (missing1 = "last4"))){validate254.errors = [{instancePath,schemaPath:"#/allOf/0/then/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}}var _valid0 = _errs5 === errors;valid1 = _valid0;}if(!valid1){const err2 = {instancePath,schemaPath:"#/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;validate254.errors = vErrors;return false;}var valid0 = _errs1 === errors;if(valid0){const _errs6 = errors;const _errs7 = errors;let valid3 = true;const _errs8 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing2;if((data.type === undefined) && (missing2 = "type")){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {if(data.type !== undefined){if("link" !== data.type){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}}var _valid1 = _errs8 === errors;errors = _errs7;if(vErrors !== null){if(_errs7){vErrors.length = _errs7;}else {vErrors = null;}}if(_valid1){const _errs10 = errors;const _errs11 = errors;const _errs12 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing3;if((data.last4 === undefined) && (missing3 = "last4")){const err5 = {};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var valid5 = _errs12 === errors;if(valid5){validate254.errors = [{instancePath,schemaPath:"#/allOf/1/then/not",keyword:"not",params:{},message:"must NOT be valid"}];return false;}else {errors = _errs11;if(vErrors !== null){if(_errs11){vErrors.length = _errs11;}else {vErrors = null;}}}var _valid1 = _errs10 === errors;valid3 = _valid1;}if(!valid3){const err6 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;validate254.errors = vErrors;return false;}var valid0 = _errs6 === errors;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing4;if((data.type === undefined) && (missing4 = "type")){validate254.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing4},message:"must have required property '"+missing4+"'"}];return false;}else {if(data.brand !== undefined){const _errs13 = errors;if(typeof data.brand !== "string"){validate254.errors = [{instancePath:instancePath+"/brand",schemaPath:"#/properties/brand/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid6 = _errs13 === errors;}else {var valid6 = true;}if(valid6){if(data.last4 !== undefined){let data3 = data.last4;const _errs15 = errors;if(errors === _errs15){if(typeof data3 === "string"){if(!pattern186.test(data3)){validate254.errors = [{instancePath:instancePath+"/last4",schemaPath:"#/properties/last4/pattern",keyword:"pattern",params:{pattern: "^[0-9]{4}$"},message:"must match pattern \""+"^[0-9]{4}$"+"\""}];return false;}}else {validate254.errors = [{instancePath:instancePath+"/last4",schemaPath:"#/properties/last4/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid6 = _errs15 === errors;}else {var valid6 = true;}if(valid6){if(data.type !== undefined){const _errs17 = errors;if(typeof data.type !== "string"){validate254.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid6 = _errs17 === errors;}else {var valid6 = true;}}}}}else {validate254.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate254.errors = vErrors;return errors === 0;}validate254.evaluated = {"props":{"brand":true,"last4":true,"type":true},"dynamicProps":false,"dynamicItems":false};function validate253(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate253.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((((((data.id === undefined) && (missing0 = "id")) || ((data.status === undefined) && (missing0 = "status"))) || ((data.unused === undefined) && (missing0 = "unused"))) || ((data.total === undefined) && (missing0 = "total"))) || ((data.fee === undefined) && (missing0 = "fee"))) || ((data.card === undefined) && (missing0 = "card"))) || ((data.requested_at === undefined) && (missing0 = "requested_at"))){validate253.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.id !== undefined){const _errs1 = errors;if(typeof data.id !== "string"){validate253.errors = [{instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.status !== undefined){const _errs3 = errors;if(typeof data.status !== "string"){validate253.errors = [{instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.unused !== undefined){let data2 = data.unused;const _errs5 = errors;const _errs6 = errors;const _errs7 = errors;let valid2 = false;const _errs8 = errors;if(!(((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))){const err0 = {instancePath:instancePath+"/unused",schemaPath:"#/properties/unused/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs8 === errors;valid2 = valid2 || _valid0;const _errs10 = errors;if(typeof data2 !== "bigint"){const err1 = {instancePath:instancePath+"/unused",schemaPath:"#/properties/unused/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs10 === errors;valid2 = valid2 || _valid0;if(!valid2){const err2 = {instancePath:instancePath+"/unused",schemaPath:"#/properties/unused/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;validate253.errors = vErrors;return false;}else {errors = _errs7;if(vErrors !== null){if(_errs7){vErrors.length = _errs7;}else {vErrors = null;}}}var valid1 = _errs6 === errors;if(valid1){if(typeof data2 === "bigint"){if(data2 < 0){validate253.errors = [{instancePath:instancePath+"/unused",schemaPath:"#/properties/unused/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs5){if((typeof data2 == "number") && (isFinite(data2))){if(data2 < 0 || isNaN(data2)){validate253.errors = [{instancePath:instancePath+"/unused",schemaPath:"#/properties/unused/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid0 = _errs5 === errors;}else {var valid0 = true;}if(valid0){if(data.total !== undefined){let data3 = data.total;const _errs11 = errors;const _errs12 = errors;const _errs13 = errors;let valid4 = false;const _errs14 = errors;if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){const err3 = {instancePath:instancePath+"/total",schemaPath:"#/properties/total/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid1 = _errs14 === errors;valid4 = valid4 || _valid1;const _errs16 = errors;if(typeof data3 !== "bigint"){const err4 = {instancePath:instancePath+"/total",schemaPath:"#/properties/total/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid1 = _errs16 === errors;valid4 = valid4 || _valid1;if(!valid4){const err5 = {instancePath:instancePath+"/total",schemaPath:"#/properties/total/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;validate253.errors = vErrors;return false;}else {errors = _errs13;if(vErrors !== null){if(_errs13){vErrors.length = _errs13;}else {vErrors = null;}}}var valid3 = _errs12 === errors;if(valid3){if(typeof data3 === "bigint"){if(data3 < 0){validate253.errors = [{instancePath:instancePath+"/total",schemaPath:"#/properties/total/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs11){if((typeof data3 == "number") && (isFinite(data3))){if(data3 < 0 || isNaN(data3)){validate253.errors = [{instancePath:instancePath+"/total",schemaPath:"#/properties/total/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid0 = _errs11 === errors;}else {var valid0 = true;}if(valid0){if(data.fee !== undefined){let data4 = data.fee;const _errs17 = errors;const _errs18 = errors;const _errs19 = errors;let valid6 = false;const _errs20 = errors;if(!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){const err6 = {instancePath:instancePath+"/fee",schemaPath:"#/properties/fee/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid2 = _errs20 === errors;valid6 = valid6 || _valid2;const _errs22 = errors;if(typeof data4 !== "bigint"){const err7 = {instancePath:instancePath+"/fee",schemaPath:"#/properties/fee/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid2 = _errs22 === errors;valid6 = valid6 || _valid2;if(!valid6){const err8 = {instancePath:instancePath+"/fee",schemaPath:"#/properties/fee/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;validate253.errors = vErrors;return false;}else {errors = _errs19;if(vErrors !== null){if(_errs19){vErrors.length = _errs19;}else {vErrors = null;}}}var valid5 = _errs18 === errors;if(valid5){if(typeof data4 === "bigint"){if(data4 < 0){validate253.errors = [{instancePath:instancePath+"/fee",schemaPath:"#/properties/fee/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs17){if((typeof data4 == "number") && (isFinite(data4))){if(data4 < 0 || isNaN(data4)){validate253.errors = [{instancePath:instancePath+"/fee",schemaPath:"#/properties/fee/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid0 = _errs17 === errors;}else {var valid0 = true;}if(valid0){if(data.card !== undefined){const _errs23 = errors;if(!(validate254(data.card, {instancePath:instancePath+"/card",parentData:data,parentDataProperty:"card",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate254.errors : vErrors.concat(validate254.errors);errors = vErrors.length;}var valid0 = _errs23 === errors;}else {var valid0 = true;}if(valid0){if(data.requested_at !== undefined){let data6 = data.requested_at;const _errs24 = errors;if(errors === _errs24){if(errors === _errs24){if(typeof data6 === "string"){if(!(formats0.validate(data6))){validate253.errors = [{instancePath:instancePath+"/requested_at",schemaPath:"#/properties/requested_at/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate253.errors = [{instancePath:instancePath+"/requested_at",schemaPath:"#/properties/requested_at/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid0 = _errs24 === errors;}else {var valid0 = true;}}}}}}}}}else {validate253.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate253.errors = vErrors;return errors === 0;}validate253.evaluated = {"props":{"id":true,"status":true,"unused":true,"total":true,"fee":true,"card":true,"requested_at":true},"dynamicProps":false,"dynamicItems":false};function validate252(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate252.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.state === undefined) && (missing0 = "state")){validate252.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.state !== undefined){const _errs1 = errors;if(typeof data.state !== "string"){validate252.errors = [{instancePath:instancePath+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.disabled_reason !== undefined){const _errs3 = errors;if(typeof data.disabled_reason !== "string"){validate252.errors = [{instancePath:instancePath+"/disabled_reason",schemaPath:"#/properties/disabled_reason/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.refundable_until !== undefined){let data2 = data.refundable_until;const _errs5 = errors;if(errors === _errs5){if(errors === _errs5){if(typeof data2 === "string"){if(!(formats0.validate(data2))){validate252.errors = [{instancePath:instancePath+"/refundable_until",schemaPath:"#/properties/refundable_until/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate252.errors = [{instancePath:instancePath+"/refundable_until",schemaPath:"#/properties/refundable_until/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid0 = _errs5 === errors;}else {var valid0 = true;}if(valid0){if(data.fee_minor !== undefined){let data3 = data.fee_minor;const _errs7 = errors;const _errs8 = errors;const _errs9 = errors;let valid2 = false;const _errs10 = errors;if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){const err0 = {instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs10 === errors;valid2 = valid2 || _valid0;const _errs12 = errors;if(typeof data3 !== "bigint"){const err1 = {instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs12 === errors;valid2 = valid2 || _valid0;if(!valid2){const err2 = {instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;validate252.errors = vErrors;return false;}else {errors = _errs9;if(vErrors !== null){if(_errs9){vErrors.length = _errs9;}else {vErrors = null;}}}var valid1 = _errs8 === errors;if(valid1){if(typeof data3 === "bigint"){if(data3 < 0){validate252.errors = [{instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs7){if((typeof data3 == "number") && (isFinite(data3))){if(data3 < 0 || isNaN(data3)){validate252.errors = [{instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid0 = _errs7 === errors;}else {var valid0 = true;}if(valid0){if(data.latest_refund !== undefined){const _errs13 = errors;if(!(validate253(data.latest_refund, {instancePath:instancePath+"/latest_refund",parentData:data,parentDataProperty:"latest_refund",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate253.errors : vErrors.concat(validate253.errors);errors = vErrors.length;}var valid0 = _errs13 === errors;}else {var valid0 = true;}}}}}}}else {validate252.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate252.errors = vErrors;return errors === 0;}validate252.evaluated = {"props":{"state":true,"disabled_reason":true,"refundable_until":true,"fee_minor":true,"latest_refund":true},"dynamicProps":false,"dynamicItems":false};function validate249(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate249.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs1 = errors;const _errs2 = errors;let valid1 = true;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.status === undefined) && (missing0 = "status")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.status !== undefined){const _errs5 = errors;const _errs6 = errors;if("confirmed" !== data.status){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid3 = _errs6 === errors;if(valid3){const err2 = {};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {errors = _errs5;if(vErrors !== null){if(_errs5){vErrors.length = _errs5;}else {vErrors = null;}}}}}}var _valid0 = _errs3 === errors;errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}if(_valid0){const _errs7 = errors;const _errs8 = errors;const _errs9 = errors;const _errs10 = errors;let valid5 = false;const _errs11 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((data.invoice === undefined) && (missing1 = "invoice")){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}var _valid1 = _errs11 === errors;valid5 = valid5 || _valid1;if(_valid1){var props0 = {};props0.invoice = true;}const _errs12 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing2;if((data.receipt_url === undefined) && (missing2 = "receipt_url")){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}var _valid1 = _errs12 === errors;valid5 = valid5 || _valid1;if(_valid1){if(props0 !== true){props0 = props0 || {};props0.receipt_url = true;}}if(!valid5){const err5 = {};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}}var valid4 = _errs9 === errors;if(valid4){validate249.errors = [{instancePath,schemaPath:"#/allOf/0/then/not",keyword:"not",params:{},message:"must NOT be valid"}];return false;}else {errors = _errs8;if(vErrors !== null){if(_errs8){vErrors.length = _errs8;}else {vErrors = null;}}}var _valid0 = _errs7 === errors;valid1 = _valid0;}if(!valid1){const err6 = {instancePath,schemaPath:"#/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;validate249.errors = vErrors;return false;}var valid0 = _errs1 === errors;if(valid0){const _errs13 = errors;const _errs14 = errors;let valid6 = true;const _errs15 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing3;if((data.status === undefined) && (missing3 = "status")){const err7 = {};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}else {if(data.status !== undefined){if("failed" !== data.status){const err8 = {};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}}var _valid2 = _errs15 === errors;errors = _errs14;if(vErrors !== null){if(_errs14){vErrors.length = _errs14;}else {vErrors = null;}}if(_valid2){const _errs17 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing4;if((data.failure_reason === undefined) && (missing4 = "failure_reason")){validate249.errors = [{instancePath,schemaPath:"#/allOf/1/then/required",keyword:"required",params:{missingProperty: missing4},message:"must have required property '"+missing4+"'"}];return false;}else {if(data.failure_reason !== undefined){let data2 = data.failure_reason;const _errs19 = errors;if(errors === _errs19){if(typeof data2 === "string"){if(func1(data2) > 100){validate249.errors = [{instancePath:instancePath+"/failure_reason",schemaPath:"#/components/schemas/failure_reason/maxLength",keyword:"maxLength",params:{limit: 100},message:"must NOT have more than 100 characters"}];return false;}else {if(func1(data2) < 1){validate249.errors = [{instancePath:instancePath+"/failure_reason",schemaPath:"#/components/schemas/failure_reason/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}}else {validate249.errors = [{instancePath:instancePath+"/failure_reason",schemaPath:"#/components/schemas/failure_reason/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}}}var _valid2 = _errs17 === errors;valid6 = _valid2;if(valid6){var props1 = {};props1.failure_reason = true;props1.status = true;}}if(!valid6){const err9 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;validate249.errors = vErrors;return false;}var valid0 = _errs13 === errors;if(valid0){if(props1 !== true){props1 = props1 || {};props1.status = true;}const _errs21 = errors;const _errs22 = errors;let valid10 = true;const _errs23 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing5;if((data.status === undefined) && (missing5 = "status")){const err10 = {};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}else {if(data.status !== undefined){const _errs25 = errors;const _errs26 = errors;if("failed" !== data.status){const err11 = {};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid12 = _errs26 === errors;if(valid12){const err12 = {};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}else {errors = _errs25;if(vErrors !== null){if(_errs25){vErrors.length = _errs25;}else {vErrors = null;}}}}}}var _valid3 = _errs23 === errors;errors = _errs22;if(vErrors !== null){if(_errs22){vErrors.length = _errs22;}else {vErrors = null;}}if(_valid3){const _errs27 = errors;const _errs28 = errors;const _errs29 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing6;if((data.failure_reason === undefined) && (missing6 = "failure_reason")){const err13 = {};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var valid13 = _errs29 === errors;if(valid13){validate249.errors = [{instancePath,schemaPath:"#/allOf/2/then/not",keyword:"not",params:{},message:"must NOT be valid"}];return false;}else {errors = _errs28;if(vErrors !== null){if(_errs28){vErrors.length = _errs28;}else {vErrors = null;}}}var _valid3 = _errs27 === errors;valid10 = _valid3;}if(!valid10){const err14 = {instancePath,schemaPath:"#/allOf/2/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate249.errors = vErrors;return false;}var valid0 = _errs21 === errors;if(valid0){if(props1 !== true){props1 = props1 || {};props1.status = true;}}}}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing7;if(((((((data.id === undefined) && (missing7 = "id")) || ((data.status === undefined) && (missing7 = "status"))) || ((data.amount_minor === undefined) && (missing7 = "amount_minor"))) || ((data.currency === undefined) && (missing7 = "currency"))) || ((data.created_at === undefined) && (missing7 = "created_at"))) || ((data.updated_at === undefined) && (missing7 = "updated_at"))){validate249.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing7},message:"must have required property '"+missing7+"'"}];return false;}else {if(props1 !== true){props1 = props1 || {};props1.id = true;props1.status = true;props1.amount_minor = true;props1.fee_minor = true;props1.total_minor = true;props1.currency = true;props1.method = true;props1.created_at = true;props1.updated_at = true;props1.failure_reason = true;props1.adjustments = true;props1.invoice = true;props1.receipt_url = true;props1.refund = true;}if(data.id !== undefined){const _errs30 = errors;if(typeof data.id !== "string"){validate249.errors = [{instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid14 = _errs30 === errors;}else {var valid14 = true;}if(valid14){if(data.status !== undefined){const _errs32 = errors;if(typeof data.status !== "string"){validate249.errors = [{instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid14 = _errs32 === errors;}else {var valid14 = true;}if(valid14){if(data.amount_minor !== undefined){let data6 = data.amount_minor;const _errs34 = errors;const _errs35 = errors;const _errs36 = errors;let valid16 = false;const _errs37 = errors;if(!(((typeof data6 == "number") && (!(data6 % 1) && !isNaN(data6))) && (isFinite(data6)))){const err15 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid4 = _errs37 === errors;valid16 = valid16 || _valid4;const _errs39 = errors;if(typeof data6 !== "bigint"){const err16 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid4 = _errs39 === errors;valid16 = valid16 || _valid4;if(!valid16){const err17 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;validate249.errors = vErrors;return false;}else {errors = _errs36;if(vErrors !== null){if(_errs36){vErrors.length = _errs36;}else {vErrors = null;}}}var valid15 = _errs35 === errors;if(valid15){if(typeof data6 === "bigint"){if(data6 < 1){validate249.errors = [{instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs34){if((typeof data6 == "number") && (isFinite(data6))){if(data6 < 1 || isNaN(data6)){validate249.errors = [{instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}var valid14 = _errs34 === errors;}else {var valid14 = true;}if(valid14){if(data.fee_minor !== undefined){let data7 = data.fee_minor;const _errs40 = errors;const _errs41 = errors;const _errs42 = errors;let valid18 = false;const _errs43 = errors;if(!(((typeof data7 == "number") && (!(data7 % 1) && !isNaN(data7))) && (isFinite(data7)))){const err18 = {instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid5 = _errs43 === errors;valid18 = valid18 || _valid5;const _errs45 = errors;if(typeof data7 !== "bigint"){const err19 = {instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid5 = _errs45 === errors;valid18 = valid18 || _valid5;if(!valid18){const err20 = {instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;validate249.errors = vErrors;return false;}else {errors = _errs42;if(vErrors !== null){if(_errs42){vErrors.length = _errs42;}else {vErrors = null;}}}var valid17 = _errs41 === errors;if(valid17){if(typeof data7 === "bigint"){if(data7 < 0){validate249.errors = [{instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs40){if((typeof data7 == "number") && (isFinite(data7))){if(data7 < 0 || isNaN(data7)){validate249.errors = [{instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid14 = _errs40 === errors;}else {var valid14 = true;}if(valid14){if(data.total_minor !== undefined){let data8 = data.total_minor;const _errs46 = errors;const _errs47 = errors;const _errs48 = errors;let valid20 = false;const _errs49 = errors;if(!(((typeof data8 == "number") && (!(data8 % 1) && !isNaN(data8))) && (isFinite(data8)))){const err21 = {instancePath:instancePath+"/total_minor",schemaPath:"#/properties/total_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}var _valid6 = _errs49 === errors;valid20 = valid20 || _valid6;const _errs51 = errors;if(typeof data8 !== "bigint"){const err22 = {instancePath:instancePath+"/total_minor",schemaPath:"#/properties/total_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}var _valid6 = _errs51 === errors;valid20 = valid20 || _valid6;if(!valid20){const err23 = {instancePath:instancePath+"/total_minor",schemaPath:"#/properties/total_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;validate249.errors = vErrors;return false;}else {errors = _errs48;if(vErrors !== null){if(_errs48){vErrors.length = _errs48;}else {vErrors = null;}}}var valid19 = _errs47 === errors;if(valid19){if(typeof data8 === "bigint"){if(data8 < 1){validate249.errors = [{instancePath:instancePath+"/total_minor",schemaPath:"#/properties/total_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs46){if((typeof data8 == "number") && (isFinite(data8))){if(data8 < 1 || isNaN(data8)){validate249.errors = [{instancePath:instancePath+"/total_minor",schemaPath:"#/properties/total_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}var valid14 = _errs46 === errors;}else {var valid14 = true;}if(valid14){if(data.currency !== undefined){let data9 = data.currency;const _errs52 = errors;if(typeof data9 !== "string"){validate249.errors = [{instancePath:instancePath+"/currency",schemaPath:"#/properties/currency/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if("usd" !== data9){validate249.errors = [{instancePath:instancePath+"/currency",schemaPath:"#/properties/currency/const",keyword:"const",params:{allowedValue: "usd"},message:"must be equal to constant"}];return false;}var valid14 = _errs52 === errors;}else {var valid14 = true;}if(valid14){if(data.method !== undefined){let data10 = data.method;const _errs54 = errors;if(typeof data10 !== "string"){validate249.errors = [{instancePath:instancePath+"/method",schemaPath:"#/properties/method/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if(!(((data10 === "checkout") || (data10 === "saved_card")) || (data10 === "auto_top_up"))){validate249.errors = [{instancePath:instancePath+"/method",schemaPath:"#/properties/method/enum",keyword:"enum",params:{allowedValues: schema253.properties.method.enum},message:"must be equal to one of the allowed values"}];return false;}var valid14 = _errs54 === errors;}else {var valid14 = true;}if(valid14){if(data.created_at !== undefined){let data11 = data.created_at;const _errs56 = errors;if(errors === _errs56){if(errors === _errs56){if(typeof data11 === "string"){if(!(formats0.validate(data11))){validate249.errors = [{instancePath:instancePath+"/created_at",schemaPath:"#/properties/created_at/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate249.errors = [{instancePath:instancePath+"/created_at",schemaPath:"#/properties/created_at/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid14 = _errs56 === errors;}else {var valid14 = true;}if(valid14){if(data.updated_at !== undefined){let data12 = data.updated_at;const _errs58 = errors;if(errors === _errs58){if(errors === _errs58){if(typeof data12 === "string"){if(!(formats0.validate(data12))){validate249.errors = [{instancePath:instancePath+"/updated_at",schemaPath:"#/properties/updated_at/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate249.errors = [{instancePath:instancePath+"/updated_at",schemaPath:"#/properties/updated_at/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid14 = _errs58 === errors;}else {var valid14 = true;}if(valid14){if(data.failure_reason !== undefined){let data13 = data.failure_reason;const _errs60 = errors;if(errors === _errs60){if(typeof data13 === "string"){if(func1(data13) > 100){validate249.errors = [{instancePath:instancePath+"/failure_reason",schemaPath:"#/properties/failure_reason/maxLength",keyword:"maxLength",params:{limit: 100},message:"must NOT have more than 100 characters"}];return false;}else {if(func1(data13) < 1){validate249.errors = [{instancePath:instancePath+"/failure_reason",schemaPath:"#/properties/failure_reason/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}}else {validate249.errors = [{instancePath:instancePath+"/failure_reason",schemaPath:"#/properties/failure_reason/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid14 = _errs60 === errors;}else {var valid14 = true;}if(valid14){if(data.adjustments !== undefined){let data14 = data.adjustments;const _errs62 = errors;if(errors === _errs62){if(Array.isArray(data14)){var valid21 = true;const len0 = data14.length;for(let i0=0; i0<len0; i0++){const _errs64 = errors;if(!(validate250(data14[i0], {instancePath:instancePath+"/adjustments/" + i0,parentData:data14,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate250.errors : vErrors.concat(validate250.errors);errors = vErrors.length;}var valid21 = _errs64 === errors;if(!valid21){break;}}}else {validate249.errors = [{instancePath:instancePath+"/adjustments",schemaPath:"#/properties/adjustments/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid14 = _errs62 === errors;}else {var valid14 = true;}if(valid14){if(data.invoice !== undefined){let data16 = data.invoice;const _errs65 = errors;const _errs66 = errors;if(errors === _errs66){if(data16 && typeof data16 == "object" && !Array.isArray(data16)){let missing8;if((((data16.number === undefined) && (missing8 = "number")) || ((data16.pdf_url === undefined) && (missing8 = "pdf_url"))) || ((data16.hosted_url === undefined) && (missing8 = "hosted_url"))){validate249.errors = [{instancePath:instancePath+"/invoice",schemaPath:"#/components/schemas/CreditInvoice/required",keyword:"required",params:{missingProperty: missing8},message:"must have required property '"+missing8+"'"}];return false;}else {if(data16.number !== undefined){let data17 = data16.number;const _errs68 = errors;if(errors === _errs68){if(typeof data17 === "string"){if(func1(data17) < 1){validate249.errors = [{instancePath:instancePath+"/invoice/number",schemaPath:"#/components/schemas/CreditInvoice/properties/number/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}else {validate249.errors = [{instancePath:instancePath+"/invoice/number",schemaPath:"#/components/schemas/CreditInvoice/properties/number/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid23 = _errs68 === errors;}else {var valid23 = true;}if(valid23){if(data16.pdf_url !== undefined){const _errs70 = errors;if(errors === _errs70){if(errors === _errs70){if(!(typeof data16.pdf_url === "string")){validate249.errors = [{instancePath:instancePath+"/invoice/pdf_url",schemaPath:"#/components/schemas/CreditInvoice/properties/pdf_url/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid23 = _errs70 === errors;}else {var valid23 = true;}if(valid23){if(data16.hosted_url !== undefined){const _errs72 = errors;if(errors === _errs72){if(errors === _errs72){if(!(typeof data16.hosted_url === "string")){validate249.errors = [{instancePath:instancePath+"/invoice/hosted_url",schemaPath:"#/components/schemas/CreditInvoice/properties/hosted_url/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid23 = _errs72 === errors;}else {var valid23 = true;}}}}}else {validate249.errors = [{instancePath:instancePath+"/invoice",schemaPath:"#/components/schemas/CreditInvoice/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid14 = _errs65 === errors;}else {var valid14 = true;}if(valid14){if(data.receipt_url !== undefined){const _errs74 = errors;if(errors === _errs74){if(errors === _errs74){if(!(typeof data.receipt_url === "string")){validate249.errors = [{instancePath:instancePath+"/receipt_url",schemaPath:"#/properties/receipt_url/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid14 = _errs74 === errors;}else {var valid14 = true;}if(valid14){if(data.refund !== undefined){const _errs76 = errors;if(!(validate252(data.refund, {instancePath:instancePath+"/refund",parentData:data,parentDataProperty:"refund",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate252.errors : vErrors.concat(validate252.errors);errors = vErrors.length;}var valid14 = _errs76 === errors;}else {var valid14 = true;}}}}}}}}}}}}}}}}else {validate249.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate249.errors = vErrors;evaluated0.props = props1;return errors === 0;}validate249.evaluated = {"dynamicProps":true,"dynamicItems":false};function validate248(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate248.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs0 = errors;if(!(validate249(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate249.errors : vErrors.concat(validate249.errors);errors = vErrors.length;}else {var props0 = validate249.evaluated.props;}var valid0 = _errs0 === errors;if(valid0){const _errs1 = errors;const _errs3 = errors;const _errs4 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.authentication_url === undefined) && (missing0 = "authentication_url")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}var valid1 = _errs4 === errors;if(valid1){validate248.errors = [{instancePath,schemaPath:"#/allOf/1/not",keyword:"not",params:{},message:"must NOT be valid"}];return false;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((data.checkout_url === undefined) && (missing1 = "checkout_url")){validate248.errors = [{instancePath,schemaPath:"#/allOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data.status !== undefined){let data0 = data.status;const _errs5 = errors;if(typeof data0 !== "string"){validate248.errors = [{instancePath:instancePath+"/status",schemaPath:"#/allOf/1/properties/status/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if("pending" !== data0){validate248.errors = [{instancePath:instancePath+"/status",schemaPath:"#/allOf/1/properties/status/const",keyword:"const",params:{allowedValue: "pending"},message:"must be equal to constant"}];return false;}var valid2 = _errs5 === errors;}else {var valid2 = true;}if(valid2){if(data.method !== undefined){let data1 = data.method;const _errs7 = errors;if(typeof data1 !== "string"){validate248.errors = [{instancePath:instancePath+"/method",schemaPath:"#/allOf/1/properties/method/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if("checkout" !== data1){validate248.errors = [{instancePath:instancePath+"/method",schemaPath:"#/allOf/1/properties/method/const",keyword:"const",params:{allowedValue: "checkout"},message:"must be equal to constant"}];return false;}var valid2 = _errs7 === errors;}else {var valid2 = true;}if(valid2){if(data.checkout_url !== undefined){const _errs9 = errors;if(errors === _errs9){if(errors === _errs9){if(!(typeof data.checkout_url === "string")){validate248.errors = [{instancePath:instancePath+"/checkout_url",schemaPath:"#/allOf/1/properties/checkout_url/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid2 = _errs9 === errors;}else {var valid2 = true;}}}}}else {validate248.errors = [{instancePath,schemaPath:"#/allOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs1 === errors;if(valid0){if(props0 !== true){props0 = props0 || {};props0.status = true;props0.method = true;props0.checkout_url = true;}}}validate248.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate248.evaluated = {"dynamicProps":true,"dynamicItems":false};const schema260 = {"allOf":[{"$ref":"#/components/schemas/CreditPurchase"},{"type":"object","required":["authentication_url"],"properties":{"status":{"type":"string","const":"pending"},"method":{"type":"string","const":"saved_card"},"authentication_url":{"type":"string","format":"uri","description":"Stripe-hosted invoice page for required authentication; poll the purchase after returning to the dashboard."},"payment_intent_client_secret":{"type":"string","minLength":1,"description":"Stripe PaymentIntent client secret for in-page confirmation when 3DS is required."}},"not":{"required":["checkout_url"],"properties":{"checkout_url":true}}}]};function validate260(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate260.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs0 = errors;if(!(validate249(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate249.errors : vErrors.concat(validate249.errors);errors = vErrors.length;}else {var props0 = validate249.evaluated.props;}var valid0 = _errs0 === errors;if(valid0){const _errs1 = errors;const _errs3 = errors;const _errs4 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.checkout_url === undefined) && (missing0 = "checkout_url")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}var valid1 = _errs4 === errors;if(valid1){validate260.errors = [{instancePath,schemaPath:"#/allOf/1/not",keyword:"not",params:{},message:"must NOT be valid"}];return false;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((data.authentication_url === undefined) && (missing1 = "authentication_url")){validate260.errors = [{instancePath,schemaPath:"#/allOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data.status !== undefined){let data0 = data.status;const _errs5 = errors;if(typeof data0 !== "string"){validate260.errors = [{instancePath:instancePath+"/status",schemaPath:"#/allOf/1/properties/status/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if("pending" !== data0){validate260.errors = [{instancePath:instancePath+"/status",schemaPath:"#/allOf/1/properties/status/const",keyword:"const",params:{allowedValue: "pending"},message:"must be equal to constant"}];return false;}var valid2 = _errs5 === errors;}else {var valid2 = true;}if(valid2){if(data.method !== undefined){let data1 = data.method;const _errs7 = errors;if(typeof data1 !== "string"){validate260.errors = [{instancePath:instancePath+"/method",schemaPath:"#/allOf/1/properties/method/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if("saved_card" !== data1){validate260.errors = [{instancePath:instancePath+"/method",schemaPath:"#/allOf/1/properties/method/const",keyword:"const",params:{allowedValue: "saved_card"},message:"must be equal to constant"}];return false;}var valid2 = _errs7 === errors;}else {var valid2 = true;}if(valid2){if(data.authentication_url !== undefined){const _errs9 = errors;if(errors === _errs9){if(errors === _errs9){if(!(typeof data.authentication_url === "string")){validate260.errors = [{instancePath:instancePath+"/authentication_url",schemaPath:"#/allOf/1/properties/authentication_url/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid2 = _errs9 === errors;}else {var valid2 = true;}if(valid2){if(data.payment_intent_client_secret !== undefined){let data3 = data.payment_intent_client_secret;const _errs11 = errors;if(errors === _errs11){if(typeof data3 === "string"){if(func1(data3) < 1){validate260.errors = [{instancePath:instancePath+"/payment_intent_client_secret",schemaPath:"#/allOf/1/properties/payment_intent_client_secret/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}else {validate260.errors = [{instancePath:instancePath+"/payment_intent_client_secret",schemaPath:"#/allOf/1/properties/payment_intent_client_secret/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid2 = _errs11 === errors;}else {var valid2 = true;}}}}}}else {validate260.errors = [{instancePath,schemaPath:"#/allOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs1 === errors;if(valid0){if(props0 !== true){props0 = props0 || {};props0.status = true;props0.method = true;props0.authentication_url = true;props0.payment_intent_client_secret = true;}}}validate260.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate260.evaluated = {"dynamicProps":true,"dynamicItems":false};const schema261 = {"allOf":[{"$ref":"#/components/schemas/CreditPurchase"},{"type":"object","properties":{"status":{"type":"string","const":"confirmed"},"method":{"type":"string","const":"saved_card"}},"not":{"anyOf":[{"required":["checkout_url"],"properties":{"checkout_url":true}},{"required":["authentication_url"],"properties":{"authentication_url":true}}]}}]};function validate263(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate263.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs0 = errors;if(!(validate249(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate249.errors : vErrors.concat(validate249.errors);errors = vErrors.length;}else {var props0 = validate249.evaluated.props;}var valid0 = _errs0 === errors;if(valid0){const _errs1 = errors;const _errs3 = errors;const _errs4 = errors;const _errs5 = errors;let valid2 = false;const _errs6 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.checkout_url === undefined) && (missing0 = "checkout_url")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}var _valid0 = _errs6 === errors;valid2 = valid2 || _valid0;if(_valid0){var props1 = {};props1.checkout_url = true;}const _errs7 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((data.authentication_url === undefined) && (missing1 = "authentication_url")){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}var _valid0 = _errs7 === errors;valid2 = valid2 || _valid0;if(_valid0){if(props1 !== true){props1 = props1 || {};props1.authentication_url = true;}}if(!valid2){const err2 = {};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {errors = _errs5;if(vErrors !== null){if(_errs5){vErrors.length = _errs5;}else {vErrors = null;}}}var valid1 = _errs4 === errors;if(valid1){validate263.errors = [{instancePath,schemaPath:"#/allOf/1/not",keyword:"not",params:{},message:"must NOT be valid"}];return false;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){if(data.status !== undefined){let data0 = data.status;const _errs8 = errors;if(typeof data0 !== "string"){validate263.errors = [{instancePath:instancePath+"/status",schemaPath:"#/allOf/1/properties/status/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if("confirmed" !== data0){validate263.errors = [{instancePath:instancePath+"/status",schemaPath:"#/allOf/1/properties/status/const",keyword:"const",params:{allowedValue: "confirmed"},message:"must be equal to constant"}];return false;}var valid3 = _errs8 === errors;}else {var valid3 = true;}if(valid3){if(data.method !== undefined){let data1 = data.method;const _errs10 = errors;if(typeof data1 !== "string"){validate263.errors = [{instancePath:instancePath+"/method",schemaPath:"#/allOf/1/properties/method/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if("saved_card" !== data1){validate263.errors = [{instancePath:instancePath+"/method",schemaPath:"#/allOf/1/properties/method/const",keyword:"const",params:{allowedValue: "saved_card"},message:"must be equal to constant"}];return false;}var valid3 = _errs10 === errors;}else {var valid3 = true;}}}else {validate263.errors = [{instancePath,schemaPath:"#/allOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs1 === errors;if(valid0){if(props0 !== true){props0 = props0 || {};props0.status = true;props0.method = true;}}}validate263.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate263.evaluated = {"dynamicProps":true,"dynamicItems":false};function validate247(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate247.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(!(validate248(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate248.errors : vErrors.concat(validate248.errors);errors = vErrors.length;}else {var props0 = validate248.evaluated.props;}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;const _errs2 = errors;if(!(validate260(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate260.errors : vErrors.concat(validate260.errors);errors = vErrors.length;}else {var props1 = validate260.evaluated.props;}var _valid0 = _errs2 === errors;valid0 = valid0 || _valid0;if(_valid0){if(props0 !== true && props1 !== undefined){if(props1 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props1);}}}const _errs3 = errors;if(!(validate263(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate263.errors : vErrors.concat(validate263.errors);errors = vErrors.length;}else {var props2 = validate263.evaluated.props;}var _valid0 = _errs3 === errors;valid0 = valid0 || _valid0;if(_valid0){if(props0 !== true && props2 !== undefined){if(props2 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props2);}}}if(!valid0){const err0 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;validate247.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate247.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate247.evaluated = {"dynamicProps":true,"dynamicItems":false};exports.validate2 = validate266;const schema262 = {"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","description":"Workspace purchases ordered by creation time and ID descending.","items":{"$ref":"#/components/schemas/CreditPurchase"}},"next_cursor":{"type":["string","null"],"description":"Opaque cursor for the next page; null at the end. Scoped to this workspace."}}};function validate266(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate266.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.data === undefined) && (missing0 = "data")) || ((data.next_cursor === undefined) && (missing0 = "next_cursor"))){validate266.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.data !== undefined){let data0 = data.data;const _errs1 = errors;if(errors === _errs1){if(Array.isArray(data0)){var valid1 = true;const len0 = data0.length;for(let i0=0; i0<len0; i0++){const _errs3 = errors;if(!(validate249(data0[i0], {instancePath:instancePath+"/data/" + i0,parentData:data0,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate249.errors : vErrors.concat(validate249.errors);errors = vErrors.length;}var valid1 = _errs3 === errors;if(!valid1){break;}}}else {validate266.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.next_cursor !== undefined){let data2 = data.next_cursor;const _errs4 = errors;if((typeof data2 !== "string") && (data2 !== null)){validate266.errors = [{instancePath:instancePath+"/next_cursor",schemaPath:"#/properties/next_cursor/type",keyword:"type",params:{type: schema262.properties.next_cursor.type},message:"must be string,null"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}}}}else {validate266.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate266.errors = vErrors;return errors === 0;}validate266.evaluated = {"props":{"data":true,"next_cursor":true},"dynamicProps":false,"dynamicItems":false};exports.validate3 = validate268;const schema263 = {"type":"object","required":["amount","tax","total","address_required"],"properties":{"amount":{"minimum":1,"description":"Tax-exclusive credit amount in US cents; this is what is added to the balance.","allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"fee_minor":{"minimum":0,"description":"BoxRouter's purchase fee in US cents, computed by the server and charged on top of amount. Tax applies to amount plus fee. Absent on older services.","allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"tax":{"minimum":0,"description":"Estimated tax in US cents, on the credits and the fee.","allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"total":{"minimum":1,"description":"Estimated total to charge in US cents: amount plus fee_minor plus tax.","allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"address_required":{"type":"boolean"},"missing":{"type":"array","items":{"type":"string"},"description":"Required billing address fields missing for an exact tax quote."}}};function validate268(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate268.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.amount === undefined) && (missing0 = "amount")) || ((data.tax === undefined) && (missing0 = "tax"))) || ((data.total === undefined) && (missing0 = "total"))) || ((data.address_required === undefined) && (missing0 = "address_required"))){validate268.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.amount !== undefined){let data0 = data.amount;const _errs1 = errors;const _errs2 = errors;const _errs3 = errors;let valid2 = false;const _errs4 = errors;if(!(((typeof data0 == "number") && (!(data0 % 1) && !isNaN(data0))) && (isFinite(data0)))){const err0 = {instancePath:instancePath+"/amount",schemaPath:"#/properties/amount/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs4 === errors;valid2 = valid2 || _valid0;const _errs6 = errors;if(typeof data0 !== "bigint"){const err1 = {instancePath:instancePath+"/amount",schemaPath:"#/properties/amount/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs6 === errors;valid2 = valid2 || _valid0;if(!valid2){const err2 = {instancePath:instancePath+"/amount",schemaPath:"#/properties/amount/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;validate268.errors = vErrors;return false;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}var valid1 = _errs2 === errors;if(valid1){if(typeof data0 === "bigint"){if(data0 < 1){validate268.errors = [{instancePath:instancePath+"/amount",schemaPath:"#/properties/amount/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs1){if((typeof data0 == "number") && (isFinite(data0))){if(data0 < 1 || isNaN(data0)){validate268.errors = [{instancePath:instancePath+"/amount",schemaPath:"#/properties/amount/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.fee_minor !== undefined){let data1 = data.fee_minor;const _errs7 = errors;const _errs8 = errors;const _errs9 = errors;let valid4 = false;const _errs10 = errors;if(!(((typeof data1 == "number") && (!(data1 % 1) && !isNaN(data1))) && (isFinite(data1)))){const err3 = {instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid1 = _errs10 === errors;valid4 = valid4 || _valid1;const _errs12 = errors;if(typeof data1 !== "bigint"){const err4 = {instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid1 = _errs12 === errors;valid4 = valid4 || _valid1;if(!valid4){const err5 = {instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;validate268.errors = vErrors;return false;}else {errors = _errs9;if(vErrors !== null){if(_errs9){vErrors.length = _errs9;}else {vErrors = null;}}}var valid3 = _errs8 === errors;if(valid3){if(typeof data1 === "bigint"){if(data1 < 0){validate268.errors = [{instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs7){if((typeof data1 == "number") && (isFinite(data1))){if(data1 < 0 || isNaN(data1)){validate268.errors = [{instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid0 = _errs7 === errors;}else {var valid0 = true;}if(valid0){if(data.tax !== undefined){let data2 = data.tax;const _errs13 = errors;const _errs14 = errors;const _errs15 = errors;let valid6 = false;const _errs16 = errors;if(!(((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))){const err6 = {instancePath:instancePath+"/tax",schemaPath:"#/properties/tax/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid2 = _errs16 === errors;valid6 = valid6 || _valid2;const _errs18 = errors;if(typeof data2 !== "bigint"){const err7 = {instancePath:instancePath+"/tax",schemaPath:"#/properties/tax/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid2 = _errs18 === errors;valid6 = valid6 || _valid2;if(!valid6){const err8 = {instancePath:instancePath+"/tax",schemaPath:"#/properties/tax/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;validate268.errors = vErrors;return false;}else {errors = _errs15;if(vErrors !== null){if(_errs15){vErrors.length = _errs15;}else {vErrors = null;}}}var valid5 = _errs14 === errors;if(valid5){if(typeof data2 === "bigint"){if(data2 < 0){validate268.errors = [{instancePath:instancePath+"/tax",schemaPath:"#/properties/tax/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs13){if((typeof data2 == "number") && (isFinite(data2))){if(data2 < 0 || isNaN(data2)){validate268.errors = [{instancePath:instancePath+"/tax",schemaPath:"#/properties/tax/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid0 = _errs13 === errors;}else {var valid0 = true;}if(valid0){if(data.total !== undefined){let data3 = data.total;const _errs19 = errors;const _errs20 = errors;const _errs21 = errors;let valid8 = false;const _errs22 = errors;if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){const err9 = {instancePath:instancePath+"/total",schemaPath:"#/properties/total/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var _valid3 = _errs22 === errors;valid8 = valid8 || _valid3;const _errs24 = errors;if(typeof data3 !== "bigint"){const err10 = {instancePath:instancePath+"/total",schemaPath:"#/properties/total/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var _valid3 = _errs24 === errors;valid8 = valid8 || _valid3;if(!valid8){const err11 = {instancePath:instancePath+"/total",schemaPath:"#/properties/total/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;validate268.errors = vErrors;return false;}else {errors = _errs21;if(vErrors !== null){if(_errs21){vErrors.length = _errs21;}else {vErrors = null;}}}var valid7 = _errs20 === errors;if(valid7){if(typeof data3 === "bigint"){if(data3 < 1){validate268.errors = [{instancePath:instancePath+"/total",schemaPath:"#/properties/total/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs19){if((typeof data3 == "number") && (isFinite(data3))){if(data3 < 1 || isNaN(data3)){validate268.errors = [{instancePath:instancePath+"/total",schemaPath:"#/properties/total/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}var valid0 = _errs19 === errors;}else {var valid0 = true;}if(valid0){if(data.address_required !== undefined){const _errs25 = errors;if(typeof data.address_required !== "boolean"){validate268.errors = [{instancePath:instancePath+"/address_required",schemaPath:"#/properties/address_required/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid0 = _errs25 === errors;}else {var valid0 = true;}if(valid0){if(data.missing !== undefined){let data5 = data.missing;const _errs27 = errors;if(errors === _errs27){if(Array.isArray(data5)){var valid9 = true;const len0 = data5.length;for(let i0=0; i0<len0; i0++){const _errs29 = errors;if(typeof data5[i0] !== "string"){validate268.errors = [{instancePath:instancePath+"/missing/" + i0,schemaPath:"#/properties/missing/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid9 = _errs29 === errors;if(!valid9){break;}}}else {validate268.errors = [{instancePath:instancePath+"/missing",schemaPath:"#/properties/missing/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs27 === errors;}else {var valid0 = true;}}}}}}}}else {validate268.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate268.errors = vErrors;return errors === 0;}validate268.evaluated = {"props":{"amount":true,"fee_minor":true,"tax":true,"total":true,"address_required":true,"missing":true},"dynamicProps":false,"dynamicItems":false};exports.validate4 = validate269;const schema264 = {"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","description":"Managed-compute credit movements, newest first. Settled nonzero charges, later corrections to them, reservations still held, and reservations released with no charge. BYOK work and internal cost evidence are excluded.","items":{"$ref":"#/components/schemas/ManagedCreditUsage"}},"next_cursor":{"type":["string","null"],"minLength":1,"maxLength":512,"description":"Opaque workspace-scoped continuation cursor; null when no older charges remain."}}};const schema265 = {"type":"object","required":["id","amount_nanodollars","created_at"],"properties":{"id":{"type":"string","pattern":"^[0-9a-f]{24}$","description":"Stable opaque activity ID; it does not reveal the internal reservation ID."},"kind":{"type":"string","x-boxrouter-open-enum":true,"description":"`sandbox_charge`: a sandbox's charge as first settled. `sandbox_correction`: a later\nchange to that charge. `sandbox_hold`: a reservation still held against the balance.\n`sandbox_release`: a reservation released with no charge. Absent from responses of a\nCloud that does not report it yet, where every row is a `sandbox_charge`. Clients must\nhandle unknown values explicitly.\n"},"sandbox_id":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"The sandbox this row belongs to. Null when the sandbox cannot be identified. Absent where `kind` is absent."},"sandbox_name":{"type":["string","null"],"description":"The sandbox's name label, when it has one. Null otherwise. Absent where `kind` is absent."},"key_id":{"type":["string","null"],"description":"The workspace API key whose request the row belongs to. Null when the work was not made through an API key, such as a dashboard action, or the key can no longer be identified. Absent where `kind` is absent and on a Cloud that does not report it yet."},"amount_nanodollars":{"type":"string","maxLength":20,"pattern":"^(-?[1-9][0-9]{0,18})$","description":"The credit the row moved, in billionths of a US dollar, never including the provider's\ncost. For a `sandbox_charge` it is the positive debit. For a `sandbox_correction` it is\nthe change to the charge: positive when the charge went up and the balance was debited,\nnegative when it went down and the balance was credited. For a `sandbox_hold` it is the\ncredit currently reserved, positive. For a `sandbox_release` it is the reserved credit\nreturned, positive.\n"},"created_at":{"type":"string","format":"date-time","description":"Time the debit settled, the correction was recorded, the reservation last changed, or the reservation was released."}}};const pattern187 = new RegExp("^[0-9a-f]{24}$", "u");const pattern188 = new RegExp("^(-?[1-9][0-9]{0,18})$", "u");function validate270(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate270.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.id === undefined) && (missing0 = "id")) || ((data.amount_nanodollars === undefined) && (missing0 = "amount_nanodollars"))) || ((data.created_at === undefined) && (missing0 = "created_at"))){validate270.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.id !== undefined){let data0 = data.id;const _errs1 = errors;if(errors === _errs1){if(typeof data0 === "string"){if(!pattern187.test(data0)){validate270.errors = [{instancePath:instancePath+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern: "^[0-9a-f]{24}$"},message:"must match pattern \""+"^[0-9a-f]{24}$"+"\""}];return false;}}else {validate270.errors = [{instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.kind !== undefined){const _errs3 = errors;if(typeof data.kind !== "string"){validate270.errors = [{instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.sandbox_id !== undefined){let data2 = data.sandbox_id;const _errs5 = errors;if((typeof data2 !== "string") && (data2 !== null)){validate270.errors = [{instancePath:instancePath+"/sandbox_id",schemaPath:"#/properties/sandbox_id/type",keyword:"type",params:{type: schema265.properties.sandbox_id.type},message:"must be string,null"}];return false;}if(errors === _errs5){if(typeof data2 === "string"){if(func1(data2) > 128){validate270.errors = [{instancePath:instancePath+"/sandbox_id",schemaPath:"#/properties/sandbox_id/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"}];return false;}else {if(func1(data2) < 1){validate270.errors = [{instancePath:instancePath+"/sandbox_id",schemaPath:"#/properties/sandbox_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}}}var valid0 = _errs5 === errors;}else {var valid0 = true;}if(valid0){if(data.sandbox_name !== undefined){let data3 = data.sandbox_name;const _errs7 = errors;if((typeof data3 !== "string") && (data3 !== null)){validate270.errors = [{instancePath:instancePath+"/sandbox_name",schemaPath:"#/properties/sandbox_name/type",keyword:"type",params:{type: schema265.properties.sandbox_name.type},message:"must be string,null"}];return false;}var valid0 = _errs7 === errors;}else {var valid0 = true;}if(valid0){if(data.key_id !== undefined){let data4 = data.key_id;const _errs9 = errors;if((typeof data4 !== "string") && (data4 !== null)){validate270.errors = [{instancePath:instancePath+"/key_id",schemaPath:"#/properties/key_id/type",keyword:"type",params:{type: schema265.properties.key_id.type},message:"must be string,null"}];return false;}var valid0 = _errs9 === errors;}else {var valid0 = true;}if(valid0){if(data.amount_nanodollars !== undefined){let data5 = data.amount_nanodollars;const _errs11 = errors;if(errors === _errs11){if(typeof data5 === "string"){if(func1(data5) > 20){validate270.errors = [{instancePath:instancePath+"/amount_nanodollars",schemaPath:"#/properties/amount_nanodollars/maxLength",keyword:"maxLength",params:{limit: 20},message:"must NOT have more than 20 characters"}];return false;}else {if(!pattern188.test(data5)){validate270.errors = [{instancePath:instancePath+"/amount_nanodollars",schemaPath:"#/properties/amount_nanodollars/pattern",keyword:"pattern",params:{pattern: "^(-?[1-9][0-9]{0,18})$"},message:"must match pattern \""+"^(-?[1-9][0-9]{0,18})$"+"\""}];return false;}}}else {validate270.errors = [{instancePath:instancePath+"/amount_nanodollars",schemaPath:"#/properties/amount_nanodollars/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid0 = _errs11 === errors;}else {var valid0 = true;}if(valid0){if(data.created_at !== undefined){let data6 = data.created_at;const _errs13 = errors;if(errors === _errs13){if(errors === _errs13){if(typeof data6 === "string"){if(!(formats0.validate(data6))){validate270.errors = [{instancePath:instancePath+"/created_at",schemaPath:"#/properties/created_at/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate270.errors = [{instancePath:instancePath+"/created_at",schemaPath:"#/properties/created_at/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid0 = _errs13 === errors;}else {var valid0 = true;}}}}}}}}}else {validate270.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate270.errors = vErrors;return errors === 0;}validate270.evaluated = {"props":{"id":true,"kind":true,"sandbox_id":true,"sandbox_name":true,"key_id":true,"amount_nanodollars":true,"created_at":true},"dynamicProps":false,"dynamicItems":false};function validate269(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate269.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.data === undefined) && (missing0 = "data")) || ((data.next_cursor === undefined) && (missing0 = "next_cursor"))){validate269.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.data !== undefined){let data0 = data.data;const _errs1 = errors;if(errors === _errs1){if(Array.isArray(data0)){var valid1 = true;const len0 = data0.length;for(let i0=0; i0<len0; i0++){const _errs3 = errors;if(!(validate270(data0[i0], {instancePath:instancePath+"/data/" + i0,parentData:data0,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate270.errors : vErrors.concat(validate270.errors);errors = vErrors.length;}var valid1 = _errs3 === errors;if(!valid1){break;}}}else {validate269.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.next_cursor !== undefined){let data2 = data.next_cursor;const _errs4 = errors;if((typeof data2 !== "string") && (data2 !== null)){validate269.errors = [{instancePath:instancePath+"/next_cursor",schemaPath:"#/properties/next_cursor/type",keyword:"type",params:{type: schema264.properties.next_cursor.type},message:"must be string,null"}];return false;}if(errors === _errs4){if(typeof data2 === "string"){if(func1(data2) > 512){validate269.errors = [{instancePath:instancePath+"/next_cursor",schemaPath:"#/properties/next_cursor/maxLength",keyword:"maxLength",params:{limit: 512},message:"must NOT have more than 512 characters"}];return false;}else {if(func1(data2) < 1){validate269.errors = [{instancePath:instancePath+"/next_cursor",schemaPath:"#/properties/next_cursor/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}}}var valid0 = _errs4 === errors;}else {var valid0 = true;}}}}else {validate269.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate269.errors = vErrors;return errors === 0;}validate269.evaluated = {"props":{"data":true,"next_cursor":true},"dynamicProps":false,"dynamicItems":false};exports.validate5 = validate272;function validate272(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate272.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs1 = errors;const _errs2 = errors;let valid1 = true;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.status === undefined) && (missing0 = "status")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.status !== undefined){const _errs5 = errors;const _errs6 = errors;if("confirmed" !== data.status){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid3 = _errs6 === errors;if(valid3){const err2 = {};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {errors = _errs5;if(vErrors !== null){if(_errs5){vErrors.length = _errs5;}else {vErrors = null;}}}}}}var _valid0 = _errs3 === errors;errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}if(_valid0){const _errs7 = errors;const _errs8 = errors;const _errs9 = errors;const _errs10 = errors;let valid5 = false;const _errs11 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((data.invoice === undefined) && (missing1 = "invoice")){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}var _valid1 = _errs11 === errors;valid5 = valid5 || _valid1;if(_valid1){var props0 = {};props0.invoice = true;}const _errs12 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing2;if((data.receipt_url === undefined) && (missing2 = "receipt_url")){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}var _valid1 = _errs12 === errors;valid5 = valid5 || _valid1;if(_valid1){if(props0 !== true){props0 = props0 || {};props0.receipt_url = true;}}if(!valid5){const err5 = {};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}}var valid4 = _errs9 === errors;if(valid4){validate272.errors = [{instancePath,schemaPath:"#/allOf/0/then/not",keyword:"not",params:{},message:"must NOT be valid"}];return false;}else {errors = _errs8;if(vErrors !== null){if(_errs8){vErrors.length = _errs8;}else {vErrors = null;}}}var _valid0 = _errs7 === errors;valid1 = _valid0;}if(!valid1){const err6 = {instancePath,schemaPath:"#/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;validate272.errors = vErrors;return false;}var valid0 = _errs1 === errors;if(valid0){const _errs13 = errors;const _errs14 = errors;let valid6 = true;const _errs15 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing3;if((data.status === undefined) && (missing3 = "status")){const err7 = {};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}else {if(data.status !== undefined){if("failed" !== data.status){const err8 = {};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}}var _valid2 = _errs15 === errors;errors = _errs14;if(vErrors !== null){if(_errs14){vErrors.length = _errs14;}else {vErrors = null;}}if(_valid2){const _errs17 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing4;if((data.failure_reason === undefined) && (missing4 = "failure_reason")){validate272.errors = [{instancePath,schemaPath:"#/allOf/1/then/required",keyword:"required",params:{missingProperty: missing4},message:"must have required property '"+missing4+"'"}];return false;}else {if(data.failure_reason !== undefined){let data2 = data.failure_reason;const _errs19 = errors;if(errors === _errs19){if(typeof data2 === "string"){if(func1(data2) > 100){validate272.errors = [{instancePath:instancePath+"/failure_reason",schemaPath:"#/components/schemas/failure_reason/maxLength",keyword:"maxLength",params:{limit: 100},message:"must NOT have more than 100 characters"}];return false;}else {if(func1(data2) < 1){validate272.errors = [{instancePath:instancePath+"/failure_reason",schemaPath:"#/components/schemas/failure_reason/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}}else {validate272.errors = [{instancePath:instancePath+"/failure_reason",schemaPath:"#/components/schemas/failure_reason/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}}}var _valid2 = _errs17 === errors;valid6 = _valid2;if(valid6){var props1 = {};props1.failure_reason = true;props1.status = true;}}if(!valid6){const err9 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;validate272.errors = vErrors;return false;}var valid0 = _errs13 === errors;if(valid0){if(props1 !== true){props1 = props1 || {};props1.status = true;}const _errs21 = errors;const _errs22 = errors;let valid10 = true;const _errs23 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing5;if((data.status === undefined) && (missing5 = "status")){const err10 = {};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}else {if(data.status !== undefined){const _errs25 = errors;const _errs26 = errors;if("failed" !== data.status){const err11 = {};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid12 = _errs26 === errors;if(valid12){const err12 = {};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}else {errors = _errs25;if(vErrors !== null){if(_errs25){vErrors.length = _errs25;}else {vErrors = null;}}}}}}var _valid3 = _errs23 === errors;errors = _errs22;if(vErrors !== null){if(_errs22){vErrors.length = _errs22;}else {vErrors = null;}}if(_valid3){const _errs27 = errors;const _errs28 = errors;const _errs29 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing6;if((data.failure_reason === undefined) && (missing6 = "failure_reason")){const err13 = {};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var valid13 = _errs29 === errors;if(valid13){validate272.errors = [{instancePath,schemaPath:"#/allOf/2/then/not",keyword:"not",params:{},message:"must NOT be valid"}];return false;}else {errors = _errs28;if(vErrors !== null){if(_errs28){vErrors.length = _errs28;}else {vErrors = null;}}}var _valid3 = _errs27 === errors;valid10 = _valid3;}if(!valid10){const err14 = {instancePath,schemaPath:"#/allOf/2/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate272.errors = vErrors;return false;}var valid0 = _errs21 === errors;if(valid0){if(props1 !== true){props1 = props1 || {};props1.status = true;}}}}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing7;if(((((((data.id === undefined) && (missing7 = "id")) || ((data.status === undefined) && (missing7 = "status"))) || ((data.amount_minor === undefined) && (missing7 = "amount_minor"))) || ((data.currency === undefined) && (missing7 = "currency"))) || ((data.created_at === undefined) && (missing7 = "created_at"))) || ((data.updated_at === undefined) && (missing7 = "updated_at"))){validate272.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing7},message:"must have required property '"+missing7+"'"}];return false;}else {if(props1 !== true){props1 = props1 || {};props1.id = true;props1.status = true;props1.amount_minor = true;props1.fee_minor = true;props1.total_minor = true;props1.currency = true;props1.method = true;props1.created_at = true;props1.updated_at = true;props1.failure_reason = true;props1.adjustments = true;props1.invoice = true;props1.receipt_url = true;props1.refund = true;}if(data.id !== undefined){const _errs30 = errors;if(typeof data.id !== "string"){validate272.errors = [{instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid14 = _errs30 === errors;}else {var valid14 = true;}if(valid14){if(data.status !== undefined){const _errs32 = errors;if(typeof data.status !== "string"){validate272.errors = [{instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid14 = _errs32 === errors;}else {var valid14 = true;}if(valid14){if(data.amount_minor !== undefined){let data6 = data.amount_minor;const _errs34 = errors;const _errs35 = errors;const _errs36 = errors;let valid16 = false;const _errs37 = errors;if(!(((typeof data6 == "number") && (!(data6 % 1) && !isNaN(data6))) && (isFinite(data6)))){const err15 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid4 = _errs37 === errors;valid16 = valid16 || _valid4;const _errs39 = errors;if(typeof data6 !== "bigint"){const err16 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid4 = _errs39 === errors;valid16 = valid16 || _valid4;if(!valid16){const err17 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;validate272.errors = vErrors;return false;}else {errors = _errs36;if(vErrors !== null){if(_errs36){vErrors.length = _errs36;}else {vErrors = null;}}}var valid15 = _errs35 === errors;if(valid15){if(typeof data6 === "bigint"){if(data6 < 1){validate272.errors = [{instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs34){if((typeof data6 == "number") && (isFinite(data6))){if(data6 < 1 || isNaN(data6)){validate272.errors = [{instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}var valid14 = _errs34 === errors;}else {var valid14 = true;}if(valid14){if(data.fee_minor !== undefined){let data7 = data.fee_minor;const _errs40 = errors;const _errs41 = errors;const _errs42 = errors;let valid18 = false;const _errs43 = errors;if(!(((typeof data7 == "number") && (!(data7 % 1) && !isNaN(data7))) && (isFinite(data7)))){const err18 = {instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid5 = _errs43 === errors;valid18 = valid18 || _valid5;const _errs45 = errors;if(typeof data7 !== "bigint"){const err19 = {instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid5 = _errs45 === errors;valid18 = valid18 || _valid5;if(!valid18){const err20 = {instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;validate272.errors = vErrors;return false;}else {errors = _errs42;if(vErrors !== null){if(_errs42){vErrors.length = _errs42;}else {vErrors = null;}}}var valid17 = _errs41 === errors;if(valid17){if(typeof data7 === "bigint"){if(data7 < 0){validate272.errors = [{instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs40){if((typeof data7 == "number") && (isFinite(data7))){if(data7 < 0 || isNaN(data7)){validate272.errors = [{instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid14 = _errs40 === errors;}else {var valid14 = true;}if(valid14){if(data.total_minor !== undefined){let data8 = data.total_minor;const _errs46 = errors;const _errs47 = errors;const _errs48 = errors;let valid20 = false;const _errs49 = errors;if(!(((typeof data8 == "number") && (!(data8 % 1) && !isNaN(data8))) && (isFinite(data8)))){const err21 = {instancePath:instancePath+"/total_minor",schemaPath:"#/properties/total_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}var _valid6 = _errs49 === errors;valid20 = valid20 || _valid6;const _errs51 = errors;if(typeof data8 !== "bigint"){const err22 = {instancePath:instancePath+"/total_minor",schemaPath:"#/properties/total_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}var _valid6 = _errs51 === errors;valid20 = valid20 || _valid6;if(!valid20){const err23 = {instancePath:instancePath+"/total_minor",schemaPath:"#/properties/total_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;validate272.errors = vErrors;return false;}else {errors = _errs48;if(vErrors !== null){if(_errs48){vErrors.length = _errs48;}else {vErrors = null;}}}var valid19 = _errs47 === errors;if(valid19){if(typeof data8 === "bigint"){if(data8 < 1){validate272.errors = [{instancePath:instancePath+"/total_minor",schemaPath:"#/properties/total_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs46){if((typeof data8 == "number") && (isFinite(data8))){if(data8 < 1 || isNaN(data8)){validate272.errors = [{instancePath:instancePath+"/total_minor",schemaPath:"#/properties/total_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}var valid14 = _errs46 === errors;}else {var valid14 = true;}if(valid14){if(data.currency !== undefined){let data9 = data.currency;const _errs52 = errors;if(typeof data9 !== "string"){validate272.errors = [{instancePath:instancePath+"/currency",schemaPath:"#/properties/currency/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if("usd" !== data9){validate272.errors = [{instancePath:instancePath+"/currency",schemaPath:"#/properties/currency/const",keyword:"const",params:{allowedValue: "usd"},message:"must be equal to constant"}];return false;}var valid14 = _errs52 === errors;}else {var valid14 = true;}if(valid14){if(data.method !== undefined){let data10 = data.method;const _errs54 = errors;if(typeof data10 !== "string"){validate272.errors = [{instancePath:instancePath+"/method",schemaPath:"#/properties/method/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if(!(((data10 === "checkout") || (data10 === "saved_card")) || (data10 === "auto_top_up"))){validate272.errors = [{instancePath:instancePath+"/method",schemaPath:"#/properties/method/enum",keyword:"enum",params:{allowedValues: schema253.properties.method.enum},message:"must be equal to one of the allowed values"}];return false;}var valid14 = _errs54 === errors;}else {var valid14 = true;}if(valid14){if(data.created_at !== undefined){let data11 = data.created_at;const _errs56 = errors;if(errors === _errs56){if(errors === _errs56){if(typeof data11 === "string"){if(!(formats0.validate(data11))){validate272.errors = [{instancePath:instancePath+"/created_at",schemaPath:"#/properties/created_at/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate272.errors = [{instancePath:instancePath+"/created_at",schemaPath:"#/properties/created_at/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid14 = _errs56 === errors;}else {var valid14 = true;}if(valid14){if(data.updated_at !== undefined){let data12 = data.updated_at;const _errs58 = errors;if(errors === _errs58){if(errors === _errs58){if(typeof data12 === "string"){if(!(formats0.validate(data12))){validate272.errors = [{instancePath:instancePath+"/updated_at",schemaPath:"#/properties/updated_at/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate272.errors = [{instancePath:instancePath+"/updated_at",schemaPath:"#/properties/updated_at/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid14 = _errs58 === errors;}else {var valid14 = true;}if(valid14){if(data.failure_reason !== undefined){let data13 = data.failure_reason;const _errs60 = errors;if(errors === _errs60){if(typeof data13 === "string"){if(func1(data13) > 100){validate272.errors = [{instancePath:instancePath+"/failure_reason",schemaPath:"#/properties/failure_reason/maxLength",keyword:"maxLength",params:{limit: 100},message:"must NOT have more than 100 characters"}];return false;}else {if(func1(data13) < 1){validate272.errors = [{instancePath:instancePath+"/failure_reason",schemaPath:"#/properties/failure_reason/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}}else {validate272.errors = [{instancePath:instancePath+"/failure_reason",schemaPath:"#/properties/failure_reason/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid14 = _errs60 === errors;}else {var valid14 = true;}if(valid14){if(data.adjustments !== undefined){let data14 = data.adjustments;const _errs62 = errors;if(errors === _errs62){if(Array.isArray(data14)){var valid21 = true;const len0 = data14.length;for(let i0=0; i0<len0; i0++){const _errs64 = errors;if(!(validate250(data14[i0], {instancePath:instancePath+"/adjustments/" + i0,parentData:data14,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate250.errors : vErrors.concat(validate250.errors);errors = vErrors.length;}var valid21 = _errs64 === errors;if(!valid21){break;}}}else {validate272.errors = [{instancePath:instancePath+"/adjustments",schemaPath:"#/properties/adjustments/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid14 = _errs62 === errors;}else {var valid14 = true;}if(valid14){if(data.invoice !== undefined){let data16 = data.invoice;const _errs65 = errors;const _errs66 = errors;if(errors === _errs66){if(data16 && typeof data16 == "object" && !Array.isArray(data16)){let missing8;if((((data16.number === undefined) && (missing8 = "number")) || ((data16.pdf_url === undefined) && (missing8 = "pdf_url"))) || ((data16.hosted_url === undefined) && (missing8 = "hosted_url"))){validate272.errors = [{instancePath:instancePath+"/invoice",schemaPath:"#/components/schemas/CreditInvoice/required",keyword:"required",params:{missingProperty: missing8},message:"must have required property '"+missing8+"'"}];return false;}else {if(data16.number !== undefined){let data17 = data16.number;const _errs68 = errors;if(errors === _errs68){if(typeof data17 === "string"){if(func1(data17) < 1){validate272.errors = [{instancePath:instancePath+"/invoice/number",schemaPath:"#/components/schemas/CreditInvoice/properties/number/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}else {validate272.errors = [{instancePath:instancePath+"/invoice/number",schemaPath:"#/components/schemas/CreditInvoice/properties/number/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid23 = _errs68 === errors;}else {var valid23 = true;}if(valid23){if(data16.pdf_url !== undefined){const _errs70 = errors;if(errors === _errs70){if(errors === _errs70){if(!(typeof data16.pdf_url === "string")){validate272.errors = [{instancePath:instancePath+"/invoice/pdf_url",schemaPath:"#/components/schemas/CreditInvoice/properties/pdf_url/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid23 = _errs70 === errors;}else {var valid23 = true;}if(valid23){if(data16.hosted_url !== undefined){const _errs72 = errors;if(errors === _errs72){if(errors === _errs72){if(!(typeof data16.hosted_url === "string")){validate272.errors = [{instancePath:instancePath+"/invoice/hosted_url",schemaPath:"#/components/schemas/CreditInvoice/properties/hosted_url/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid23 = _errs72 === errors;}else {var valid23 = true;}}}}}else {validate272.errors = [{instancePath:instancePath+"/invoice",schemaPath:"#/components/schemas/CreditInvoice/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid14 = _errs65 === errors;}else {var valid14 = true;}if(valid14){if(data.receipt_url !== undefined){const _errs74 = errors;if(errors === _errs74){if(errors === _errs74){if(!(typeof data.receipt_url === "string")){validate272.errors = [{instancePath:instancePath+"/receipt_url",schemaPath:"#/properties/receipt_url/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid14 = _errs74 === errors;}else {var valid14 = true;}if(valid14){if(data.refund !== undefined){const _errs76 = errors;if(!(validate252(data.refund, {instancePath:instancePath+"/refund",parentData:data,parentDataProperty:"refund",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate252.errors : vErrors.concat(validate252.errors);errors = vErrors.length;}var valid14 = _errs76 === errors;}else {var valid14 = true;}}}}}}}}}}}}}}}}else {validate272.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate272.errors = vErrors;evaluated0.props = props1;return errors === 0;}validate272.evaluated = {"dynamicProps":true,"dynamicItems":false};exports.validate6 = validate275;function validate275(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate275.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs1 = errors;const _errs2 = errors;let valid1 = true;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.status === undefined) && (missing0 = "status")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.status !== undefined){const _errs5 = errors;const _errs6 = errors;if("confirmed" !== data.status){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid3 = _errs6 === errors;if(valid3){const err2 = {};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {errors = _errs5;if(vErrors !== null){if(_errs5){vErrors.length = _errs5;}else {vErrors = null;}}}}}}var _valid0 = _errs3 === errors;errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}if(_valid0){const _errs7 = errors;const _errs8 = errors;const _errs9 = errors;const _errs10 = errors;let valid5 = false;const _errs11 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((data.invoice === undefined) && (missing1 = "invoice")){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}var _valid1 = _errs11 === errors;valid5 = valid5 || _valid1;if(_valid1){var props0 = {};props0.invoice = true;}const _errs12 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing2;if((data.receipt_url === undefined) && (missing2 = "receipt_url")){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}var _valid1 = _errs12 === errors;valid5 = valid5 || _valid1;if(_valid1){if(props0 !== true){props0 = props0 || {};props0.receipt_url = true;}}if(!valid5){const err5 = {};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}}var valid4 = _errs9 === errors;if(valid4){validate275.errors = [{instancePath,schemaPath:"#/allOf/0/then/not",keyword:"not",params:{},message:"must NOT be valid"}];return false;}else {errors = _errs8;if(vErrors !== null){if(_errs8){vErrors.length = _errs8;}else {vErrors = null;}}}var _valid0 = _errs7 === errors;valid1 = _valid0;}if(!valid1){const err6 = {instancePath,schemaPath:"#/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;validate275.errors = vErrors;return false;}var valid0 = _errs1 === errors;if(valid0){const _errs13 = errors;const _errs14 = errors;let valid6 = true;const _errs15 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing3;if((data.status === undefined) && (missing3 = "status")){const err7 = {};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}else {if(data.status !== undefined){if("failed" !== data.status){const err8 = {};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}}var _valid2 = _errs15 === errors;errors = _errs14;if(vErrors !== null){if(_errs14){vErrors.length = _errs14;}else {vErrors = null;}}if(_valid2){const _errs17 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing4;if((data.failure_reason === undefined) && (missing4 = "failure_reason")){validate275.errors = [{instancePath,schemaPath:"#/allOf/1/then/required",keyword:"required",params:{missingProperty: missing4},message:"must have required property '"+missing4+"'"}];return false;}else {if(data.failure_reason !== undefined){let data2 = data.failure_reason;const _errs19 = errors;if(errors === _errs19){if(typeof data2 === "string"){if(func1(data2) > 100){validate275.errors = [{instancePath:instancePath+"/failure_reason",schemaPath:"#/components/schemas/failure_reason/maxLength",keyword:"maxLength",params:{limit: 100},message:"must NOT have more than 100 characters"}];return false;}else {if(func1(data2) < 1){validate275.errors = [{instancePath:instancePath+"/failure_reason",schemaPath:"#/components/schemas/failure_reason/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}}else {validate275.errors = [{instancePath:instancePath+"/failure_reason",schemaPath:"#/components/schemas/failure_reason/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}}}var _valid2 = _errs17 === errors;valid6 = _valid2;if(valid6){var props1 = {};props1.failure_reason = true;props1.status = true;}}if(!valid6){const err9 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;validate275.errors = vErrors;return false;}var valid0 = _errs13 === errors;if(valid0){if(props1 !== true){props1 = props1 || {};props1.status = true;}const _errs21 = errors;const _errs22 = errors;let valid10 = true;const _errs23 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing5;if((data.status === undefined) && (missing5 = "status")){const err10 = {};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}else {if(data.status !== undefined){const _errs25 = errors;const _errs26 = errors;if("failed" !== data.status){const err11 = {};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid12 = _errs26 === errors;if(valid12){const err12 = {};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}else {errors = _errs25;if(vErrors !== null){if(_errs25){vErrors.length = _errs25;}else {vErrors = null;}}}}}}var _valid3 = _errs23 === errors;errors = _errs22;if(vErrors !== null){if(_errs22){vErrors.length = _errs22;}else {vErrors = null;}}if(_valid3){const _errs27 = errors;const _errs28 = errors;const _errs29 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing6;if((data.failure_reason === undefined) && (missing6 = "failure_reason")){const err13 = {};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var valid13 = _errs29 === errors;if(valid13){validate275.errors = [{instancePath,schemaPath:"#/allOf/2/then/not",keyword:"not",params:{},message:"must NOT be valid"}];return false;}else {errors = _errs28;if(vErrors !== null){if(_errs28){vErrors.length = _errs28;}else {vErrors = null;}}}var _valid3 = _errs27 === errors;valid10 = _valid3;}if(!valid10){const err14 = {instancePath,schemaPath:"#/allOf/2/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate275.errors = vErrors;return false;}var valid0 = _errs21 === errors;if(valid0){if(props1 !== true){props1 = props1 || {};props1.status = true;}}}}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing7;if(((((((data.id === undefined) && (missing7 = "id")) || ((data.status === undefined) && (missing7 = "status"))) || ((data.amount_minor === undefined) && (missing7 = "amount_minor"))) || ((data.currency === undefined) && (missing7 = "currency"))) || ((data.created_at === undefined) && (missing7 = "created_at"))) || ((data.updated_at === undefined) && (missing7 = "updated_at"))){validate275.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing7},message:"must have required property '"+missing7+"'"}];return false;}else {if(props1 !== true){props1 = props1 || {};props1.id = true;props1.status = true;props1.amount_minor = true;props1.fee_minor = true;props1.total_minor = true;props1.currency = true;props1.method = true;props1.created_at = true;props1.updated_at = true;props1.failure_reason = true;props1.adjustments = true;props1.invoice = true;props1.receipt_url = true;props1.refund = true;}if(data.id !== undefined){const _errs30 = errors;if(typeof data.id !== "string"){validate275.errors = [{instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid14 = _errs30 === errors;}else {var valid14 = true;}if(valid14){if(data.status !== undefined){const _errs32 = errors;if(typeof data.status !== "string"){validate275.errors = [{instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid14 = _errs32 === errors;}else {var valid14 = true;}if(valid14){if(data.amount_minor !== undefined){let data6 = data.amount_minor;const _errs34 = errors;const _errs35 = errors;const _errs36 = errors;let valid16 = false;const _errs37 = errors;if(!(((typeof data6 == "number") && (!(data6 % 1) && !isNaN(data6))) && (isFinite(data6)))){const err15 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid4 = _errs37 === errors;valid16 = valid16 || _valid4;const _errs39 = errors;if(typeof data6 !== "bigint"){const err16 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid4 = _errs39 === errors;valid16 = valid16 || _valid4;if(!valid16){const err17 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;validate275.errors = vErrors;return false;}else {errors = _errs36;if(vErrors !== null){if(_errs36){vErrors.length = _errs36;}else {vErrors = null;}}}var valid15 = _errs35 === errors;if(valid15){if(typeof data6 === "bigint"){if(data6 < 1){validate275.errors = [{instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs34){if((typeof data6 == "number") && (isFinite(data6))){if(data6 < 1 || isNaN(data6)){validate275.errors = [{instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}var valid14 = _errs34 === errors;}else {var valid14 = true;}if(valid14){if(data.fee_minor !== undefined){let data7 = data.fee_minor;const _errs40 = errors;const _errs41 = errors;const _errs42 = errors;let valid18 = false;const _errs43 = errors;if(!(((typeof data7 == "number") && (!(data7 % 1) && !isNaN(data7))) && (isFinite(data7)))){const err18 = {instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid5 = _errs43 === errors;valid18 = valid18 || _valid5;const _errs45 = errors;if(typeof data7 !== "bigint"){const err19 = {instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid5 = _errs45 === errors;valid18 = valid18 || _valid5;if(!valid18){const err20 = {instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;validate275.errors = vErrors;return false;}else {errors = _errs42;if(vErrors !== null){if(_errs42){vErrors.length = _errs42;}else {vErrors = null;}}}var valid17 = _errs41 === errors;if(valid17){if(typeof data7 === "bigint"){if(data7 < 0){validate275.errors = [{instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs40){if((typeof data7 == "number") && (isFinite(data7))){if(data7 < 0 || isNaN(data7)){validate275.errors = [{instancePath:instancePath+"/fee_minor",schemaPath:"#/properties/fee_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid14 = _errs40 === errors;}else {var valid14 = true;}if(valid14){if(data.total_minor !== undefined){let data8 = data.total_minor;const _errs46 = errors;const _errs47 = errors;const _errs48 = errors;let valid20 = false;const _errs49 = errors;if(!(((typeof data8 == "number") && (!(data8 % 1) && !isNaN(data8))) && (isFinite(data8)))){const err21 = {instancePath:instancePath+"/total_minor",schemaPath:"#/properties/total_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}var _valid6 = _errs49 === errors;valid20 = valid20 || _valid6;const _errs51 = errors;if(typeof data8 !== "bigint"){const err22 = {instancePath:instancePath+"/total_minor",schemaPath:"#/properties/total_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}var _valid6 = _errs51 === errors;valid20 = valid20 || _valid6;if(!valid20){const err23 = {instancePath:instancePath+"/total_minor",schemaPath:"#/properties/total_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;validate275.errors = vErrors;return false;}else {errors = _errs48;if(vErrors !== null){if(_errs48){vErrors.length = _errs48;}else {vErrors = null;}}}var valid19 = _errs47 === errors;if(valid19){if(typeof data8 === "bigint"){if(data8 < 1){validate275.errors = [{instancePath:instancePath+"/total_minor",schemaPath:"#/properties/total_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs46){if((typeof data8 == "number") && (isFinite(data8))){if(data8 < 1 || isNaN(data8)){validate275.errors = [{instancePath:instancePath+"/total_minor",schemaPath:"#/properties/total_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}var valid14 = _errs46 === errors;}else {var valid14 = true;}if(valid14){if(data.currency !== undefined){let data9 = data.currency;const _errs52 = errors;if(typeof data9 !== "string"){validate275.errors = [{instancePath:instancePath+"/currency",schemaPath:"#/properties/currency/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if("usd" !== data9){validate275.errors = [{instancePath:instancePath+"/currency",schemaPath:"#/properties/currency/const",keyword:"const",params:{allowedValue: "usd"},message:"must be equal to constant"}];return false;}var valid14 = _errs52 === errors;}else {var valid14 = true;}if(valid14){if(data.method !== undefined){let data10 = data.method;const _errs54 = errors;if(typeof data10 !== "string"){validate275.errors = [{instancePath:instancePath+"/method",schemaPath:"#/properties/method/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if(!(((data10 === "checkout") || (data10 === "saved_card")) || (data10 === "auto_top_up"))){validate275.errors = [{instancePath:instancePath+"/method",schemaPath:"#/properties/method/enum",keyword:"enum",params:{allowedValues: schema253.properties.method.enum},message:"must be equal to one of the allowed values"}];return false;}var valid14 = _errs54 === errors;}else {var valid14 = true;}if(valid14){if(data.created_at !== undefined){let data11 = data.created_at;const _errs56 = errors;if(errors === _errs56){if(errors === _errs56){if(typeof data11 === "string"){if(!(formats0.validate(data11))){validate275.errors = [{instancePath:instancePath+"/created_at",schemaPath:"#/properties/created_at/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate275.errors = [{instancePath:instancePath+"/created_at",schemaPath:"#/properties/created_at/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid14 = _errs56 === errors;}else {var valid14 = true;}if(valid14){if(data.updated_at !== undefined){let data12 = data.updated_at;const _errs58 = errors;if(errors === _errs58){if(errors === _errs58){if(typeof data12 === "string"){if(!(formats0.validate(data12))){validate275.errors = [{instancePath:instancePath+"/updated_at",schemaPath:"#/properties/updated_at/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate275.errors = [{instancePath:instancePath+"/updated_at",schemaPath:"#/properties/updated_at/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid14 = _errs58 === errors;}else {var valid14 = true;}if(valid14){if(data.failure_reason !== undefined){let data13 = data.failure_reason;const _errs60 = errors;if(errors === _errs60){if(typeof data13 === "string"){if(func1(data13) > 100){validate275.errors = [{instancePath:instancePath+"/failure_reason",schemaPath:"#/properties/failure_reason/maxLength",keyword:"maxLength",params:{limit: 100},message:"must NOT have more than 100 characters"}];return false;}else {if(func1(data13) < 1){validate275.errors = [{instancePath:instancePath+"/failure_reason",schemaPath:"#/properties/failure_reason/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}}else {validate275.errors = [{instancePath:instancePath+"/failure_reason",schemaPath:"#/properties/failure_reason/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid14 = _errs60 === errors;}else {var valid14 = true;}if(valid14){if(data.adjustments !== undefined){let data14 = data.adjustments;const _errs62 = errors;if(errors === _errs62){if(Array.isArray(data14)){var valid21 = true;const len0 = data14.length;for(let i0=0; i0<len0; i0++){const _errs64 = errors;if(!(validate250(data14[i0], {instancePath:instancePath+"/adjustments/" + i0,parentData:data14,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate250.errors : vErrors.concat(validate250.errors);errors = vErrors.length;}var valid21 = _errs64 === errors;if(!valid21){break;}}}else {validate275.errors = [{instancePath:instancePath+"/adjustments",schemaPath:"#/properties/adjustments/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid14 = _errs62 === errors;}else {var valid14 = true;}if(valid14){if(data.invoice !== undefined){let data16 = data.invoice;const _errs65 = errors;const _errs66 = errors;if(errors === _errs66){if(data16 && typeof data16 == "object" && !Array.isArray(data16)){let missing8;if((((data16.number === undefined) && (missing8 = "number")) || ((data16.pdf_url === undefined) && (missing8 = "pdf_url"))) || ((data16.hosted_url === undefined) && (missing8 = "hosted_url"))){validate275.errors = [{instancePath:instancePath+"/invoice",schemaPath:"#/components/schemas/CreditInvoice/required",keyword:"required",params:{missingProperty: missing8},message:"must have required property '"+missing8+"'"}];return false;}else {if(data16.number !== undefined){let data17 = data16.number;const _errs68 = errors;if(errors === _errs68){if(typeof data17 === "string"){if(func1(data17) < 1){validate275.errors = [{instancePath:instancePath+"/invoice/number",schemaPath:"#/components/schemas/CreditInvoice/properties/number/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}else {validate275.errors = [{instancePath:instancePath+"/invoice/number",schemaPath:"#/components/schemas/CreditInvoice/properties/number/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid23 = _errs68 === errors;}else {var valid23 = true;}if(valid23){if(data16.pdf_url !== undefined){const _errs70 = errors;if(errors === _errs70){if(errors === _errs70){if(!(typeof data16.pdf_url === "string")){validate275.errors = [{instancePath:instancePath+"/invoice/pdf_url",schemaPath:"#/components/schemas/CreditInvoice/properties/pdf_url/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid23 = _errs70 === errors;}else {var valid23 = true;}if(valid23){if(data16.hosted_url !== undefined){const _errs72 = errors;if(errors === _errs72){if(errors === _errs72){if(!(typeof data16.hosted_url === "string")){validate275.errors = [{instancePath:instancePath+"/invoice/hosted_url",schemaPath:"#/components/schemas/CreditInvoice/properties/hosted_url/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid23 = _errs72 === errors;}else {var valid23 = true;}}}}}else {validate275.errors = [{instancePath:instancePath+"/invoice",schemaPath:"#/components/schemas/CreditInvoice/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid14 = _errs65 === errors;}else {var valid14 = true;}if(valid14){if(data.receipt_url !== undefined){const _errs74 = errors;if(errors === _errs74){if(errors === _errs74){if(!(typeof data.receipt_url === "string")){validate275.errors = [{instancePath:instancePath+"/receipt_url",schemaPath:"#/properties/receipt_url/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid14 = _errs74 === errors;}else {var valid14 = true;}if(valid14){if(data.refund !== undefined){const _errs76 = errors;if(!(validate252(data.refund, {instancePath:instancePath+"/refund",parentData:data,parentDataProperty:"refund",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate252.errors : vErrors.concat(validate252.errors);errors = vErrors.length;}var valid14 = _errs76 === errors;}else {var valid14 = true;}}}}}}}}}}}}}}}}else {validate275.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate275.errors = vErrors;evaluated0.props = props1;return errors === 0;}validate275.evaluated = {"dynamicProps":true,"dynamicItems":false};exports.validate7 = validate278;const schema272 = {"type":"object","required":["code","amount_nanodollars","description","redeemed_at"],"properties":{"code":{"type":"string","description":"The code in its canonical upper-case form."},"amount_nanodollars":{"type":"string","maxLength":19,"pattern":"^(?:[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[0-1][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-7])$","description":"Credit granted, in billionths of a US dollar, as a canonical positive signed 64-bit nanodollar string."},"description":{"type":"string","description":"What the credit is for, as the promotion describes it."},"redeemed_at":{"type":"string","format":"date-time"}}};const pattern189 = new RegExp("^(?:[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[0-1][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-7])$", "u");function validate278(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate278.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.code === undefined) && (missing0 = "code")) || ((data.amount_nanodollars === undefined) && (missing0 = "amount_nanodollars"))) || ((data.description === undefined) && (missing0 = "description"))) || ((data.redeemed_at === undefined) && (missing0 = "redeemed_at"))){validate278.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.code !== undefined){const _errs1 = errors;if(typeof data.code !== "string"){validate278.errors = [{instancePath:instancePath+"/code",schemaPath:"#/properties/code/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.amount_nanodollars !== undefined){let data1 = data.amount_nanodollars;const _errs3 = errors;if(errors === _errs3){if(typeof data1 === "string"){if(func1(data1) > 19){validate278.errors = [{instancePath:instancePath+"/amount_nanodollars",schemaPath:"#/properties/amount_nanodollars/maxLength",keyword:"maxLength",params:{limit: 19},message:"must NOT have more than 19 characters"}];return false;}else {if(!pattern189.test(data1)){validate278.errors = [{instancePath:instancePath+"/amount_nanodollars",schemaPath:"#/properties/amount_nanodollars/pattern",keyword:"pattern",params:{pattern: "^(?:[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[0-1][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-7])$"},message:"must match pattern \""+"^(?:[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[0-1][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-7])$"+"\""}];return false;}}}else {validate278.errors = [{instancePath:instancePath+"/amount_nanodollars",schemaPath:"#/properties/amount_nanodollars/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.description !== undefined){const _errs5 = errors;if(typeof data.description !== "string"){validate278.errors = [{instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs5 === errors;}else {var valid0 = true;}if(valid0){if(data.redeemed_at !== undefined){let data3 = data.redeemed_at;const _errs7 = errors;if(errors === _errs7){if(errors === _errs7){if(typeof data3 === "string"){if(!(formats0.validate(data3))){validate278.errors = [{instancePath:instancePath+"/redeemed_at",schemaPath:"#/properties/redeemed_at/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate278.errors = [{instancePath:instancePath+"/redeemed_at",schemaPath:"#/properties/redeemed_at/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid0 = _errs7 === errors;}else {var valid0 = true;}}}}}}else {validate278.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate278.errors = vErrors;return errors === 0;}validate278.evaluated = {"props":{"code":true,"amount_nanodollars":true,"description":true,"redeemed_at":true},"dynamicProps":false,"dynamicItems":false};exports.validate8 = validate279;const schema273 = {"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CreditPromotion"}}}};function validate279(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate279.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.data === undefined) && (missing0 = "data")){validate279.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.data !== undefined){let data0 = data.data;const _errs1 = errors;if(errors === _errs1){if(Array.isArray(data0)){var valid1 = true;const len0 = data0.length;for(let i0=0; i0<len0; i0++){let data1 = data0[i0];const _errs3 = errors;const _errs4 = errors;if(errors === _errs4){if(data1 && typeof data1 == "object" && !Array.isArray(data1)){let missing1;if(((((data1.code === undefined) && (missing1 = "code")) || ((data1.amount_nanodollars === undefined) && (missing1 = "amount_nanodollars"))) || ((data1.description === undefined) && (missing1 = "description"))) || ((data1.redeemed_at === undefined) && (missing1 = "redeemed_at"))){validate279.errors = [{instancePath:instancePath+"/data/" + i0,schemaPath:"#/components/schemas/CreditPromotion/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data1.code !== undefined){const _errs6 = errors;if(typeof data1.code !== "string"){validate279.errors = [{instancePath:instancePath+"/data/" + i0+"/code",schemaPath:"#/components/schemas/CreditPromotion/properties/code/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs6 === errors;}else {var valid3 = true;}if(valid3){if(data1.amount_nanodollars !== undefined){let data3 = data1.amount_nanodollars;const _errs8 = errors;if(errors === _errs8){if(typeof data3 === "string"){if(func1(data3) > 19){validate279.errors = [{instancePath:instancePath+"/data/" + i0+"/amount_nanodollars",schemaPath:"#/components/schemas/CreditPromotion/properties/amount_nanodollars/maxLength",keyword:"maxLength",params:{limit: 19},message:"must NOT have more than 19 characters"}];return false;}else {if(!pattern189.test(data3)){validate279.errors = [{instancePath:instancePath+"/data/" + i0+"/amount_nanodollars",schemaPath:"#/components/schemas/CreditPromotion/properties/amount_nanodollars/pattern",keyword:"pattern",params:{pattern: "^(?:[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[0-1][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-7])$"},message:"must match pattern \""+"^(?:[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[0-1][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-7])$"+"\""}];return false;}}}else {validate279.errors = [{instancePath:instancePath+"/data/" + i0+"/amount_nanodollars",schemaPath:"#/components/schemas/CreditPromotion/properties/amount_nanodollars/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid3 = _errs8 === errors;}else {var valid3 = true;}if(valid3){if(data1.description !== undefined){const _errs10 = errors;if(typeof data1.description !== "string"){validate279.errors = [{instancePath:instancePath+"/data/" + i0+"/description",schemaPath:"#/components/schemas/CreditPromotion/properties/description/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs10 === errors;}else {var valid3 = true;}if(valid3){if(data1.redeemed_at !== undefined){let data5 = data1.redeemed_at;const _errs12 = errors;if(errors === _errs12){if(errors === _errs12){if(typeof data5 === "string"){if(!(formats0.validate(data5))){validate279.errors = [{instancePath:instancePath+"/data/" + i0+"/redeemed_at",schemaPath:"#/components/schemas/CreditPromotion/properties/redeemed_at/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate279.errors = [{instancePath:instancePath+"/data/" + i0+"/redeemed_at",schemaPath:"#/components/schemas/CreditPromotion/properties/redeemed_at/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid3 = _errs12 === errors;}else {var valid3 = true;}}}}}}else {validate279.errors = [{instancePath:instancePath+"/data/" + i0,schemaPath:"#/components/schemas/CreditPromotion/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid1 = _errs3 === errors;if(!valid1){break;}}}else {validate279.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}}}}else {validate279.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate279.errors = vErrors;return errors === 0;}validate279.evaluated = {"props":{"data":true},"dynamicProps":false,"dynamicItems":false};exports.validate9 = validate280;const schema275 = {"type":"object","required":["name","email","address","tax_id"],"properties":{"name":{"type":["string","null"]},"email":{"type":["string","null"]},"address":{"anyOf":[{"$ref":"#/components/schemas/BillingAddress"},{"type":"null"}]},"tax_id":{"anyOf":[{"$ref":"#/components/schemas/BillingTaxId"},{"type":"null"}]}}};const schema277 = {"type":"object","required":["type","value"],"properties":{"type":{"type":"string","description":"Stripe tax ID type; unknown future types are returned unchanged."},"value":{"type":"string"},"verification_status":{"type":"string","description":"Stripe verification status when available (pending, verified, unverified or unavailable); clients must handle unknown values."}}};const schema276 = {"type":"object","required":["line1","line2","city","state","postal_code","country"],"properties":{"line1":{"type":["string","null"],"maxLength":200},"line2":{"type":["string","null"],"maxLength":200},"city":{"type":["string","null"],"maxLength":200},"state":{"type":["string","null"],"maxLength":200},"postal_code":{"type":["string","null"],"maxLength":50},"country":{"type":["string","null"],"pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2 country code, or null when unset."}}};const pattern191 = new RegExp("^[A-Z]{2}$", "u");function validate281(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate281.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((((data.line1 === undefined) && (missing0 = "line1")) || ((data.line2 === undefined) && (missing0 = "line2"))) || ((data.city === undefined) && (missing0 = "city"))) || ((data.state === undefined) && (missing0 = "state"))) || ((data.postal_code === undefined) && (missing0 = "postal_code"))) || ((data.country === undefined) && (missing0 = "country"))){validate281.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.line1 !== undefined){let data0 = data.line1;const _errs1 = errors;if((typeof data0 !== "string") && (data0 !== null)){validate281.errors = [{instancePath:instancePath+"/line1",schemaPath:"#/properties/line1/type",keyword:"type",params:{type: schema276.properties.line1.type},message:"must be string,null"}];return false;}if(errors === _errs1){if(typeof data0 === "string"){if(func1(data0) > 200){validate281.errors = [{instancePath:instancePath+"/line1",schemaPath:"#/properties/line1/maxLength",keyword:"maxLength",params:{limit: 200},message:"must NOT have more than 200 characters"}];return false;}}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.line2 !== undefined){let data1 = data.line2;const _errs3 = errors;if((typeof data1 !== "string") && (data1 !== null)){validate281.errors = [{instancePath:instancePath+"/line2",schemaPath:"#/properties/line2/type",keyword:"type",params:{type: schema276.properties.line2.type},message:"must be string,null"}];return false;}if(errors === _errs3){if(typeof data1 === "string"){if(func1(data1) > 200){validate281.errors = [{instancePath:instancePath+"/line2",schemaPath:"#/properties/line2/maxLength",keyword:"maxLength",params:{limit: 200},message:"must NOT have more than 200 characters"}];return false;}}}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.city !== undefined){let data2 = data.city;const _errs5 = errors;if((typeof data2 !== "string") && (data2 !== null)){validate281.errors = [{instancePath:instancePath+"/city",schemaPath:"#/properties/city/type",keyword:"type",params:{type: schema276.properties.city.type},message:"must be string,null"}];return false;}if(errors === _errs5){if(typeof data2 === "string"){if(func1(data2) > 200){validate281.errors = [{instancePath:instancePath+"/city",schemaPath:"#/properties/city/maxLength",keyword:"maxLength",params:{limit: 200},message:"must NOT have more than 200 characters"}];return false;}}}var valid0 = _errs5 === errors;}else {var valid0 = true;}if(valid0){if(data.state !== undefined){let data3 = data.state;const _errs7 = errors;if((typeof data3 !== "string") && (data3 !== null)){validate281.errors = [{instancePath:instancePath+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type: schema276.properties.state.type},message:"must be string,null"}];return false;}if(errors === _errs7){if(typeof data3 === "string"){if(func1(data3) > 200){validate281.errors = [{instancePath:instancePath+"/state",schemaPath:"#/properties/state/maxLength",keyword:"maxLength",params:{limit: 200},message:"must NOT have more than 200 characters"}];return false;}}}var valid0 = _errs7 === errors;}else {var valid0 = true;}if(valid0){if(data.postal_code !== undefined){let data4 = data.postal_code;const _errs9 = errors;if((typeof data4 !== "string") && (data4 !== null)){validate281.errors = [{instancePath:instancePath+"/postal_code",schemaPath:"#/properties/postal_code/type",keyword:"type",params:{type: schema276.properties.postal_code.type},message:"must be string,null"}];return false;}if(errors === _errs9){if(typeof data4 === "string"){if(func1(data4) > 50){validate281.errors = [{instancePath:instancePath+"/postal_code",schemaPath:"#/properties/postal_code/maxLength",keyword:"maxLength",params:{limit: 50},message:"must NOT have more than 50 characters"}];return false;}}}var valid0 = _errs9 === errors;}else {var valid0 = true;}if(valid0){if(data.country !== undefined){let data5 = data.country;const _errs11 = errors;if((typeof data5 !== "string") && (data5 !== null)){validate281.errors = [{instancePath:instancePath+"/country",schemaPath:"#/properties/country/type",keyword:"type",params:{type: schema276.properties.country.type},message:"must be string,null"}];return false;}if(errors === _errs11){if(typeof data5 === "string"){if(!pattern191.test(data5)){validate281.errors = [{instancePath:instancePath+"/country",schemaPath:"#/properties/country/pattern",keyword:"pattern",params:{pattern: "^[A-Z]{2}$"},message:"must match pattern \""+"^[A-Z]{2}$"+"\""}];return false;}}}var valid0 = _errs11 === errors;}else {var valid0 = true;}}}}}}}}else {validate281.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate281.errors = vErrors;return errors === 0;}validate281.evaluated = {"props":{"line1":true,"line2":true,"city":true,"state":true,"postal_code":true,"country":true},"dynamicProps":false,"dynamicItems":false};function validate280(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate280.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.name === undefined) && (missing0 = "name")) || ((data.email === undefined) && (missing0 = "email"))) || ((data.address === undefined) && (missing0 = "address"))) || ((data.tax_id === undefined) && (missing0 = "tax_id"))){validate280.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.name !== undefined){let data0 = data.name;const _errs1 = errors;if((typeof data0 !== "string") && (data0 !== null)){validate280.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: schema275.properties.name.type},message:"must be string,null"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.email !== undefined){let data1 = data.email;const _errs3 = errors;if((typeof data1 !== "string") && (data1 !== null)){validate280.errors = [{instancePath:instancePath+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type: schema275.properties.email.type},message:"must be string,null"}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.address !== undefined){let data2 = data.address;const _errs5 = errors;const _errs6 = errors;let valid1 = false;const _errs7 = errors;if(!(validate281(data2, {instancePath:instancePath+"/address",parentData:data,parentDataProperty:"address",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate281.errors : vErrors.concat(validate281.errors);errors = vErrors.length;}var _valid0 = _errs7 === errors;valid1 = valid1 || _valid0;if(_valid0){var props0 = {};props0.line1 = true;props0.line2 = true;props0.city = true;props0.state = true;props0.postal_code = true;props0.country = true;}const _errs8 = errors;if(data2 !== null){const err0 = {instancePath:instancePath+"/address",schemaPath:"#/properties/address/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs8 === errors;valid1 = valid1 || _valid0;if(!valid1){const err1 = {instancePath:instancePath+"/address",schemaPath:"#/properties/address/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;validate280.errors = vErrors;return false;}else {errors = _errs6;if(vErrors !== null){if(_errs6){vErrors.length = _errs6;}else {vErrors = null;}}}var valid0 = _errs5 === errors;}else {var valid0 = true;}if(valid0){if(data.tax_id !== undefined){let data3 = data.tax_id;const _errs10 = errors;const _errs11 = errors;let valid2 = false;const _errs12 = errors;const _errs13 = errors;if(errors === _errs13){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.type === undefined) && (missing1 = "type")) || ((data3.value === undefined) && (missing1 = "value"))){const err2 = {instancePath:instancePath+"/tax_id",schemaPath:"#/components/schemas/BillingTaxId/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {if(data3.type !== undefined){const _errs15 = errors;if(typeof data3.type !== "string"){const err3 = {instancePath:instancePath+"/tax_id/type",schemaPath:"#/components/schemas/BillingTaxId/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid4 = _errs15 === errors;}else {var valid4 = true;}if(valid4){if(data3.value !== undefined){const _errs17 = errors;if(typeof data3.value !== "string"){const err4 = {instancePath:instancePath+"/tax_id/value",schemaPath:"#/components/schemas/BillingTaxId/properties/value/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid4 = _errs17 === errors;}else {var valid4 = true;}if(valid4){if(data3.verification_status !== undefined){const _errs19 = errors;if(typeof data3.verification_status !== "string"){const err5 = {instancePath:instancePath+"/tax_id/verification_status",schemaPath:"#/components/schemas/BillingTaxId/properties/verification_status/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var valid4 = _errs19 === errors;}else {var valid4 = true;}}}}}else {const err6 = {instancePath:instancePath+"/tax_id",schemaPath:"#/components/schemas/BillingTaxId/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}var _valid1 = _errs12 === errors;valid2 = valid2 || _valid1;if(_valid1){var props1 = {};props1.type = true;props1.value = true;props1.verification_status = true;}const _errs21 = errors;if(data3 !== null){const err7 = {instancePath:instancePath+"/tax_id",schemaPath:"#/properties/tax_id/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid1 = _errs21 === errors;valid2 = valid2 || _valid1;if(!valid2){const err8 = {instancePath:instancePath+"/tax_id",schemaPath:"#/properties/tax_id/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;validate280.errors = vErrors;return false;}else {errors = _errs11;if(vErrors !== null){if(_errs11){vErrors.length = _errs11;}else {vErrors = null;}}}var valid0 = _errs10 === errors;}else {var valid0 = true;}}}}}}else {validate280.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate280.errors = vErrors;return errors === 0;}validate280.evaluated = {"props":{"name":true,"email":true,"address":true,"tax_id":true},"dynamicProps":false,"dynamicItems":false};exports.validate10 = validate283;function validate283(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate283.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.name === undefined) && (missing0 = "name")) || ((data.email === undefined) && (missing0 = "email"))) || ((data.address === undefined) && (missing0 = "address"))) || ((data.tax_id === undefined) && (missing0 = "tax_id"))){validate283.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.name !== undefined){let data0 = data.name;const _errs1 = errors;if((typeof data0 !== "string") && (data0 !== null)){validate283.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: schema275.properties.name.type},message:"must be string,null"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.email !== undefined){let data1 = data.email;const _errs3 = errors;if((typeof data1 !== "string") && (data1 !== null)){validate283.errors = [{instancePath:instancePath+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type: schema275.properties.email.type},message:"must be string,null"}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.address !== undefined){let data2 = data.address;const _errs5 = errors;const _errs6 = errors;let valid1 = false;const _errs7 = errors;if(!(validate281(data2, {instancePath:instancePath+"/address",parentData:data,parentDataProperty:"address",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate281.errors : vErrors.concat(validate281.errors);errors = vErrors.length;}var _valid0 = _errs7 === errors;valid1 = valid1 || _valid0;if(_valid0){var props0 = {};props0.line1 = true;props0.line2 = true;props0.city = true;props0.state = true;props0.postal_code = true;props0.country = true;}const _errs8 = errors;if(data2 !== null){const err0 = {instancePath:instancePath+"/address",schemaPath:"#/properties/address/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs8 === errors;valid1 = valid1 || _valid0;if(!valid1){const err1 = {instancePath:instancePath+"/address",schemaPath:"#/properties/address/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;validate283.errors = vErrors;return false;}else {errors = _errs6;if(vErrors !== null){if(_errs6){vErrors.length = _errs6;}else {vErrors = null;}}}var valid0 = _errs5 === errors;}else {var valid0 = true;}if(valid0){if(data.tax_id !== undefined){let data3 = data.tax_id;const _errs10 = errors;const _errs11 = errors;let valid2 = false;const _errs12 = errors;const _errs13 = errors;if(errors === _errs13){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.type === undefined) && (missing1 = "type")) || ((data3.value === undefined) && (missing1 = "value"))){const err2 = {instancePath:instancePath+"/tax_id",schemaPath:"#/components/schemas/BillingTaxId/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {if(data3.type !== undefined){const _errs15 = errors;if(typeof data3.type !== "string"){const err3 = {instancePath:instancePath+"/tax_id/type",schemaPath:"#/components/schemas/BillingTaxId/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid4 = _errs15 === errors;}else {var valid4 = true;}if(valid4){if(data3.value !== undefined){const _errs17 = errors;if(typeof data3.value !== "string"){const err4 = {instancePath:instancePath+"/tax_id/value",schemaPath:"#/components/schemas/BillingTaxId/properties/value/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid4 = _errs17 === errors;}else {var valid4 = true;}if(valid4){if(data3.verification_status !== undefined){const _errs19 = errors;if(typeof data3.verification_status !== "string"){const err5 = {instancePath:instancePath+"/tax_id/verification_status",schemaPath:"#/components/schemas/BillingTaxId/properties/verification_status/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var valid4 = _errs19 === errors;}else {var valid4 = true;}}}}}else {const err6 = {instancePath:instancePath+"/tax_id",schemaPath:"#/components/schemas/BillingTaxId/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}var _valid1 = _errs12 === errors;valid2 = valid2 || _valid1;if(_valid1){var props1 = {};props1.type = true;props1.value = true;props1.verification_status = true;}const _errs21 = errors;if(data3 !== null){const err7 = {instancePath:instancePath+"/tax_id",schemaPath:"#/properties/tax_id/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid1 = _errs21 === errors;valid2 = valid2 || _valid1;if(!valid2){const err8 = {instancePath:instancePath+"/tax_id",schemaPath:"#/properties/tax_id/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;validate283.errors = vErrors;return false;}else {errors = _errs11;if(vErrors !== null){if(_errs11){vErrors.length = _errs11;}else {vErrors = null;}}}var valid0 = _errs10 === errors;}else {var valid0 = true;}}}}}}else {validate283.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate283.errors = vErrors;return errors === 0;}validate283.evaluated = {"props":{"name":true,"email":true,"address":true,"tax_id":true},"dynamicProps":false,"dynamicItems":false};exports.validate11 = validate285;const schema280 = {"type":"object","required":["low_balance_threshold_minor","email_delivery"],"properties":{"low_balance_threshold_minor":{"minimum":1,"maximum":9007199254740991,"description":"Optional low-balance alert level in US cents; null disables it. Evaluating a balance below a newly enabled level alerts immediately. Zero-balance alerts are automatic. Alerts re-arm when balance recovers to the level (or above zero).","allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1,"maximum":9007199254740991}},"email_delivery":{"type":"string","enum":["configured","log_only"],"description":"Whether SMTP and a verified workspace-owner address are configured for low- and zero-balance notices; configured does not guarantee successful delivery."}}};function validate285(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate285.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.low_balance_threshold_minor === undefined) && (missing0 = "low_balance_threshold_minor")) || ((data.email_delivery === undefined) && (missing0 = "email_delivery"))){validate285.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.low_balance_threshold_minor !== undefined){let data0 = data.low_balance_threshold_minor;const _errs1 = errors;const _errs2 = errors;const _errs3 = errors;let valid2 = false;const _errs4 = errors;if((!(((typeof data0 == "number") && (!(data0 % 1) && !isNaN(data0))) && (isFinite(data0)))) && (data0 !== null)){const err0 = {instancePath:instancePath+"/low_balance_threshold_minor",schemaPath:"#/properties/low_balance_threshold_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: schema280.properties.low_balance_threshold_minor.allOf[0].anyOf[0].type},message:"must be integer,null"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs4 === errors;valid2 = valid2 || _valid0;const _errs6 = errors;if(typeof data0 !== "bigint"){const err1 = {instancePath:instancePath+"/low_balance_threshold_minor",schemaPath:"#/properties/low_balance_threshold_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs6 === errors;valid2 = valid2 || _valid0;if(!valid2){const err2 = {instancePath:instancePath+"/low_balance_threshold_minor",schemaPath:"#/properties/low_balance_threshold_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;validate285.errors = vErrors;return false;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}var valid1 = _errs2 === errors;if(valid1){if(typeof data0 === "bigint"){if(data0 < 1){validate285.errors = [{instancePath:instancePath+"/low_balance_threshold_minor",schemaPath:"#/properties/low_balance_threshold_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}else {if(data0 > 9007199254740991){validate285.errors = [{instancePath:instancePath+"/low_balance_threshold_minor",schemaPath:"#/properties/low_balance_threshold_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}}if(errors === _errs1){if((typeof data0 == "number") && (isFinite(data0))){if(data0 > 9007199254740991 || isNaN(data0)){validate285.errors = [{instancePath:instancePath+"/low_balance_threshold_minor",schemaPath:"#/properties/low_balance_threshold_minor/maximum",keyword:"maximum",params:{comparison: "<=", limit: 9007199254740991},message:"must be <= 9007199254740991"}];return false;}else {if(data0 < 1 || isNaN(data0)){validate285.errors = [{instancePath:instancePath+"/low_balance_threshold_minor",schemaPath:"#/properties/low_balance_threshold_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.email_delivery !== undefined){let data1 = data.email_delivery;const _errs7 = errors;if(typeof data1 !== "string"){validate285.errors = [{instancePath:instancePath+"/email_delivery",schemaPath:"#/properties/email_delivery/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if(!((data1 === "configured") || (data1 === "log_only"))){validate285.errors = [{instancePath:instancePath+"/email_delivery",schemaPath:"#/properties/email_delivery/enum",keyword:"enum",params:{allowedValues: schema280.properties.email_delivery.enum},message:"must be equal to one of the allowed values"}];return false;}var valid0 = _errs7 === errors;}else {var valid0 = true;}}}}else {validate285.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate285.errors = vErrors;return errors === 0;}validate285.evaluated = {"props":{"low_balance_threshold_minor":true,"email_delivery":true},"dynamicProps":false,"dynamicItems":false};exports.validate12 = validate286;function validate286(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate286.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.low_balance_threshold_minor === undefined) && (missing0 = "low_balance_threshold_minor")) || ((data.email_delivery === undefined) && (missing0 = "email_delivery"))){validate286.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.low_balance_threshold_minor !== undefined){let data0 = data.low_balance_threshold_minor;const _errs1 = errors;const _errs2 = errors;const _errs3 = errors;let valid2 = false;const _errs4 = errors;if((!(((typeof data0 == "number") && (!(data0 % 1) && !isNaN(data0))) && (isFinite(data0)))) && (data0 !== null)){const err0 = {instancePath:instancePath+"/low_balance_threshold_minor",schemaPath:"#/properties/low_balance_threshold_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: schema280.properties.low_balance_threshold_minor.allOf[0].anyOf[0].type},message:"must be integer,null"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs4 === errors;valid2 = valid2 || _valid0;const _errs6 = errors;if(typeof data0 !== "bigint"){const err1 = {instancePath:instancePath+"/low_balance_threshold_minor",schemaPath:"#/properties/low_balance_threshold_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs6 === errors;valid2 = valid2 || _valid0;if(!valid2){const err2 = {instancePath:instancePath+"/low_balance_threshold_minor",schemaPath:"#/properties/low_balance_threshold_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;validate286.errors = vErrors;return false;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}var valid1 = _errs2 === errors;if(valid1){if(typeof data0 === "bigint"){if(data0 < 1){validate286.errors = [{instancePath:instancePath+"/low_balance_threshold_minor",schemaPath:"#/properties/low_balance_threshold_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}else {if(data0 > 9007199254740991){validate286.errors = [{instancePath:instancePath+"/low_balance_threshold_minor",schemaPath:"#/properties/low_balance_threshold_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}}if(errors === _errs1){if((typeof data0 == "number") && (isFinite(data0))){if(data0 > 9007199254740991 || isNaN(data0)){validate286.errors = [{instancePath:instancePath+"/low_balance_threshold_minor",schemaPath:"#/properties/low_balance_threshold_minor/maximum",keyword:"maximum",params:{comparison: "<=", limit: 9007199254740991},message:"must be <= 9007199254740991"}];return false;}else {if(data0 < 1 || isNaN(data0)){validate286.errors = [{instancePath:instancePath+"/low_balance_threshold_minor",schemaPath:"#/properties/low_balance_threshold_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.email_delivery !== undefined){let data1 = data.email_delivery;const _errs7 = errors;if(typeof data1 !== "string"){validate286.errors = [{instancePath:instancePath+"/email_delivery",schemaPath:"#/properties/email_delivery/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if(!((data1 === "configured") || (data1 === "log_only"))){validate286.errors = [{instancePath:instancePath+"/email_delivery",schemaPath:"#/properties/email_delivery/enum",keyword:"enum",params:{allowedValues: schema280.properties.email_delivery.enum},message:"must be equal to one of the allowed values"}];return false;}var valid0 = _errs7 === errors;}else {var valid0 = true;}}}}else {validate286.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate286.errors = vErrors;return errors === 0;}validate286.evaluated = {"props":{"low_balance_threshold_minor":true,"email_delivery":true},"dynamicProps":false,"dynamicItems":false};exports.validate13 = validate287;const schema282 = {"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CreditPaymentMethod"}}}};const schema283 = {"type":"object","required":["id"],"properties":{"id":{"type":"string","pattern":"^pm_[A-Za-z0-9_]+$"},"brand":{"type":["string","null"],"description":"Card brand; absent for Link methods."},"last4":{"type":["string","null"],"pattern":"^[0-9]{4}$","description":"Last four card digits; absent for Link methods."},"exp_month":{"minimum":1,"maximum":12,"description":"Card expiry month; absent for Link methods.","allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1,"maximum":12}},"exp_year":{"minimum":2000,"maximum":9999,"description":"Card expiry year; absent for Link methods.","allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":2000,"maximum":9999}},"default":{"type":"boolean","description":"True for the workspace's one default saved card; absent on older services."},"priority":{"minimum":1,"description":"One-based charge order for automatic top-up; lower priorities are tried first.","allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"type":{"type":"string","x-boxrouter-open-enum":true,"description":"Payment method type. Link is a card-backed method saved through Stripe Link."},"email":{"type":"string","format":"email","description":"Link account email; present only when type is link."}},"allOf":[{"if":{"properties":{"type":{"const":"link"}},"required":["type"]},"then":{"required":["email"],"properties":{"brand":{"type":"null"},"last4":{"type":"null"},"exp_month":{"type":"null"},"exp_year":{"type":"null"}}}},{"if":{"properties":{"type":{"const":"card"}},"required":["type"]},"then":{"required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"type":"string"},"last4":{"type":"string","pattern":"^[0-9]{4}$"},"exp_month":{"minimum":1,"maximum":12,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1,"maximum":12}},"exp_year":{"minimum":2000,"maximum":9999,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":2000,"maximum":9999}}}}}]};const pattern193 = new RegExp("^pm_[A-Za-z0-9_]+$", "u");function validate288(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate288.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs1 = errors;const _errs2 = errors;let valid1 = true;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.type === undefined) && (missing0 = "type")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){if("link" !== data.type){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var _valid0 = _errs3 === errors;errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}if(_valid0){const _errs5 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((data.email === undefined) && (missing1 = "email")){validate288.errors = [{instancePath,schemaPath:"#/allOf/0/then/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data.brand !== undefined){const _errs6 = errors;if(data.brand !== null){validate288.errors = [{instancePath:instancePath+"/brand",schemaPath:"#/allOf/0/then/properties/brand/type",keyword:"type",params:{type: "null"},message:"must be null"}];return false;}var valid3 = _errs6 === errors;}else {var valid3 = true;}if(valid3){if(data.last4 !== undefined){const _errs8 = errors;if(data.last4 !== null){validate288.errors = [{instancePath:instancePath+"/last4",schemaPath:"#/allOf/0/then/properties/last4/type",keyword:"type",params:{type: "null"},message:"must be null"}];return false;}var valid3 = _errs8 === errors;}else {var valid3 = true;}if(valid3){if(data.exp_month !== undefined){const _errs10 = errors;if(data.exp_month !== null){validate288.errors = [{instancePath:instancePath+"/exp_month",schemaPath:"#/allOf/0/then/properties/exp_month/type",keyword:"type",params:{type: "null"},message:"must be null"}];return false;}var valid3 = _errs10 === errors;}else {var valid3 = true;}if(valid3){if(data.exp_year !== undefined){const _errs12 = errors;if(data.exp_year !== null){validate288.errors = [{instancePath:instancePath+"/exp_year",schemaPath:"#/allOf/0/then/properties/exp_year/type",keyword:"type",params:{type: "null"},message:"must be null"}];return false;}var valid3 = _errs12 === errors;}else {var valid3 = true;}}}}}}var _valid0 = _errs5 === errors;valid1 = _valid0;if(valid1){var props0 = {};props0.brand = true;props0.last4 = true;props0.exp_month = true;props0.exp_year = true;props0.type = true;}}if(!valid1){const err2 = {instancePath,schemaPath:"#/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;validate288.errors = vErrors;return false;}var valid0 = _errs1 === errors;if(valid0){const _errs14 = errors;const _errs15 = errors;let valid4 = true;const _errs16 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing2;if((data.type === undefined) && (missing2 = "type")){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {if(data.type !== undefined){if("card" !== data.type){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}}var _valid1 = _errs16 === errors;errors = _errs15;if(vErrors !== null){if(_errs15){vErrors.length = _errs15;}else {vErrors = null;}}if(_valid1){const _errs18 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing3;if(((((data.brand === undefined) && (missing3 = "brand")) || ((data.last4 === undefined) && (missing3 = "last4"))) || ((data.exp_month === undefined) && (missing3 = "exp_month"))) || ((data.exp_year === undefined) && (missing3 = "exp_year"))){validate288.errors = [{instancePath,schemaPath:"#/allOf/1/then/required",keyword:"required",params:{missingProperty: missing3},message:"must have required property '"+missing3+"'"}];return false;}else {if(data.brand !== undefined){const _errs19 = errors;if(typeof data.brand !== "string"){validate288.errors = [{instancePath:instancePath+"/brand",schemaPath:"#/allOf/1/then/properties/brand/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid6 = _errs19 === errors;}else {var valid6 = true;}if(valid6){if(data.last4 !== undefined){let data7 = data.last4;const _errs21 = errors;if(errors === _errs21){if(typeof data7 === "string"){if(!pattern186.test(data7)){validate288.errors = [{instancePath:instancePath+"/last4",schemaPath:"#/allOf/1/then/properties/last4/pattern",keyword:"pattern",params:{pattern: "^[0-9]{4}$"},message:"must match pattern \""+"^[0-9]{4}$"+"\""}];return false;}}else {validate288.errors = [{instancePath:instancePath+"/last4",schemaPath:"#/allOf/1/then/properties/last4/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid6 = _errs21 === errors;}else {var valid6 = true;}if(valid6){if(data.exp_month !== undefined){let data8 = data.exp_month;const _errs23 = errors;const _errs24 = errors;const _errs25 = errors;let valid8 = false;const _errs26 = errors;if(!(((typeof data8 == "number") && (!(data8 % 1) && !isNaN(data8))) && (isFinite(data8)))){const err5 = {instancePath:instancePath+"/exp_month",schemaPath:"#/allOf/1/then/properties/exp_month/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid2 = _errs26 === errors;valid8 = valid8 || _valid2;const _errs28 = errors;if(typeof data8 !== "bigint"){const err6 = {instancePath:instancePath+"/exp_month",schemaPath:"#/allOf/1/then/properties/exp_month/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid2 = _errs28 === errors;valid8 = valid8 || _valid2;if(!valid8){const err7 = {instancePath:instancePath+"/exp_month",schemaPath:"#/allOf/1/then/properties/exp_month/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;validate288.errors = vErrors;return false;}else {errors = _errs25;if(vErrors !== null){if(_errs25){vErrors.length = _errs25;}else {vErrors = null;}}}var valid7 = _errs24 === errors;if(valid7){if(typeof data8 === "bigint"){if(data8 < 1){validate288.errors = [{instancePath:instancePath+"/exp_month",schemaPath:"#/allOf/1/then/properties/exp_month/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}else {if(data8 > 12){validate288.errors = [{instancePath:instancePath+"/exp_month",schemaPath:"#/allOf/1/then/properties/exp_month/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}}if(errors === _errs23){if((typeof data8 == "number") && (isFinite(data8))){if(data8 > 12 || isNaN(data8)){validate288.errors = [{instancePath:instancePath+"/exp_month",schemaPath:"#/allOf/1/then/properties/exp_month/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"}];return false;}else {if(data8 < 1 || isNaN(data8)){validate288.errors = [{instancePath:instancePath+"/exp_month",schemaPath:"#/allOf/1/then/properties/exp_month/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}}var valid6 = _errs23 === errors;}else {var valid6 = true;}if(valid6){if(data.exp_year !== undefined){let data9 = data.exp_year;const _errs29 = errors;const _errs30 = errors;const _errs31 = errors;let valid10 = false;const _errs32 = errors;if(!(((typeof data9 == "number") && (!(data9 % 1) && !isNaN(data9))) && (isFinite(data9)))){const err8 = {instancePath:instancePath+"/exp_year",schemaPath:"#/allOf/1/then/properties/exp_year/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var _valid3 = _errs32 === errors;valid10 = valid10 || _valid3;const _errs34 = errors;if(typeof data9 !== "bigint"){const err9 = {instancePath:instancePath+"/exp_year",schemaPath:"#/allOf/1/then/properties/exp_year/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var _valid3 = _errs34 === errors;valid10 = valid10 || _valid3;if(!valid10){const err10 = {instancePath:instancePath+"/exp_year",schemaPath:"#/allOf/1/then/properties/exp_year/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;validate288.errors = vErrors;return false;}else {errors = _errs31;if(vErrors !== null){if(_errs31){vErrors.length = _errs31;}else {vErrors = null;}}}var valid9 = _errs30 === errors;if(valid9){if(typeof data9 === "bigint"){if(data9 < 2000){validate288.errors = [{instancePath:instancePath+"/exp_year",schemaPath:"#/allOf/1/then/properties/exp_year/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}else {if(data9 > 9999){validate288.errors = [{instancePath:instancePath+"/exp_year",schemaPath:"#/allOf/1/then/properties/exp_year/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}}if(errors === _errs29){if((typeof data9 == "number") && (isFinite(data9))){if(data9 > 9999 || isNaN(data9)){validate288.errors = [{instancePath:instancePath+"/exp_year",schemaPath:"#/allOf/1/then/properties/exp_year/maximum",keyword:"maximum",params:{comparison: "<=", limit: 9999},message:"must be <= 9999"}];return false;}else {if(data9 < 2000 || isNaN(data9)){validate288.errors = [{instancePath:instancePath+"/exp_year",schemaPath:"#/allOf/1/then/properties/exp_year/minimum",keyword:"minimum",params:{comparison: ">=", limit: 2000},message:"must be >= 2000"}];return false;}}}}var valid6 = _errs29 === errors;}else {var valid6 = true;}}}}}}var _valid1 = _errs18 === errors;valid4 = _valid1;if(valid4){var props1 = {};props1.brand = true;props1.last4 = true;props1.exp_month = true;props1.exp_year = true;props1.type = true;}}if(!valid4){const err11 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;validate288.errors = vErrors;return false;}var valid0 = _errs14 === errors;if(valid0){if(props0 !== true && props1 !== undefined){if(props1 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props1);}}}}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing4;if((data.id === undefined) && (missing4 = "id")){validate288.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing4},message:"must have required property '"+missing4+"'"}];return false;}else {if(props0 !== true){props0 = props0 || {};props0.id = true;props0.brand = true;props0.last4 = true;props0.exp_month = true;props0.exp_year = true;props0.default = true;props0.priority = true;props0.type = true;props0.email = true;}if(data.id !== undefined){let data10 = data.id;const _errs35 = errors;if(errors === _errs35){if(typeof data10 === "string"){if(!pattern193.test(data10)){validate288.errors = [{instancePath:instancePath+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern: "^pm_[A-Za-z0-9_]+$"},message:"must match pattern \""+"^pm_[A-Za-z0-9_]+$"+"\""}];return false;}}else {validate288.errors = [{instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid11 = _errs35 === errors;}else {var valid11 = true;}if(valid11){if(data.brand !== undefined){let data11 = data.brand;const _errs37 = errors;if((typeof data11 !== "string") && (data11 !== null)){validate288.errors = [{instancePath:instancePath+"/brand",schemaPath:"#/properties/brand/type",keyword:"type",params:{type: schema283.properties.brand.type},message:"must be string,null"}];return false;}var valid11 = _errs37 === errors;}else {var valid11 = true;}if(valid11){if(data.last4 !== undefined){let data12 = data.last4;const _errs39 = errors;if((typeof data12 !== "string") && (data12 !== null)){validate288.errors = [{instancePath:instancePath+"/last4",schemaPath:"#/properties/last4/type",keyword:"type",params:{type: schema283.properties.last4.type},message:"must be string,null"}];return false;}if(errors === _errs39){if(typeof data12 === "string"){if(!pattern186.test(data12)){validate288.errors = [{instancePath:instancePath+"/last4",schemaPath:"#/properties/last4/pattern",keyword:"pattern",params:{pattern: "^[0-9]{4}$"},message:"must match pattern \""+"^[0-9]{4}$"+"\""}];return false;}}}var valid11 = _errs39 === errors;}else {var valid11 = true;}if(valid11){if(data.exp_month !== undefined){let data13 = data.exp_month;const _errs41 = errors;const _errs42 = errors;const _errs43 = errors;let valid13 = false;const _errs44 = errors;if((!(((typeof data13 == "number") && (!(data13 % 1) && !isNaN(data13))) && (isFinite(data13)))) && (data13 !== null)){const err12 = {instancePath:instancePath+"/exp_month",schemaPath:"#/properties/exp_month/allOf/0/anyOf/0/type",keyword:"type",params:{type: schema283.properties.exp_month.allOf[0].anyOf[0].type},message:"must be integer,null"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var _valid4 = _errs44 === errors;valid13 = valid13 || _valid4;const _errs46 = errors;if(typeof data13 !== "bigint"){const err13 = {instancePath:instancePath+"/exp_month",schemaPath:"#/properties/exp_month/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid4 = _errs46 === errors;valid13 = valid13 || _valid4;if(!valid13){const err14 = {instancePath:instancePath+"/exp_month",schemaPath:"#/properties/exp_month/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate288.errors = vErrors;return false;}else {errors = _errs43;if(vErrors !== null){if(_errs43){vErrors.length = _errs43;}else {vErrors = null;}}}var valid12 = _errs42 === errors;if(valid12){if(typeof data13 === "bigint"){if(data13 < 1){validate288.errors = [{instancePath:instancePath+"/exp_month",schemaPath:"#/properties/exp_month/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}else {if(data13 > 12){validate288.errors = [{instancePath:instancePath+"/exp_month",schemaPath:"#/properties/exp_month/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}}if(errors === _errs41){if((typeof data13 == "number") && (isFinite(data13))){if(data13 > 12 || isNaN(data13)){validate288.errors = [{instancePath:instancePath+"/exp_month",schemaPath:"#/properties/exp_month/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"}];return false;}else {if(data13 < 1 || isNaN(data13)){validate288.errors = [{instancePath:instancePath+"/exp_month",schemaPath:"#/properties/exp_month/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}}var valid11 = _errs41 === errors;}else {var valid11 = true;}if(valid11){if(data.exp_year !== undefined){let data14 = data.exp_year;const _errs47 = errors;const _errs48 = errors;const _errs49 = errors;let valid15 = false;const _errs50 = errors;if((!(((typeof data14 == "number") && (!(data14 % 1) && !isNaN(data14))) && (isFinite(data14)))) && (data14 !== null)){const err15 = {instancePath:instancePath+"/exp_year",schemaPath:"#/properties/exp_year/allOf/0/anyOf/0/type",keyword:"type",params:{type: schema283.properties.exp_year.allOf[0].anyOf[0].type},message:"must be integer,null"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid5 = _errs50 === errors;valid15 = valid15 || _valid5;const _errs52 = errors;if(typeof data14 !== "bigint"){const err16 = {instancePath:instancePath+"/exp_year",schemaPath:"#/properties/exp_year/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid5 = _errs52 === errors;valid15 = valid15 || _valid5;if(!valid15){const err17 = {instancePath:instancePath+"/exp_year",schemaPath:"#/properties/exp_year/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;validate288.errors = vErrors;return false;}else {errors = _errs49;if(vErrors !== null){if(_errs49){vErrors.length = _errs49;}else {vErrors = null;}}}var valid14 = _errs48 === errors;if(valid14){if(typeof data14 === "bigint"){if(data14 < 2000){validate288.errors = [{instancePath:instancePath+"/exp_year",schemaPath:"#/properties/exp_year/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}else {if(data14 > 9999){validate288.errors = [{instancePath:instancePath+"/exp_year",schemaPath:"#/properties/exp_year/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}}if(errors === _errs47){if((typeof data14 == "number") && (isFinite(data14))){if(data14 > 9999 || isNaN(data14)){validate288.errors = [{instancePath:instancePath+"/exp_year",schemaPath:"#/properties/exp_year/maximum",keyword:"maximum",params:{comparison: "<=", limit: 9999},message:"must be <= 9999"}];return false;}else {if(data14 < 2000 || isNaN(data14)){validate288.errors = [{instancePath:instancePath+"/exp_year",schemaPath:"#/properties/exp_year/minimum",keyword:"minimum",params:{comparison: ">=", limit: 2000},message:"must be >= 2000"}];return false;}}}}var valid11 = _errs47 === errors;}else {var valid11 = true;}if(valid11){if(data.default !== undefined){const _errs53 = errors;if(typeof data.default !== "boolean"){validate288.errors = [{instancePath:instancePath+"/default",schemaPath:"#/properties/default/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid11 = _errs53 === errors;}else {var valid11 = true;}if(valid11){if(data.priority !== undefined){let data16 = data.priority;const _errs55 = errors;const _errs56 = errors;const _errs57 = errors;let valid17 = false;const _errs58 = errors;if(!(((typeof data16 == "number") && (!(data16 % 1) && !isNaN(data16))) && (isFinite(data16)))){const err18 = {instancePath:instancePath+"/priority",schemaPath:"#/properties/priority/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid6 = _errs58 === errors;valid17 = valid17 || _valid6;const _errs60 = errors;if(typeof data16 !== "bigint"){const err19 = {instancePath:instancePath+"/priority",schemaPath:"#/properties/priority/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid6 = _errs60 === errors;valid17 = valid17 || _valid6;if(!valid17){const err20 = {instancePath:instancePath+"/priority",schemaPath:"#/properties/priority/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;validate288.errors = vErrors;return false;}else {errors = _errs57;if(vErrors !== null){if(_errs57){vErrors.length = _errs57;}else {vErrors = null;}}}var valid16 = _errs56 === errors;if(valid16){if(typeof data16 === "bigint"){if(data16 < 1){validate288.errors = [{instancePath:instancePath+"/priority",schemaPath:"#/properties/priority/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs55){if((typeof data16 == "number") && (isFinite(data16))){if(data16 < 1 || isNaN(data16)){validate288.errors = [{instancePath:instancePath+"/priority",schemaPath:"#/properties/priority/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}var valid11 = _errs55 === errors;}else {var valid11 = true;}if(valid11){if(data.type !== undefined){const _errs61 = errors;if(typeof data.type !== "string"){validate288.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid11 = _errs61 === errors;}else {var valid11 = true;}if(valid11){if(data.email !== undefined){const _errs63 = errors;if(errors === _errs63){if(errors === _errs63){if(!(typeof data.email === "string")){validate288.errors = [{instancePath:instancePath+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid11 = _errs63 === errors;}else {var valid11 = true;}}}}}}}}}}}else {validate288.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate288.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate288.evaluated = {"dynamicProps":true,"dynamicItems":false};function validate287(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate287.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.data === undefined) && (missing0 = "data")){validate287.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.data !== undefined){let data0 = data.data;const _errs1 = errors;if(errors === _errs1){if(Array.isArray(data0)){var valid1 = true;const len0 = data0.length;for(let i0=0; i0<len0; i0++){const _errs3 = errors;if(!(validate288(data0[i0], {instancePath:instancePath+"/data/" + i0,parentData:data0,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate288.errors : vErrors.concat(validate288.errors);errors = vErrors.length;}var valid1 = _errs3 === errors;if(!valid1){break;}}}else {validate287.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}}}}else {validate287.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate287.errors = vErrors;return errors === 0;}validate287.evaluated = {"props":{"data":true},"dynamicProps":false,"dynamicItems":false};exports.validate14 = validate290;const schema284 = {"type":"object","required":["id","status","checkout_url"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","confirmed","canceled"],"description":"Confirmed only after Stripe reports the setup succeeded."},"checkout_url":{"type":"string","format":"uri","description":"Stripe-hosted setup page; no payment is collected."}}};function validate290(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate290.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.id === undefined) && (missing0 = "id")) || ((data.status === undefined) && (missing0 = "status"))) || ((data.checkout_url === undefined) && (missing0 = "checkout_url"))){validate290.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.id !== undefined){const _errs1 = errors;if(typeof data.id !== "string"){validate290.errors = [{instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.status !== undefined){let data1 = data.status;const _errs3 = errors;if(typeof data1 !== "string"){validate290.errors = [{instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if(!(((data1 === "pending") || (data1 === "confirmed")) || (data1 === "canceled"))){validate290.errors = [{instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues: schema284.properties.status.enum},message:"must be equal to one of the allowed values"}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.checkout_url !== undefined){const _errs5 = errors;if(errors === _errs5){if(errors === _errs5){if(!(typeof data.checkout_url === "string")){validate290.errors = [{instancePath:instancePath+"/checkout_url",schemaPath:"#/properties/checkout_url/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}else {validate290.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate290.errors = vErrors;return errors === 0;}validate290.evaluated = {"props":{"id":true,"status":true,"checkout_url":true},"dynamicProps":false,"dynamicItems":false};exports.validate15 = validate291;const schema285 = {"type":"object","required":["client_secret","publishable_key"],"properties":{"client_secret":{"type":"string","minLength":1},"publishable_key":{"type":"string","minLength":1}}};function validate291(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate291.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.client_secret === undefined) && (missing0 = "client_secret")) || ((data.publishable_key === undefined) && (missing0 = "publishable_key"))){validate291.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.client_secret !== undefined){let data0 = data.client_secret;const _errs1 = errors;if(errors === _errs1){if(typeof data0 === "string"){if(func1(data0) < 1){validate291.errors = [{instancePath:instancePath+"/client_secret",schemaPath:"#/properties/client_secret/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}else {validate291.errors = [{instancePath:instancePath+"/client_secret",schemaPath:"#/properties/client_secret/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.publishable_key !== undefined){let data1 = data.publishable_key;const _errs3 = errors;if(errors === _errs3){if(typeof data1 === "string"){if(func1(data1) < 1){validate291.errors = [{instancePath:instancePath+"/publishable_key",schemaPath:"#/properties/publishable_key/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}else {validate291.errors = [{instancePath:instancePath+"/publishable_key",schemaPath:"#/properties/publishable_key/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid0 = _errs3 === errors;}else {var valid0 = true;}}}}else {validate291.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate291.errors = vErrors;return errors === 0;}validate291.evaluated = {"props":{"client_secret":true,"publishable_key":true},"dynamicProps":false,"dynamicItems":false};exports.validate16 = validate292;function validate292(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate292.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.data === undefined) && (missing0 = "data")){validate292.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.data !== undefined){let data0 = data.data;const _errs1 = errors;if(errors === _errs1){if(Array.isArray(data0)){var valid1 = true;const len0 = data0.length;for(let i0=0; i0<len0; i0++){const _errs3 = errors;if(!(validate288(data0[i0], {instancePath:instancePath+"/data/" + i0,parentData:data0,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate288.errors : vErrors.concat(validate288.errors);errors = vErrors.length;}var valid1 = _errs3 === errors;if(!valid1){break;}}}else {validate292.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}}}}else {validate292.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate292.errors = vErrors;return errors === 0;}validate292.evaluated = {"props":{"data":true},"dynamicProps":false,"dynamicItems":false};exports.validate17 = validate294;const schema287 = {"type":"object","required":["id","status"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","confirmed","canceled"],"description":"Confirmed only after Stripe reports the setup succeeded."}}};function validate294(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate294.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.id === undefined) && (missing0 = "id")) || ((data.status === undefined) && (missing0 = "status"))){validate294.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.id !== undefined){const _errs1 = errors;if(typeof data.id !== "string"){validate294.errors = [{instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.status !== undefined){let data1 = data.status;const _errs3 = errors;if(typeof data1 !== "string"){validate294.errors = [{instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if(!(((data1 === "pending") || (data1 === "confirmed")) || (data1 === "canceled"))){validate294.errors = [{instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues: schema287.properties.status.enum},message:"must be equal to one of the allowed values"}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}}}}else {validate294.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate294.errors = vErrors;return errors === 0;}validate294.evaluated = {"props":{"id":true,"status":true},"dynamicProps":false,"dynamicItems":false};exports.validate18 = validate295;function validate295(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate295.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs1 = errors;const _errs2 = errors;let valid1 = true;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.type === undefined) && (missing0 = "type")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){if("link" !== data.type){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var _valid0 = _errs3 === errors;errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}if(_valid0){const _errs5 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((data.email === undefined) && (missing1 = "email")){validate295.errors = [{instancePath,schemaPath:"#/allOf/0/then/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data.brand !== undefined){const _errs6 = errors;if(data.brand !== null){validate295.errors = [{instancePath:instancePath+"/brand",schemaPath:"#/allOf/0/then/properties/brand/type",keyword:"type",params:{type: "null"},message:"must be null"}];return false;}var valid3 = _errs6 === errors;}else {var valid3 = true;}if(valid3){if(data.last4 !== undefined){const _errs8 = errors;if(data.last4 !== null){validate295.errors = [{instancePath:instancePath+"/last4",schemaPath:"#/allOf/0/then/properties/last4/type",keyword:"type",params:{type: "null"},message:"must be null"}];return false;}var valid3 = _errs8 === errors;}else {var valid3 = true;}if(valid3){if(data.exp_month !== undefined){const _errs10 = errors;if(data.exp_month !== null){validate295.errors = [{instancePath:instancePath+"/exp_month",schemaPath:"#/allOf/0/then/properties/exp_month/type",keyword:"type",params:{type: "null"},message:"must be null"}];return false;}var valid3 = _errs10 === errors;}else {var valid3 = true;}if(valid3){if(data.exp_year !== undefined){const _errs12 = errors;if(data.exp_year !== null){validate295.errors = [{instancePath:instancePath+"/exp_year",schemaPath:"#/allOf/0/then/properties/exp_year/type",keyword:"type",params:{type: "null"},message:"must be null"}];return false;}var valid3 = _errs12 === errors;}else {var valid3 = true;}}}}}}var _valid0 = _errs5 === errors;valid1 = _valid0;if(valid1){var props0 = {};props0.brand = true;props0.last4 = true;props0.exp_month = true;props0.exp_year = true;props0.type = true;}}if(!valid1){const err2 = {instancePath,schemaPath:"#/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;validate295.errors = vErrors;return false;}var valid0 = _errs1 === errors;if(valid0){const _errs14 = errors;const _errs15 = errors;let valid4 = true;const _errs16 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing2;if((data.type === undefined) && (missing2 = "type")){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {if(data.type !== undefined){if("card" !== data.type){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}}var _valid1 = _errs16 === errors;errors = _errs15;if(vErrors !== null){if(_errs15){vErrors.length = _errs15;}else {vErrors = null;}}if(_valid1){const _errs18 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing3;if(((((data.brand === undefined) && (missing3 = "brand")) || ((data.last4 === undefined) && (missing3 = "last4"))) || ((data.exp_month === undefined) && (missing3 = "exp_month"))) || ((data.exp_year === undefined) && (missing3 = "exp_year"))){validate295.errors = [{instancePath,schemaPath:"#/allOf/1/then/required",keyword:"required",params:{missingProperty: missing3},message:"must have required property '"+missing3+"'"}];return false;}else {if(data.brand !== undefined){const _errs19 = errors;if(typeof data.brand !== "string"){validate295.errors = [{instancePath:instancePath+"/brand",schemaPath:"#/allOf/1/then/properties/brand/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid6 = _errs19 === errors;}else {var valid6 = true;}if(valid6){if(data.last4 !== undefined){let data7 = data.last4;const _errs21 = errors;if(errors === _errs21){if(typeof data7 === "string"){if(!pattern186.test(data7)){validate295.errors = [{instancePath:instancePath+"/last4",schemaPath:"#/allOf/1/then/properties/last4/pattern",keyword:"pattern",params:{pattern: "^[0-9]{4}$"},message:"must match pattern \""+"^[0-9]{4}$"+"\""}];return false;}}else {validate295.errors = [{instancePath:instancePath+"/last4",schemaPath:"#/allOf/1/then/properties/last4/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid6 = _errs21 === errors;}else {var valid6 = true;}if(valid6){if(data.exp_month !== undefined){let data8 = data.exp_month;const _errs23 = errors;const _errs24 = errors;const _errs25 = errors;let valid8 = false;const _errs26 = errors;if(!(((typeof data8 == "number") && (!(data8 % 1) && !isNaN(data8))) && (isFinite(data8)))){const err5 = {instancePath:instancePath+"/exp_month",schemaPath:"#/allOf/1/then/properties/exp_month/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid2 = _errs26 === errors;valid8 = valid8 || _valid2;const _errs28 = errors;if(typeof data8 !== "bigint"){const err6 = {instancePath:instancePath+"/exp_month",schemaPath:"#/allOf/1/then/properties/exp_month/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid2 = _errs28 === errors;valid8 = valid8 || _valid2;if(!valid8){const err7 = {instancePath:instancePath+"/exp_month",schemaPath:"#/allOf/1/then/properties/exp_month/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;validate295.errors = vErrors;return false;}else {errors = _errs25;if(vErrors !== null){if(_errs25){vErrors.length = _errs25;}else {vErrors = null;}}}var valid7 = _errs24 === errors;if(valid7){if(typeof data8 === "bigint"){if(data8 < 1){validate295.errors = [{instancePath:instancePath+"/exp_month",schemaPath:"#/allOf/1/then/properties/exp_month/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}else {if(data8 > 12){validate295.errors = [{instancePath:instancePath+"/exp_month",schemaPath:"#/allOf/1/then/properties/exp_month/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}}if(errors === _errs23){if((typeof data8 == "number") && (isFinite(data8))){if(data8 > 12 || isNaN(data8)){validate295.errors = [{instancePath:instancePath+"/exp_month",schemaPath:"#/allOf/1/then/properties/exp_month/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"}];return false;}else {if(data8 < 1 || isNaN(data8)){validate295.errors = [{instancePath:instancePath+"/exp_month",schemaPath:"#/allOf/1/then/properties/exp_month/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}}var valid6 = _errs23 === errors;}else {var valid6 = true;}if(valid6){if(data.exp_year !== undefined){let data9 = data.exp_year;const _errs29 = errors;const _errs30 = errors;const _errs31 = errors;let valid10 = false;const _errs32 = errors;if(!(((typeof data9 == "number") && (!(data9 % 1) && !isNaN(data9))) && (isFinite(data9)))){const err8 = {instancePath:instancePath+"/exp_year",schemaPath:"#/allOf/1/then/properties/exp_year/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var _valid3 = _errs32 === errors;valid10 = valid10 || _valid3;const _errs34 = errors;if(typeof data9 !== "bigint"){const err9 = {instancePath:instancePath+"/exp_year",schemaPath:"#/allOf/1/then/properties/exp_year/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var _valid3 = _errs34 === errors;valid10 = valid10 || _valid3;if(!valid10){const err10 = {instancePath:instancePath+"/exp_year",schemaPath:"#/allOf/1/then/properties/exp_year/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;validate295.errors = vErrors;return false;}else {errors = _errs31;if(vErrors !== null){if(_errs31){vErrors.length = _errs31;}else {vErrors = null;}}}var valid9 = _errs30 === errors;if(valid9){if(typeof data9 === "bigint"){if(data9 < 2000){validate295.errors = [{instancePath:instancePath+"/exp_year",schemaPath:"#/allOf/1/then/properties/exp_year/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}else {if(data9 > 9999){validate295.errors = [{instancePath:instancePath+"/exp_year",schemaPath:"#/allOf/1/then/properties/exp_year/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}}if(errors === _errs29){if((typeof data9 == "number") && (isFinite(data9))){if(data9 > 9999 || isNaN(data9)){validate295.errors = [{instancePath:instancePath+"/exp_year",schemaPath:"#/allOf/1/then/properties/exp_year/maximum",keyword:"maximum",params:{comparison: "<=", limit: 9999},message:"must be <= 9999"}];return false;}else {if(data9 < 2000 || isNaN(data9)){validate295.errors = [{instancePath:instancePath+"/exp_year",schemaPath:"#/allOf/1/then/properties/exp_year/minimum",keyword:"minimum",params:{comparison: ">=", limit: 2000},message:"must be >= 2000"}];return false;}}}}var valid6 = _errs29 === errors;}else {var valid6 = true;}}}}}}var _valid1 = _errs18 === errors;valid4 = _valid1;if(valid4){var props1 = {};props1.brand = true;props1.last4 = true;props1.exp_month = true;props1.exp_year = true;props1.type = true;}}if(!valid4){const err11 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;validate295.errors = vErrors;return false;}var valid0 = _errs14 === errors;if(valid0){if(props0 !== true && props1 !== undefined){if(props1 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props1);}}}}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing4;if((data.id === undefined) && (missing4 = "id")){validate295.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing4},message:"must have required property '"+missing4+"'"}];return false;}else {if(props0 !== true){props0 = props0 || {};props0.id = true;props0.brand = true;props0.last4 = true;props0.exp_month = true;props0.exp_year = true;props0.default = true;props0.priority = true;props0.type = true;props0.email = true;}if(data.id !== undefined){let data10 = data.id;const _errs35 = errors;if(errors === _errs35){if(typeof data10 === "string"){if(!pattern193.test(data10)){validate295.errors = [{instancePath:instancePath+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern: "^pm_[A-Za-z0-9_]+$"},message:"must match pattern \""+"^pm_[A-Za-z0-9_]+$"+"\""}];return false;}}else {validate295.errors = [{instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid11 = _errs35 === errors;}else {var valid11 = true;}if(valid11){if(data.brand !== undefined){let data11 = data.brand;const _errs37 = errors;if((typeof data11 !== "string") && (data11 !== null)){validate295.errors = [{instancePath:instancePath+"/brand",schemaPath:"#/properties/brand/type",keyword:"type",params:{type: schema283.properties.brand.type},message:"must be string,null"}];return false;}var valid11 = _errs37 === errors;}else {var valid11 = true;}if(valid11){if(data.last4 !== undefined){let data12 = data.last4;const _errs39 = errors;if((typeof data12 !== "string") && (data12 !== null)){validate295.errors = [{instancePath:instancePath+"/last4",schemaPath:"#/properties/last4/type",keyword:"type",params:{type: schema283.properties.last4.type},message:"must be string,null"}];return false;}if(errors === _errs39){if(typeof data12 === "string"){if(!pattern186.test(data12)){validate295.errors = [{instancePath:instancePath+"/last4",schemaPath:"#/properties/last4/pattern",keyword:"pattern",params:{pattern: "^[0-9]{4}$"},message:"must match pattern \""+"^[0-9]{4}$"+"\""}];return false;}}}var valid11 = _errs39 === errors;}else {var valid11 = true;}if(valid11){if(data.exp_month !== undefined){let data13 = data.exp_month;const _errs41 = errors;const _errs42 = errors;const _errs43 = errors;let valid13 = false;const _errs44 = errors;if((!(((typeof data13 == "number") && (!(data13 % 1) && !isNaN(data13))) && (isFinite(data13)))) && (data13 !== null)){const err12 = {instancePath:instancePath+"/exp_month",schemaPath:"#/properties/exp_month/allOf/0/anyOf/0/type",keyword:"type",params:{type: schema283.properties.exp_month.allOf[0].anyOf[0].type},message:"must be integer,null"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var _valid4 = _errs44 === errors;valid13 = valid13 || _valid4;const _errs46 = errors;if(typeof data13 !== "bigint"){const err13 = {instancePath:instancePath+"/exp_month",schemaPath:"#/properties/exp_month/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid4 = _errs46 === errors;valid13 = valid13 || _valid4;if(!valid13){const err14 = {instancePath:instancePath+"/exp_month",schemaPath:"#/properties/exp_month/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate295.errors = vErrors;return false;}else {errors = _errs43;if(vErrors !== null){if(_errs43){vErrors.length = _errs43;}else {vErrors = null;}}}var valid12 = _errs42 === errors;if(valid12){if(typeof data13 === "bigint"){if(data13 < 1){validate295.errors = [{instancePath:instancePath+"/exp_month",schemaPath:"#/properties/exp_month/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}else {if(data13 > 12){validate295.errors = [{instancePath:instancePath+"/exp_month",schemaPath:"#/properties/exp_month/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}}if(errors === _errs41){if((typeof data13 == "number") && (isFinite(data13))){if(data13 > 12 || isNaN(data13)){validate295.errors = [{instancePath:instancePath+"/exp_month",schemaPath:"#/properties/exp_month/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"}];return false;}else {if(data13 < 1 || isNaN(data13)){validate295.errors = [{instancePath:instancePath+"/exp_month",schemaPath:"#/properties/exp_month/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}}var valid11 = _errs41 === errors;}else {var valid11 = true;}if(valid11){if(data.exp_year !== undefined){let data14 = data.exp_year;const _errs47 = errors;const _errs48 = errors;const _errs49 = errors;let valid15 = false;const _errs50 = errors;if((!(((typeof data14 == "number") && (!(data14 % 1) && !isNaN(data14))) && (isFinite(data14)))) && (data14 !== null)){const err15 = {instancePath:instancePath+"/exp_year",schemaPath:"#/properties/exp_year/allOf/0/anyOf/0/type",keyword:"type",params:{type: schema283.properties.exp_year.allOf[0].anyOf[0].type},message:"must be integer,null"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid5 = _errs50 === errors;valid15 = valid15 || _valid5;const _errs52 = errors;if(typeof data14 !== "bigint"){const err16 = {instancePath:instancePath+"/exp_year",schemaPath:"#/properties/exp_year/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid5 = _errs52 === errors;valid15 = valid15 || _valid5;if(!valid15){const err17 = {instancePath:instancePath+"/exp_year",schemaPath:"#/properties/exp_year/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;validate295.errors = vErrors;return false;}else {errors = _errs49;if(vErrors !== null){if(_errs49){vErrors.length = _errs49;}else {vErrors = null;}}}var valid14 = _errs48 === errors;if(valid14){if(typeof data14 === "bigint"){if(data14 < 2000){validate295.errors = [{instancePath:instancePath+"/exp_year",schemaPath:"#/properties/exp_year/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}else {if(data14 > 9999){validate295.errors = [{instancePath:instancePath+"/exp_year",schemaPath:"#/properties/exp_year/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}}if(errors === _errs47){if((typeof data14 == "number") && (isFinite(data14))){if(data14 > 9999 || isNaN(data14)){validate295.errors = [{instancePath:instancePath+"/exp_year",schemaPath:"#/properties/exp_year/maximum",keyword:"maximum",params:{comparison: "<=", limit: 9999},message:"must be <= 9999"}];return false;}else {if(data14 < 2000 || isNaN(data14)){validate295.errors = [{instancePath:instancePath+"/exp_year",schemaPath:"#/properties/exp_year/minimum",keyword:"minimum",params:{comparison: ">=", limit: 2000},message:"must be >= 2000"}];return false;}}}}var valid11 = _errs47 === errors;}else {var valid11 = true;}if(valid11){if(data.default !== undefined){const _errs53 = errors;if(typeof data.default !== "boolean"){validate295.errors = [{instancePath:instancePath+"/default",schemaPath:"#/properties/default/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid11 = _errs53 === errors;}else {var valid11 = true;}if(valid11){if(data.priority !== undefined){let data16 = data.priority;const _errs55 = errors;const _errs56 = errors;const _errs57 = errors;let valid17 = false;const _errs58 = errors;if(!(((typeof data16 == "number") && (!(data16 % 1) && !isNaN(data16))) && (isFinite(data16)))){const err18 = {instancePath:instancePath+"/priority",schemaPath:"#/properties/priority/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid6 = _errs58 === errors;valid17 = valid17 || _valid6;const _errs60 = errors;if(typeof data16 !== "bigint"){const err19 = {instancePath:instancePath+"/priority",schemaPath:"#/properties/priority/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid6 = _errs60 === errors;valid17 = valid17 || _valid6;if(!valid17){const err20 = {instancePath:instancePath+"/priority",schemaPath:"#/properties/priority/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;validate295.errors = vErrors;return false;}else {errors = _errs57;if(vErrors !== null){if(_errs57){vErrors.length = _errs57;}else {vErrors = null;}}}var valid16 = _errs56 === errors;if(valid16){if(typeof data16 === "bigint"){if(data16 < 1){validate295.errors = [{instancePath:instancePath+"/priority",schemaPath:"#/properties/priority/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs55){if((typeof data16 == "number") && (isFinite(data16))){if(data16 < 1 || isNaN(data16)){validate295.errors = [{instancePath:instancePath+"/priority",schemaPath:"#/properties/priority/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}var valid11 = _errs55 === errors;}else {var valid11 = true;}if(valid11){if(data.type !== undefined){const _errs61 = errors;if(typeof data.type !== "string"){validate295.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid11 = _errs61 === errors;}else {var valid11 = true;}if(valid11){if(data.email !== undefined){const _errs63 = errors;if(errors === _errs63){if(errors === _errs63){if(!(typeof data.email === "string")){validate295.errors = [{instancePath:instancePath+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid11 = _errs63 === errors;}else {var valid11 = true;}}}}}}}}}}}else {validate295.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate295.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate295.evaluated = {"dynamicProps":true,"dynamicItems":false};exports.validate19 = validate296;const schema289 = {"type":"object","required":["enabled","threshold_minor","amount_minor","email_delivery"],"properties":{"enabled":{"type":"boolean"},"threshold_minor":{"minimum":0,"description":"Start one top-up when available credit falls below this US-cent trigger level; null until configured.","allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"amount_minor":{"minimum":1,"description":"Top-up in whole US cents, within current purchase_bounds_minor; null until configured.","allOf":[{"anyOf":[{"type":["integer","null"]},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}},"last_attempt":{"type":"object","required":["purchase_id","status","at"],"properties":{"purchase_id":{"type":"string"},"status":{"type":"string","enum":["pending","confirmed","failed"]},"at":{"type":"string","format":"date-time"},"fallback_card":{"$ref":"#/components/schemas/MaskedCreditCard","description":"Set when a payment method after the first in priority order was charged; Link methods include their account email."}},"description":"Most recent top-up attempt, if one has been made."},"disabled_reason":{"type":"string","x-boxrouter-open-enum":true,"description":"Why auto top-up was disabled after a decline, required authentication, or removal of the last saved card."},"email_delivery":{"type":"string","enum":["configured","log_only"],"description":"Whether SMTP and a verified workspace-owner address are configured for auto-top-up failure notices; configured does not guarantee successful delivery."}},"allOf":[{"if":{"properties":{"enabled":{"const":true}},"required":["enabled"]},"then":{"properties":{"threshold_minor":{"minimum":0,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":0}},"amount_minor":{"minimum":1,"allOf":[{"anyOf":[{"type":"integer"},{"x-boxrouter-bigint":true}]}],"x-boxrouter-bigint-range":{"minimum":1}}},"not":{"required":["disabled_reason"],"properties":{"disabled_reason":true}}}}]};const schema290 = {"type":"object","properties":{"brand":{"type":["string","null"],"description":"Card brand; absent for Link methods."},"last4":{"type":["string","null"],"pattern":"^[0-9]{4}$","description":"Last four card digits; absent for Link methods."},"type":{"type":"string","x-boxrouter-open-enum":true},"email":{"type":"string","format":"email","description":"Link account email; present only when type is link."}},"allOf":[{"if":{"properties":{"type":{"const":"link"}},"required":["type"]},"then":{"required":["email"],"properties":{"brand":{"type":"null"},"last4":{"type":"null"}}}},{"if":{"properties":{"type":{"const":"card"}},"required":["type"]},"then":{"required":["brand","last4"],"properties":{"brand":{"type":"string"},"last4":{"type":"string","pattern":"^[0-9]{4}$"}}}}]};function validate297(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate297.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs1 = errors;const _errs2 = errors;let valid1 = true;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.type === undefined) && (missing0 = "type")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){if("link" !== data.type){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var _valid0 = _errs3 === errors;errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}if(_valid0){const _errs5 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((data.email === undefined) && (missing1 = "email")){validate297.errors = [{instancePath,schemaPath:"#/allOf/0/then/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data.brand !== undefined){const _errs6 = errors;if(data.brand !== null){validate297.errors = [{instancePath:instancePath+"/brand",schemaPath:"#/allOf/0/then/properties/brand/type",keyword:"type",params:{type: "null"},message:"must be null"}];return false;}var valid3 = _errs6 === errors;}else {var valid3 = true;}if(valid3){if(data.last4 !== undefined){const _errs8 = errors;if(data.last4 !== null){validate297.errors = [{instancePath:instancePath+"/last4",schemaPath:"#/allOf/0/then/properties/last4/type",keyword:"type",params:{type: "null"},message:"must be null"}];return false;}var valid3 = _errs8 === errors;}else {var valid3 = true;}}}}var _valid0 = _errs5 === errors;valid1 = _valid0;if(valid1){var props0 = {};props0.brand = true;props0.last4 = true;props0.type = true;}}if(!valid1){const err2 = {instancePath,schemaPath:"#/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;validate297.errors = vErrors;return false;}var valid0 = _errs1 === errors;if(valid0){const _errs10 = errors;const _errs11 = errors;let valid4 = true;const _errs12 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing2;if((data.type === undefined) && (missing2 = "type")){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {if(data.type !== undefined){if("card" !== data.type){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}}var _valid1 = _errs12 === errors;errors = _errs11;if(vErrors !== null){if(_errs11){vErrors.length = _errs11;}else {vErrors = null;}}if(_valid1){const _errs14 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing3;if(((data.brand === undefined) && (missing3 = "brand")) || ((data.last4 === undefined) && (missing3 = "last4"))){validate297.errors = [{instancePath,schemaPath:"#/allOf/1/then/required",keyword:"required",params:{missingProperty: missing3},message:"must have required property '"+missing3+"'"}];return false;}else {if(data.brand !== undefined){const _errs15 = errors;if(typeof data.brand !== "string"){validate297.errors = [{instancePath:instancePath+"/brand",schemaPath:"#/allOf/1/then/properties/brand/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid6 = _errs15 === errors;}else {var valid6 = true;}if(valid6){if(data.last4 !== undefined){let data5 = data.last4;const _errs17 = errors;if(errors === _errs17){if(typeof data5 === "string"){if(!pattern186.test(data5)){validate297.errors = [{instancePath:instancePath+"/last4",schemaPath:"#/allOf/1/then/properties/last4/pattern",keyword:"pattern",params:{pattern: "^[0-9]{4}$"},message:"must match pattern \""+"^[0-9]{4}$"+"\""}];return false;}}else {validate297.errors = [{instancePath:instancePath+"/last4",schemaPath:"#/allOf/1/then/properties/last4/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid6 = _errs17 === errors;}else {var valid6 = true;}}}}var _valid1 = _errs14 === errors;valid4 = _valid1;if(valid4){var props1 = {};props1.brand = true;props1.last4 = true;props1.type = true;}}if(!valid4){const err5 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;validate297.errors = vErrors;return false;}var valid0 = _errs10 === errors;if(valid0){if(props0 !== true && props1 !== undefined){if(props1 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props1);}}}}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){if(props0 !== true){props0 = props0 || {};props0.brand = true;props0.last4 = true;props0.type = true;props0.email = true;}if(data.brand !== undefined){let data6 = data.brand;const _errs19 = errors;if((typeof data6 !== "string") && (data6 !== null)){validate297.errors = [{instancePath:instancePath+"/brand",schemaPath:"#/properties/brand/type",keyword:"type",params:{type: schema290.properties.brand.type},message:"must be string,null"}];return false;}var valid7 = _errs19 === errors;}else {var valid7 = true;}if(valid7){if(data.last4 !== undefined){let data7 = data.last4;const _errs21 = errors;if((typeof data7 !== "string") && (data7 !== null)){validate297.errors = [{instancePath:instancePath+"/last4",schemaPath:"#/properties/last4/type",keyword:"type",params:{type: schema290.properties.last4.type},message:"must be string,null"}];return false;}if(errors === _errs21){if(typeof data7 === "string"){if(!pattern186.test(data7)){validate297.errors = [{instancePath:instancePath+"/last4",schemaPath:"#/properties/last4/pattern",keyword:"pattern",params:{pattern: "^[0-9]{4}$"},message:"must match pattern \""+"^[0-9]{4}$"+"\""}];return false;}}}var valid7 = _errs21 === errors;}else {var valid7 = true;}if(valid7){if(data.type !== undefined){const _errs23 = errors;if(typeof data.type !== "string"){validate297.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid7 = _errs23 === errors;}else {var valid7 = true;}if(valid7){if(data.email !== undefined){const _errs25 = errors;if(errors === _errs25){if(errors === _errs25){if(!(typeof data.email === "string")){validate297.errors = [{instancePath:instancePath+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid7 = _errs25 === errors;}else {var valid7 = true;}}}}}else {validate297.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate297.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate297.evaluated = {"dynamicProps":true,"dynamicItems":false};function validate296(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate296.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs2 = errors;let valid1 = true;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.enabled === undefined) && (missing0 = "enabled")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.enabled !== undefined){if(true !== data.enabled){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var _valid0 = _errs3 === errors;errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}if(_valid0){const _errs5 = errors;const _errs6 = errors;const _errs7 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((data.disabled_reason === undefined) && (missing1 = "disabled_reason")){const err2 = {};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var valid3 = _errs7 === errors;if(valid3){validate296.errors = [{instancePath,schemaPath:"#/allOf/0/then/not",keyword:"not",params:{},message:"must NOT be valid"}];return false;}else {errors = _errs6;if(vErrors !== null){if(_errs6){vErrors.length = _errs6;}else {vErrors = null;}}}if(errors === _errs5){if(data && typeof data == "object" && !Array.isArray(data)){if(data.threshold_minor !== undefined){let data1 = data.threshold_minor;const _errs8 = errors;const _errs9 = errors;const _errs10 = errors;let valid6 = false;const _errs11 = errors;if(!(((typeof data1 == "number") && (!(data1 % 1) && !isNaN(data1))) && (isFinite(data1)))){const err3 = {instancePath:instancePath+"/threshold_minor",schemaPath:"#/allOf/0/then/properties/threshold_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid1 = _errs11 === errors;valid6 = valid6 || _valid1;const _errs13 = errors;if(typeof data1 !== "bigint"){const err4 = {instancePath:instancePath+"/threshold_minor",schemaPath:"#/allOf/0/then/properties/threshold_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid1 = _errs13 === errors;valid6 = valid6 || _valid1;if(!valid6){const err5 = {instancePath:instancePath+"/threshold_minor",schemaPath:"#/allOf/0/then/properties/threshold_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;validate296.errors = vErrors;return false;}else {errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}}var valid5 = _errs9 === errors;if(valid5){if(typeof data1 === "bigint"){if(data1 < 0){validate296.errors = [{instancePath:instancePath+"/threshold_minor",schemaPath:"#/allOf/0/then/properties/threshold_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs8){if((typeof data1 == "number") && (isFinite(data1))){if(data1 < 0 || isNaN(data1)){validate296.errors = [{instancePath:instancePath+"/threshold_minor",schemaPath:"#/allOf/0/then/properties/threshold_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid4 = _errs8 === errors;}else {var valid4 = true;}if(valid4){if(data.amount_minor !== undefined){let data2 = data.amount_minor;const _errs14 = errors;const _errs15 = errors;const _errs16 = errors;let valid8 = false;const _errs17 = errors;if(!(((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))){const err6 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/allOf/0/then/properties/amount_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid2 = _errs17 === errors;valid8 = valid8 || _valid2;const _errs19 = errors;if(typeof data2 !== "bigint"){const err7 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/allOf/0/then/properties/amount_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid2 = _errs19 === errors;valid8 = valid8 || _valid2;if(!valid8){const err8 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/allOf/0/then/properties/amount_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;validate296.errors = vErrors;return false;}else {errors = _errs16;if(vErrors !== null){if(_errs16){vErrors.length = _errs16;}else {vErrors = null;}}}var valid7 = _errs15 === errors;if(valid7){if(typeof data2 === "bigint"){if(data2 < 1){validate296.errors = [{instancePath:instancePath+"/amount_minor",schemaPath:"#/allOf/0/then/properties/amount_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs14){if((typeof data2 == "number") && (isFinite(data2))){if(data2 < 1 || isNaN(data2)){validate296.errors = [{instancePath:instancePath+"/amount_minor",schemaPath:"#/allOf/0/then/properties/amount_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}var valid4 = _errs14 === errors;}else {var valid4 = true;}}}}var _valid0 = _errs5 === errors;valid1 = _valid0;if(valid1){var props0 = {};props0.threshold_minor = true;props0.amount_minor = true;props0.enabled = true;}}if(!valid1){const err9 = {instancePath,schemaPath:"#/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;validate296.errors = vErrors;return false;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing2;if(((((data.enabled === undefined) && (missing2 = "enabled")) || ((data.threshold_minor === undefined) && (missing2 = "threshold_minor"))) || ((data.amount_minor === undefined) && (missing2 = "amount_minor"))) || ((data.email_delivery === undefined) && (missing2 = "email_delivery"))){validate296.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"}];return false;}else {if(props0 !== true){props0 = props0 || {};props0.enabled = true;props0.threshold_minor = true;props0.amount_minor = true;props0.last_attempt = true;props0.disabled_reason = true;props0.email_delivery = true;}if(data.enabled !== undefined){const _errs20 = errors;if(typeof data.enabled !== "boolean"){validate296.errors = [{instancePath:instancePath+"/enabled",schemaPath:"#/properties/enabled/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid9 = _errs20 === errors;}else {var valid9 = true;}if(valid9){if(data.threshold_minor !== undefined){let data4 = data.threshold_minor;const _errs22 = errors;const _errs23 = errors;const _errs24 = errors;let valid11 = false;const _errs25 = errors;if((!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))) && (data4 !== null)){const err10 = {instancePath:instancePath+"/threshold_minor",schemaPath:"#/properties/threshold_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: schema289.properties.threshold_minor.allOf[0].anyOf[0].type},message:"must be integer,null"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var _valid3 = _errs25 === errors;valid11 = valid11 || _valid3;const _errs27 = errors;if(typeof data4 !== "bigint"){const err11 = {instancePath:instancePath+"/threshold_minor",schemaPath:"#/properties/threshold_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var _valid3 = _errs27 === errors;valid11 = valid11 || _valid3;if(!valid11){const err12 = {instancePath:instancePath+"/threshold_minor",schemaPath:"#/properties/threshold_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;validate296.errors = vErrors;return false;}else {errors = _errs24;if(vErrors !== null){if(_errs24){vErrors.length = _errs24;}else {vErrors = null;}}}var valid10 = _errs23 === errors;if(valid10){if(typeof data4 === "bigint"){if(data4 < 0){validate296.errors = [{instancePath:instancePath+"/threshold_minor",schemaPath:"#/properties/threshold_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs22){if((typeof data4 == "number") && (isFinite(data4))){if(data4 < 0 || isNaN(data4)){validate296.errors = [{instancePath:instancePath+"/threshold_minor",schemaPath:"#/properties/threshold_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid9 = _errs22 === errors;}else {var valid9 = true;}if(valid9){if(data.amount_minor !== undefined){let data5 = data.amount_minor;const _errs28 = errors;const _errs29 = errors;const _errs30 = errors;let valid13 = false;const _errs31 = errors;if((!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))) && (data5 !== null)){const err13 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: schema289.properties.amount_minor.allOf[0].anyOf[0].type},message:"must be integer,null"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid4 = _errs31 === errors;valid13 = valid13 || _valid4;const _errs33 = errors;if(typeof data5 !== "bigint"){const err14 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}var _valid4 = _errs33 === errors;valid13 = valid13 || _valid4;if(!valid13){const err15 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;validate296.errors = vErrors;return false;}else {errors = _errs30;if(vErrors !== null){if(_errs30){vErrors.length = _errs30;}else {vErrors = null;}}}var valid12 = _errs29 === errors;if(valid12){if(typeof data5 === "bigint"){if(data5 < 1){validate296.errors = [{instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs28){if((typeof data5 == "number") && (isFinite(data5))){if(data5 < 1 || isNaN(data5)){validate296.errors = [{instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}var valid9 = _errs28 === errors;}else {var valid9 = true;}if(valid9){if(data.last_attempt !== undefined){let data6 = data.last_attempt;const _errs34 = errors;if(errors === _errs34){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing3;if((((data6.purchase_id === undefined) && (missing3 = "purchase_id")) || ((data6.status === undefined) && (missing3 = "status"))) || ((data6.at === undefined) && (missing3 = "at"))){validate296.errors = [{instancePath:instancePath+"/last_attempt",schemaPath:"#/properties/last_attempt/required",keyword:"required",params:{missingProperty: missing3},message:"must have required property '"+missing3+"'"}];return false;}else {if(data6.purchase_id !== undefined){const _errs36 = errors;if(typeof data6.purchase_id !== "string"){validate296.errors = [{instancePath:instancePath+"/last_attempt/purchase_id",schemaPath:"#/properties/last_attempt/properties/purchase_id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid14 = _errs36 === errors;}else {var valid14 = true;}if(valid14){if(data6.status !== undefined){let data8 = data6.status;const _errs38 = errors;if(typeof data8 !== "string"){validate296.errors = [{instancePath:instancePath+"/last_attempt/status",schemaPath:"#/properties/last_attempt/properties/status/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if(!(((data8 === "pending") || (data8 === "confirmed")) || (data8 === "failed"))){validate296.errors = [{instancePath:instancePath+"/last_attempt/status",schemaPath:"#/properties/last_attempt/properties/status/enum",keyword:"enum",params:{allowedValues: schema289.properties.last_attempt.properties.status.enum},message:"must be equal to one of the allowed values"}];return false;}var valid14 = _errs38 === errors;}else {var valid14 = true;}if(valid14){if(data6.at !== undefined){let data9 = data6.at;const _errs40 = errors;if(errors === _errs40){if(errors === _errs40){if(typeof data9 === "string"){if(!(formats0.validate(data9))){validate296.errors = [{instancePath:instancePath+"/last_attempt/at",schemaPath:"#/properties/last_attempt/properties/at/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate296.errors = [{instancePath:instancePath+"/last_attempt/at",schemaPath:"#/properties/last_attempt/properties/at/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid14 = _errs40 === errors;}else {var valid14 = true;}if(valid14){if(data6.fallback_card !== undefined){const _errs42 = errors;if(!(validate297(data6.fallback_card, {instancePath:instancePath+"/last_attempt/fallback_card",parentData:data6,parentDataProperty:"fallback_card",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate297.errors : vErrors.concat(validate297.errors);errors = vErrors.length;}var valid14 = _errs42 === errors;}else {var valid14 = true;}}}}}}else {validate296.errors = [{instancePath:instancePath+"/last_attempt",schemaPath:"#/properties/last_attempt/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid9 = _errs34 === errors;}else {var valid9 = true;}if(valid9){if(data.disabled_reason !== undefined){const _errs43 = errors;if(typeof data.disabled_reason !== "string"){validate296.errors = [{instancePath:instancePath+"/disabled_reason",schemaPath:"#/properties/disabled_reason/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid9 = _errs43 === errors;}else {var valid9 = true;}if(valid9){if(data.email_delivery !== undefined){let data12 = data.email_delivery;const _errs45 = errors;if(typeof data12 !== "string"){validate296.errors = [{instancePath:instancePath+"/email_delivery",schemaPath:"#/properties/email_delivery/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if(!((data12 === "configured") || (data12 === "log_only"))){validate296.errors = [{instancePath:instancePath+"/email_delivery",schemaPath:"#/properties/email_delivery/enum",keyword:"enum",params:{allowedValues: schema289.properties.email_delivery.enum},message:"must be equal to one of the allowed values"}];return false;}var valid9 = _errs45 === errors;}else {var valid9 = true;}}}}}}}}else {validate296.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate296.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate296.evaluated = {"dynamicProps":true,"dynamicItems":false};exports.validate20 = validate299;function validate299(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate299.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs2 = errors;let valid1 = true;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.enabled === undefined) && (missing0 = "enabled")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.enabled !== undefined){if(true !== data.enabled){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}var _valid0 = _errs3 === errors;errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}if(_valid0){const _errs5 = errors;const _errs6 = errors;const _errs7 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((data.disabled_reason === undefined) && (missing1 = "disabled_reason")){const err2 = {};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var valid3 = _errs7 === errors;if(valid3){validate299.errors = [{instancePath,schemaPath:"#/allOf/0/then/not",keyword:"not",params:{},message:"must NOT be valid"}];return false;}else {errors = _errs6;if(vErrors !== null){if(_errs6){vErrors.length = _errs6;}else {vErrors = null;}}}if(errors === _errs5){if(data && typeof data == "object" && !Array.isArray(data)){if(data.threshold_minor !== undefined){let data1 = data.threshold_minor;const _errs8 = errors;const _errs9 = errors;const _errs10 = errors;let valid6 = false;const _errs11 = errors;if(!(((typeof data1 == "number") && (!(data1 % 1) && !isNaN(data1))) && (isFinite(data1)))){const err3 = {instancePath:instancePath+"/threshold_minor",schemaPath:"#/allOf/0/then/properties/threshold_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid1 = _errs11 === errors;valid6 = valid6 || _valid1;const _errs13 = errors;if(typeof data1 !== "bigint"){const err4 = {instancePath:instancePath+"/threshold_minor",schemaPath:"#/allOf/0/then/properties/threshold_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid1 = _errs13 === errors;valid6 = valid6 || _valid1;if(!valid6){const err5 = {instancePath:instancePath+"/threshold_minor",schemaPath:"#/allOf/0/then/properties/threshold_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;validate299.errors = vErrors;return false;}else {errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}}var valid5 = _errs9 === errors;if(valid5){if(typeof data1 === "bigint"){if(data1 < 0){validate299.errors = [{instancePath:instancePath+"/threshold_minor",schemaPath:"#/allOf/0/then/properties/threshold_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs8){if((typeof data1 == "number") && (isFinite(data1))){if(data1 < 0 || isNaN(data1)){validate299.errors = [{instancePath:instancePath+"/threshold_minor",schemaPath:"#/allOf/0/then/properties/threshold_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid4 = _errs8 === errors;}else {var valid4 = true;}if(valid4){if(data.amount_minor !== undefined){let data2 = data.amount_minor;const _errs14 = errors;const _errs15 = errors;const _errs16 = errors;let valid8 = false;const _errs17 = errors;if(!(((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))){const err6 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/allOf/0/then/properties/amount_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid2 = _errs17 === errors;valid8 = valid8 || _valid2;const _errs19 = errors;if(typeof data2 !== "bigint"){const err7 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/allOf/0/then/properties/amount_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid2 = _errs19 === errors;valid8 = valid8 || _valid2;if(!valid8){const err8 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/allOf/0/then/properties/amount_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;validate299.errors = vErrors;return false;}else {errors = _errs16;if(vErrors !== null){if(_errs16){vErrors.length = _errs16;}else {vErrors = null;}}}var valid7 = _errs15 === errors;if(valid7){if(typeof data2 === "bigint"){if(data2 < 1){validate299.errors = [{instancePath:instancePath+"/amount_minor",schemaPath:"#/allOf/0/then/properties/amount_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs14){if((typeof data2 == "number") && (isFinite(data2))){if(data2 < 1 || isNaN(data2)){validate299.errors = [{instancePath:instancePath+"/amount_minor",schemaPath:"#/allOf/0/then/properties/amount_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}var valid4 = _errs14 === errors;}else {var valid4 = true;}}}}var _valid0 = _errs5 === errors;valid1 = _valid0;if(valid1){var props0 = {};props0.threshold_minor = true;props0.amount_minor = true;props0.enabled = true;}}if(!valid1){const err9 = {instancePath,schemaPath:"#/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;validate299.errors = vErrors;return false;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing2;if(((((data.enabled === undefined) && (missing2 = "enabled")) || ((data.threshold_minor === undefined) && (missing2 = "threshold_minor"))) || ((data.amount_minor === undefined) && (missing2 = "amount_minor"))) || ((data.email_delivery === undefined) && (missing2 = "email_delivery"))){validate299.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"}];return false;}else {if(props0 !== true){props0 = props0 || {};props0.enabled = true;props0.threshold_minor = true;props0.amount_minor = true;props0.last_attempt = true;props0.disabled_reason = true;props0.email_delivery = true;}if(data.enabled !== undefined){const _errs20 = errors;if(typeof data.enabled !== "boolean"){validate299.errors = [{instancePath:instancePath+"/enabled",schemaPath:"#/properties/enabled/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid9 = _errs20 === errors;}else {var valid9 = true;}if(valid9){if(data.threshold_minor !== undefined){let data4 = data.threshold_minor;const _errs22 = errors;const _errs23 = errors;const _errs24 = errors;let valid11 = false;const _errs25 = errors;if((!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))) && (data4 !== null)){const err10 = {instancePath:instancePath+"/threshold_minor",schemaPath:"#/properties/threshold_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: schema289.properties.threshold_minor.allOf[0].anyOf[0].type},message:"must be integer,null"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var _valid3 = _errs25 === errors;valid11 = valid11 || _valid3;const _errs27 = errors;if(typeof data4 !== "bigint"){const err11 = {instancePath:instancePath+"/threshold_minor",schemaPath:"#/properties/threshold_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var _valid3 = _errs27 === errors;valid11 = valid11 || _valid3;if(!valid11){const err12 = {instancePath:instancePath+"/threshold_minor",schemaPath:"#/properties/threshold_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;validate299.errors = vErrors;return false;}else {errors = _errs24;if(vErrors !== null){if(_errs24){vErrors.length = _errs24;}else {vErrors = null;}}}var valid10 = _errs23 === errors;if(valid10){if(typeof data4 === "bigint"){if(data4 < 0){validate299.errors = [{instancePath:instancePath+"/threshold_minor",schemaPath:"#/properties/threshold_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs22){if((typeof data4 == "number") && (isFinite(data4))){if(data4 < 0 || isNaN(data4)){validate299.errors = [{instancePath:instancePath+"/threshold_minor",schemaPath:"#/properties/threshold_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid9 = _errs22 === errors;}else {var valid9 = true;}if(valid9){if(data.amount_minor !== undefined){let data5 = data.amount_minor;const _errs28 = errors;const _errs29 = errors;const _errs30 = errors;let valid13 = false;const _errs31 = errors;if((!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))) && (data5 !== null)){const err13 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/allOf/0/anyOf/0/type",keyword:"type",params:{type: schema289.properties.amount_minor.allOf[0].anyOf[0].type},message:"must be integer,null"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid4 = _errs31 === errors;valid13 = valid13 || _valid4;const _errs33 = errors;if(typeof data5 !== "bigint"){const err14 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/allOf/0/anyOf/1/x-boxrouter-bigint",keyword:"x-boxrouter-bigint",params:{},message:"must pass \"x-boxrouter-bigint\" keyword validation"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}var _valid4 = _errs33 === errors;valid13 = valid13 || _valid4;if(!valid13){const err15 = {instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/allOf/0/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;validate299.errors = vErrors;return false;}else {errors = _errs30;if(vErrors !== null){if(_errs30){vErrors.length = _errs30;}else {vErrors = null;}}}var valid12 = _errs29 === errors;if(valid12){if(typeof data5 === "bigint"){if(data5 < 1){validate299.errors = [{instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/x-boxrouter-bigint-range",keyword:"x-boxrouter-bigint-range",params:{},message:"must pass \"x-boxrouter-bigint-range\" keyword validation"}];return false;}}}if(errors === _errs28){if((typeof data5 == "number") && (isFinite(data5))){if(data5 < 1 || isNaN(data5)){validate299.errors = [{instancePath:instancePath+"/amount_minor",schemaPath:"#/properties/amount_minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}var valid9 = _errs28 === errors;}else {var valid9 = true;}if(valid9){if(data.last_attempt !== undefined){let data6 = data.last_attempt;const _errs34 = errors;if(errors === _errs34){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing3;if((((data6.purchase_id === undefined) && (missing3 = "purchase_id")) || ((data6.status === undefined) && (missing3 = "status"))) || ((data6.at === undefined) && (missing3 = "at"))){validate299.errors = [{instancePath:instancePath+"/last_attempt",schemaPath:"#/properties/last_attempt/required",keyword:"required",params:{missingProperty: missing3},message:"must have required property '"+missing3+"'"}];return false;}else {if(data6.purchase_id !== undefined){const _errs36 = errors;if(typeof data6.purchase_id !== "string"){validate299.errors = [{instancePath:instancePath+"/last_attempt/purchase_id",schemaPath:"#/properties/last_attempt/properties/purchase_id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid14 = _errs36 === errors;}else {var valid14 = true;}if(valid14){if(data6.status !== undefined){let data8 = data6.status;const _errs38 = errors;if(typeof data8 !== "string"){validate299.errors = [{instancePath:instancePath+"/last_attempt/status",schemaPath:"#/properties/last_attempt/properties/status/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if(!(((data8 === "pending") || (data8 === "confirmed")) || (data8 === "failed"))){validate299.errors = [{instancePath:instancePath+"/last_attempt/status",schemaPath:"#/properties/last_attempt/properties/status/enum",keyword:"enum",params:{allowedValues: schema289.properties.last_attempt.properties.status.enum},message:"must be equal to one of the allowed values"}];return false;}var valid14 = _errs38 === errors;}else {var valid14 = true;}if(valid14){if(data6.at !== undefined){let data9 = data6.at;const _errs40 = errors;if(errors === _errs40){if(errors === _errs40){if(typeof data9 === "string"){if(!(formats0.validate(data9))){validate299.errors = [{instancePath:instancePath+"/last_attempt/at",schemaPath:"#/properties/last_attempt/properties/at/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate299.errors = [{instancePath:instancePath+"/last_attempt/at",schemaPath:"#/properties/last_attempt/properties/at/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid14 = _errs40 === errors;}else {var valid14 = true;}if(valid14){if(data6.fallback_card !== undefined){const _errs42 = errors;if(!(validate297(data6.fallback_card, {instancePath:instancePath+"/last_attempt/fallback_card",parentData:data6,parentDataProperty:"fallback_card",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate297.errors : vErrors.concat(validate297.errors);errors = vErrors.length;}var valid14 = _errs42 === errors;}else {var valid14 = true;}}}}}}else {validate299.errors = [{instancePath:instancePath+"/last_attempt",schemaPath:"#/properties/last_attempt/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid9 = _errs34 === errors;}else {var valid9 = true;}if(valid9){if(data.disabled_reason !== undefined){const _errs43 = errors;if(typeof data.disabled_reason !== "string"){validate299.errors = [{instancePath:instancePath+"/disabled_reason",schemaPath:"#/properties/disabled_reason/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid9 = _errs43 === errors;}else {var valid9 = true;}if(valid9){if(data.email_delivery !== undefined){let data12 = data.email_delivery;const _errs45 = errors;if(typeof data12 !== "string"){validate299.errors = [{instancePath:instancePath+"/email_delivery",schemaPath:"#/properties/email_delivery/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}if(!((data12 === "configured") || (data12 === "log_only"))){validate299.errors = [{instancePath:instancePath+"/email_delivery",schemaPath:"#/properties/email_delivery/enum",keyword:"enum",params:{allowedValues: schema289.properties.email_delivery.enum},message:"must be equal to one of the allowed values"}];return false;}var valid9 = _errs45 === errors;}else {var valid9 = true;}}}}}}}}else {validate299.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate299.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate299.evaluated = {"dynamicProps":true,"dynamicItems":false};