@leaflow/sdk 0.0.0-dev.230.g6609f68 → 0.0.0-dev.232.g18ca775

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.
@@ -395,7 +395,10 @@ export interface paths {
395
395
  * Returns a checkout address when the gateway requires the cardholder to confirm the
396
396
  * payment; the invoice is marked paid once the gateway confirms it.
397
397
  *
398
- * Calling this on an invoice that is already paid returns the invoice unchanged.
398
+ * Calling this on an invoice that is already paid returns the invoice unchanged. A void invoice
399
+ * is refused with `BILLING_INVOICE_NOT_PAYABLE`; the invoice of an order that has failed or was
400
+ * canceled, with `BILLING_ORDER_FAILED` or `BILLING_ORDER_CANCELED`; and that of an order whose
401
+ * payment deadline has passed, with `BILLING_ORDER_EXPIRED`.
399
402
  */
400
403
  post: operations["pay-invoice"];
401
404
  delete?: never;
@@ -450,8 +453,10 @@ export interface paths {
450
453
  * Either every invoice is paid or none is. When the credit grants and balance cannot cover
451
454
  * them all, the request fails with `BILLING_INSUFFICIENT_FUNDS` and nothing is charged.
452
455
  * Invoices that are already paid are not charged again. An invoice with an online payment
453
- * still in progress is refused with `BILLING_PAYMENT_PENDING`, and an order whose payment
454
- * deadline has passed with `BILLING_ORDER_EXPIRED`.
456
+ * still in progress is refused with `BILLING_PAYMENT_PENDING`, a void invoice with
457
+ * `BILLING_INVOICE_NOT_PAYABLE`, an order that has failed or was canceled with
458
+ * `BILLING_ORDER_FAILED` or `BILLING_ORDER_CANCELED`, and an order whose payment deadline has
459
+ * passed with `BILLING_ORDER_EXPIRED`.
455
460
  */
456
461
  post: operations["pay-together"];
457
462
  delete?: never;
@@ -798,7 +803,17 @@ export interface paths {
798
803
  put?: never;
799
804
  /**
800
805
  * Renew subscription
801
- * @description Purchases prepaid periods from paid_until using the agreed recurring amount. A changed interval selects a current price and freezes new terms on the order, applied only after fulfillment. Existing paid periods keep their value. Save order_id before submitting and query the order after an unknown outcome; duplicate creation conflicts.
806
+ * @description Purchases prepaid periods from paid_until using the agreed recurring amount, and pays for them at
807
+ * once. A changed interval selects a current price and freezes new terms on the order, applied
808
+ * only after fulfillment. Existing paid periods keep their value.
809
+ *
810
+ * Without `payment_method_id`, the renewal is paid from credit grants and the balance as
811
+ * `use_credits` and `use_balance` allow; when they cannot pay it all, the renewal is refused with
812
+ * `BILLING_INSUFFICIENT_FUNDS` and no order is left. To pay another way, create a renewal order
813
+ * and pay its invoice instead.
814
+ *
815
+ * Save order_id before submitting and query the order after an unknown outcome; duplicate
816
+ * creation conflicts.
802
817
  */
803
818
  post: operations["renew-subscription"];
804
819
  delete?: never;
@@ -960,7 +975,8 @@ export interface paths {
960
975
  * @description Withdraws an order that is not paid in full, and tells the service that placed it, so that
961
976
  * nothing is delivered. An order with nothing paid becomes `canceled` and its invoice is voided.
962
977
  * What was already paid toward it, from credit grants or the balance, is returned the way it was
963
- * paid, and the order becomes `failed`. Either way `cancel_reason` is `requested_by_customer`.
978
+ * paid, and the order becomes `failed`; its invoice is voided once everything paid has been
979
+ * returned. Either way `cancel_reason` is `requested_by_customer`.
964
980
  * Canceling an order that is already canceled or failed returns it unchanged.
965
981
  *
966
982
  * Refused with 409 and `BILLING_PAID_ORDER_NOT_CANCELABLE` once the invoice is paid in full,
@@ -1646,6 +1662,10 @@ export interface components {
1646
1662
  *
1647
1663
  * `refunded` means the invoice was paid and has since been refunded in full; a partial refund
1648
1664
  * leaves it `paid`, with the refunded part in `amount_refunded`.
1665
+ *
1666
+ * `void` means the invoice will not be paid and holds no money: nothing was paid, or its order
1667
+ * failed or was canceled and everything paid toward it has been returned, as `amount_paid` and
1668
+ * `amount_refunded` show.
1649
1669
  * @enum {string}
1650
1670
  */
1651
1671
  InvoiceStatus: "draft" | "open" | "paid" | "refunded" | "void" | "uncollectible";
@@ -565,6 +565,9 @@ export interface components {
565
565
  /**
566
566
  * @description `refunded` means the invoice was paid and has since been refunded in full; a partial refund
567
567
  * leaves it `paid`, with the refunded part in `amount_refunded`.
568
+ *
569
+ * `void` means the invoice will not be paid and holds no money: nothing was paid, or its order
570
+ * failed or was canceled and everything paid toward it has been returned.
568
571
  * @enum {string}
569
572
  */
570
573
  InvoiceStatus: "draft" | "open" | "paid" | "refunded" | "void" | "uncollectible";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaflow/sdk",
3
- "version": "0.0.0-dev.230.g6609f68",
3
+ "version": "0.0.0-dev.232.g18ca775",
4
4
  "description": "Leaflow 平台 API 的 TypeScript SDK",
5
5
  "license": "MIT",
6
6
  "repository": {