@vertracloud/api-types 0.3.1 → 0.3.2

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.
package/v1.mjs CHANGED
@@ -245,15 +245,20 @@ var API_KEY_SCOPES = {
245
245
  group: "billing",
246
246
  routes: [
247
247
  { method: "GET", path: "/v1/orders" },
248
- { method: "GET", path: "/v1/orders/:orderId/status" }
248
+ { method: "GET", path: "/v1/orders/:orderId/status" },
249
+ { method: "GET", path: "/v1/users/me/billing" }
249
250
  ]
250
251
  },
251
- /** Creates a plan order and generates the PIX charge; the payment itself is made by a person in their banking app. */
252
+ /**
253
+ * Creates a plan order and generates the PIX charge; the payment itself is made by a person in their banking app.
254
+ * Also saves the billing details (name, address, CPF/CNPJ) an order needs.
255
+ */
252
256
  "billing:write": {
253
257
  group: "billing",
254
258
  routes: [
255
259
  { method: "POST", path: "/v1/orders" },
256
- { method: "POST", path: "/v1/orders/:orderId/initiate/pix" }
260
+ { method: "POST", path: "/v1/orders/:orderId/initiate/pix" },
261
+ { method: "PUT", path: "/v1/users/me/billing" }
257
262
  ]
258
263
  },
259
264
  "redeem:write": { group: "billing", routes: [{ method: "POST", path: "/v1/redeem/:code" }] }
@@ -405,6 +410,8 @@ var API_ERROR_CODES = {
405
410
  APP_NOT_FOUND_IN_WORKSPACE: "APP_NOT_FOUND_IN_WORKSPACE",
406
411
  BUILD_FAILED: "BUILD_FAILED",
407
412
  BUILD_TIMEOUT: "BUILD_TIMEOUT",
413
+ /** 400 — the order needs complete billing details for the service invoice (name, address and, in Brazil, CPF/CNPJ). Fill them with `PUT /v1/users/me/billing`. */
414
+ BILLING_DETAILS_INCOMPLETE: "BILLING_DETAILS_INCOMPLETE",
408
415
  /** 400 — billing details failed validation; the field is in `details.path`. */
409
416
  BILLING_DETAILS_INVALID: "BILLING_DETAILS_INVALID",
410
417
  /** 402 — the bank refused the card charge. */