orb-billing 6.10.0 → 6.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -792,6 +792,17 @@ class Subscriptions extends resource_1.APIResource {
792
792
  * Note that one of `plan_id` or `external_plan_id` is required in the request body
793
793
  * for this operation.
794
794
  *
795
+ * ## Interaction with scheduled cancellations
796
+ *
797
+ * Scheduling a plan change also unschedules a pending cancellation, as long as the
798
+ * cancellation date is on or after the plan change date: Orb honors the plan
799
+ * change over the scheduled cancellation, and the subscription continues on the
800
+ * new plan. Scheduling a plan change after the subscription's end date returns a
801
+ * validation error instead.
802
+ *
803
+ * Any plan changes already scheduled at or after the new plan change's date are
804
+ * unscheduled and replaced by it.
805
+ *
795
806
  * ## Customize your customer's subscriptions
796
807
  *
797
808
  * Prices and adjustments in a plan can be added, removed, or replaced on the
@@ -976,11 +987,19 @@ class Subscriptions extends resource_1.APIResource {
976
987
  * cancellation. This operation will turn on auto-renew, ensuring that the
977
988
  * subscription does not end at the currently scheduled cancellation time.
978
989
  *
979
- * Note: uncancellation is a lossy operation. Price intervals that were cut short
980
- * by the cancellation are extended to infinity (original end dates are lost), and
981
- * future intervals or phases scheduled after the cancellation time are permanently
982
- * deleted. For complex subscriptions with phases or scheduled plan changes,
983
- * consider creating a new plan change instead of uncancelling.
990
+ * A cancellation that has already taken effect cannot be unscheduled. This
991
+ * includes backdated cancellations: once the subscription's end date is in the
992
+ * past, this endpoint returns a validation error.
993
+ *
994
+ * Note: uncancellation is a lossy operation. Price and adjustment intervals that
995
+ * were cut short by the cancellation are extended to infinity (original end dates
996
+ * are lost), and future intervals or phases scheduled after the cancellation time
997
+ * are permanently deleted. For complex subscriptions with phases or scheduled plan
998
+ * changes, consider creating a new plan change instead of uncancelling.
999
+ *
1000
+ * If the scheduled cancellation already produced invoices or credit notes (for
1001
+ * example, a proration refund credit note for an in-advance fee), uncancelling
1002
+ * voids and reissues them as needed to match the subscription's new state.
984
1003
  *
985
1004
  * @example
986
1005
  * ```ts
@@ -1017,7 +1036,21 @@ class Subscriptions extends resource_1.APIResource {
1017
1036
  }
1018
1037
  /**
1019
1038
  * This endpoint can be used to unschedule any pending plan changes on an existing
1020
- * subscription. When called, all upcoming plan changes will be unscheduled.
1039
+ * subscription. When called, all upcoming plan changes will be unscheduled; it is
1040
+ * not possible to unschedule a single plan change if multiple are scheduled.
1041
+ *
1042
+ * Note: unscheduling a plan change is a lossy operation, with the same semantics
1043
+ * as
1044
+ * [unscheduling a cancellation](/api-reference/subscription/unschedule-subscription-cancellation).
1045
+ * Prices and adjustments on the current plan that were scheduled to end at the
1046
+ * plan change time are extended to infinity (original end dates are lost), and
1047
+ * anything scheduled to start after the plan change time is permanently deleted.
1048
+ * Coupons redeemed as part of an unscheduled plan change are released and can be
1049
+ * redeemed again.
1050
+ *
1051
+ * A scheduled cancellation is not affected by this operation: if the subscription
1052
+ * has both a pending plan change and a scheduled cancellation, unscheduling the
1053
+ * plan change leaves the cancellation in place.
1021
1054
  *
1022
1055
  * @example
1023
1056
  * ```ts
@@ -1 +1 @@
1
- {"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAO/C,sDAAwE;AAExE,oDAA8C;AAE9C,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2QG;IACH,MAAM,CACJ,IAA8B,EAC9B,OAAwB;QAExB,OAAO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X,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,4BAA4B,CAC1B,cAAsB,EACtB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,kBAAkB,cAAc,kCAAkC,EAAE,OAAO,CAAC,CAAC;IAC5G,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,sBAAsB,CACpB,cAAsB,EACtB,IAA8C,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,kBAAkB,cAAc,4BAA4B,EAAE;YACzF,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,WAAW,CACT,cAAsB,EACtB,IAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,kBAAkB,cAAc,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtG,CAAC;CACF;AAjrCD,sCAirCC"}
@@ -789,6 +789,17 @@ export class Subscriptions extends APIResource {
789
789
  * Note that one of `plan_id` or `external_plan_id` is required in the request body
790
790
  * for this operation.
791
791
  *
792
+ * ## Interaction with scheduled cancellations
793
+ *
794
+ * Scheduling a plan change also unschedules a pending cancellation, as long as the
795
+ * cancellation date is on or after the plan change date: Orb honors the plan
796
+ * change over the scheduled cancellation, and the subscription continues on the
797
+ * new plan. Scheduling a plan change after the subscription's end date returns a
798
+ * validation error instead.
799
+ *
800
+ * Any plan changes already scheduled at or after the new plan change's date are
801
+ * unscheduled and replaced by it.
802
+ *
792
803
  * ## Customize your customer's subscriptions
793
804
  *
794
805
  * Prices and adjustments in a plan can be added, removed, or replaced on the
@@ -973,11 +984,19 @@ export class Subscriptions extends APIResource {
973
984
  * cancellation. This operation will turn on auto-renew, ensuring that the
974
985
  * subscription does not end at the currently scheduled cancellation time.
975
986
  *
976
- * Note: uncancellation is a lossy operation. Price intervals that were cut short
977
- * by the cancellation are extended to infinity (original end dates are lost), and
978
- * future intervals or phases scheduled after the cancellation time are permanently
979
- * deleted. For complex subscriptions with phases or scheduled plan changes,
980
- * consider creating a new plan change instead of uncancelling.
987
+ * A cancellation that has already taken effect cannot be unscheduled. This
988
+ * includes backdated cancellations: once the subscription's end date is in the
989
+ * past, this endpoint returns a validation error.
990
+ *
991
+ * Note: uncancellation is a lossy operation. Price and adjustment intervals that
992
+ * were cut short by the cancellation are extended to infinity (original end dates
993
+ * are lost), and future intervals or phases scheduled after the cancellation time
994
+ * are permanently deleted. For complex subscriptions with phases or scheduled plan
995
+ * changes, consider creating a new plan change instead of uncancelling.
996
+ *
997
+ * If the scheduled cancellation already produced invoices or credit notes (for
998
+ * example, a proration refund credit note for an in-advance fee), uncancelling
999
+ * voids and reissues them as needed to match the subscription's new state.
981
1000
  *
982
1001
  * @example
983
1002
  * ```ts
@@ -1014,7 +1033,21 @@ export class Subscriptions extends APIResource {
1014
1033
  }
1015
1034
  /**
1016
1035
  * This endpoint can be used to unschedule any pending plan changes on an existing
1017
- * subscription. When called, all upcoming plan changes will be unscheduled.
1036
+ * subscription. When called, all upcoming plan changes will be unscheduled; it is
1037
+ * not possible to unschedule a single plan change if multiple are scheduled.
1038
+ *
1039
+ * Note: unscheduling a plan change is a lossy operation, with the same semantics
1040
+ * as
1041
+ * [unscheduling a cancellation](/api-reference/subscription/unschedule-subscription-cancellation).
1042
+ * Prices and adjustments on the current plan that were scheduled to end at the
1043
+ * plan change time are extended to infinity (original end dates are lost), and
1044
+ * anything scheduled to start after the plan change time is permanently deleted.
1045
+ * Coupons redeemed as part of an unscheduled plan change are released and can be
1046
+ * redeemed again.
1047
+ *
1048
+ * A scheduled cancellation is not affected by this operation: if the subscription
1049
+ * has both a pending plan change and a scheduled cancellation, unscheduling the
1050
+ * plan change leaves the cancellation in place.
1018
1051
  *
1019
1052
  * @example
1020
1053
  * ```ts
@@ -1 +1 @@
1
- {"version":3,"file":"subscriptions.mjs","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAO/C,OAAO,EAAE,IAAI,EAAgC,+BAA2B;AAExE,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2QG;IACH,MAAM,CACJ,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,cAAsB,EACtB,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,cAAc,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAA,IAAkB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OA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,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtG,CAAC;CACF"}
@@ -846,6 +846,17 @@ export class Subscriptions extends APIResource {
846
846
  * Note that one of `plan_id` or `external_plan_id` is required in the request body
847
847
  * for this operation.
848
848
  *
849
+ * ## Interaction with scheduled cancellations
850
+ *
851
+ * Scheduling a plan change also unschedules a pending cancellation, as long as the
852
+ * cancellation date is on or after the plan change date: Orb honors the plan
853
+ * change over the scheduled cancellation, and the subscription continues on the
854
+ * new plan. Scheduling a plan change after the subscription's end date returns a
855
+ * validation error instead.
856
+ *
857
+ * Any plan changes already scheduled at or after the new plan change's date are
858
+ * unscheduled and replaced by it.
859
+ *
849
860
  * ## Customize your customer's subscriptions
850
861
  *
851
862
  * Prices and adjustments in a plan can be added, removed, or replaced on the
@@ -1040,11 +1051,19 @@ export class Subscriptions extends APIResource {
1040
1051
  * cancellation. This operation will turn on auto-renew, ensuring that the
1041
1052
  * subscription does not end at the currently scheduled cancellation time.
1042
1053
  *
1043
- * Note: uncancellation is a lossy operation. Price intervals that were cut short
1044
- * by the cancellation are extended to infinity (original end dates are lost), and
1045
- * future intervals or phases scheduled after the cancellation time are permanently
1046
- * deleted. For complex subscriptions with phases or scheduled plan changes,
1047
- * consider creating a new plan change instead of uncancelling.
1054
+ * A cancellation that has already taken effect cannot be unscheduled. This
1055
+ * includes backdated cancellations: once the subscription's end date is in the
1056
+ * past, this endpoint returns a validation error.
1057
+ *
1058
+ * Note: uncancellation is a lossy operation. Price and adjustment intervals that
1059
+ * were cut short by the cancellation are extended to infinity (original end dates
1060
+ * are lost), and future intervals or phases scheduled after the cancellation time
1061
+ * are permanently deleted. For complex subscriptions with phases or scheduled plan
1062
+ * changes, consider creating a new plan change instead of uncancelling.
1063
+ *
1064
+ * If the scheduled cancellation already produced invoices or credit notes (for
1065
+ * example, a proration refund credit note for an in-advance fee), uncancelling
1066
+ * voids and reissues them as needed to match the subscription's new state.
1048
1067
  *
1049
1068
  * @example
1050
1069
  * ```ts
@@ -1090,7 +1109,21 @@ export class Subscriptions extends APIResource {
1090
1109
 
1091
1110
  /**
1092
1111
  * This endpoint can be used to unschedule any pending plan changes on an existing
1093
- * subscription. When called, all upcoming plan changes will be unscheduled.
1112
+ * subscription. When called, all upcoming plan changes will be unscheduled; it is
1113
+ * not possible to unschedule a single plan change if multiple are scheduled.
1114
+ *
1115
+ * Note: unscheduling a plan change is a lossy operation, with the same semantics
1116
+ * as
1117
+ * [unscheduling a cancellation](/api-reference/subscription/unschedule-subscription-cancellation).
1118
+ * Prices and adjustments on the current plan that were scheduled to end at the
1119
+ * plan change time are extended to infinity (original end dates are lost), and
1120
+ * anything scheduled to start after the plan change time is permanently deleted.
1121
+ * Coupons redeemed as part of an unscheduled plan change are released and can be
1122
+ * redeemed again.
1123
+ *
1124
+ * A scheduled cancellation is not affected by this operation: if the subscription
1125
+ * has both a pending plan change and a scheduled cancellation, unscheduling the
1126
+ * plan change leaves the cancellation in place.
1094
1127
  *
1095
1128
  * @example
1096
1129
  * ```ts
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '6.10.0'; // x-release-please-version
1
+ export const VERSION = '6.11.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "6.10.0";
1
+ export declare const VERSION = "6.11.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "6.10.0";
1
+ export declare const VERSION = "6.11.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '6.10.0'; // x-release-please-version
4
+ exports.VERSION = '6.11.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '6.10.0'; // x-release-please-version
1
+ export const VERSION = '6.11.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map