orb-billing 6.15.0 → 6.17.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.
- package/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/resources/beta/beta.d.mts +276 -2
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +276 -2
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/external-plan-id.d.mts +276 -2
- package/resources/beta/external-plan-id.d.mts.map +1 -1
- package/resources/beta/external-plan-id.d.ts +276 -2
- package/resources/beta/external-plan-id.d.ts.map +1 -1
- package/resources/customers/balance-transactions.d.mts +2 -2
- package/resources/customers/balance-transactions.d.mts.map +1 -1
- package/resources/customers/balance-transactions.d.ts +2 -2
- package/resources/customers/balance-transactions.d.ts.map +1 -1
- package/resources/invoices.d.mts +3 -3
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +3 -3
- package/resources/invoices.d.ts.map +1 -1
- package/resources/plans/plans.d.mts +138 -1
- package/resources/plans/plans.d.mts.map +1 -1
- package/resources/plans/plans.d.ts +138 -1
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/prices.d.mts +396 -3
- package/resources/prices/prices.d.mts.map +1 -1
- package/resources/prices/prices.d.ts +396 -3
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/shared.d.mts +155 -3
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +155 -3
- package/resources/shared.d.ts.map +1 -1
- package/resources/subscriptions.d.mts +702 -23
- package/resources/subscriptions.d.mts.map +1 -1
- package/resources/subscriptions.d.ts +702 -23
- package/resources/subscriptions.d.ts.map +1 -1
- package/src/resources/beta/beta.ts +324 -0
- package/src/resources/beta/external-plan-id.ts +324 -0
- package/src/resources/customers/balance-transactions.ts +4 -2
- package/src/resources/invoices.ts +6 -3
- package/src/resources/plans/plans.ts +162 -0
- package/src/resources/prices/prices.ts +465 -0
- package/src/resources/shared.ts +198 -2
- package/src/resources/subscriptions.ts +931 -128
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -90,7 +90,8 @@ export interface BalanceTransactionCreateResponse {
|
|
|
90
90
|
| 'credit_note_voided'
|
|
91
91
|
| 'overpayment_refund'
|
|
92
92
|
| 'external_payment'
|
|
93
|
-
| 'small_invoice_carryover'
|
|
93
|
+
| 'small_invoice_carryover'
|
|
94
|
+
| 'prepaid_commit_cancel';
|
|
94
95
|
|
|
95
96
|
/**
|
|
96
97
|
* The value of the amount changed in the transaction.
|
|
@@ -142,7 +143,8 @@ export interface BalanceTransactionListResponse {
|
|
|
142
143
|
| 'credit_note_voided'
|
|
143
144
|
| 'overpayment_refund'
|
|
144
145
|
| 'external_payment'
|
|
145
|
-
| 'small_invoice_carryover'
|
|
146
|
+
| 'small_invoice_carryover'
|
|
147
|
+
| 'prepaid_commit_cancel';
|
|
146
148
|
|
|
147
149
|
/**
|
|
148
150
|
* The value of the amount changed in the transaction.
|
|
@@ -776,7 +776,8 @@ export namespace InvoiceFetchUpcomingResponse {
|
|
|
776
776
|
| 'credit_note_voided'
|
|
777
777
|
| 'overpayment_refund'
|
|
778
778
|
| 'external_payment'
|
|
779
|
-
| 'small_invoice_carryover'
|
|
779
|
+
| 'small_invoice_carryover'
|
|
780
|
+
| 'prepaid_commit_cancel';
|
|
780
781
|
|
|
781
782
|
/**
|
|
782
783
|
* The value of the amount changed in the transaction.
|
|
@@ -1435,7 +1436,8 @@ export namespace InvoiceIssueSummaryResponse {
|
|
|
1435
1436
|
| 'credit_note_voided'
|
|
1436
1437
|
| 'overpayment_refund'
|
|
1437
1438
|
| 'external_payment'
|
|
1438
|
-
| 'small_invoice_carryover'
|
|
1439
|
+
| 'small_invoice_carryover'
|
|
1440
|
+
| 'prepaid_commit_cancel';
|
|
1439
1441
|
|
|
1440
1442
|
/**
|
|
1441
1443
|
* The value of the amount changed in the transaction.
|
|
@@ -1892,7 +1894,8 @@ export namespace InvoiceListSummaryResponse {
|
|
|
1892
1894
|
| 'credit_note_voided'
|
|
1893
1895
|
| 'overpayment_refund'
|
|
1894
1896
|
| 'external_payment'
|
|
1895
|
-
| 'small_invoice_carryover'
|
|
1897
|
+
| 'small_invoice_carryover'
|
|
1898
|
+
| 'prepaid_commit_cancel';
|
|
1896
1899
|
|
|
1897
1900
|
/**
|
|
1898
1901
|
* The value of the amount changed in the transaction.
|
|
@@ -459,6 +459,7 @@ export namespace PlanCreateParams {
|
|
|
459
459
|
| Shared.NewPlanPackageWithAllocationPrice
|
|
460
460
|
| Shared.NewPlanUnitWithPercentPrice
|
|
461
461
|
| Shared.NewPlanMatrixWithAllocationPrice
|
|
462
|
+
| Price.NewPlanTieredMatrixWithAllocationPrice
|
|
462
463
|
| Price.NewPlanMatrixWithThresholdDiscountsPrice
|
|
463
464
|
| Price.NewPlanTieredWithProrationPrice
|
|
464
465
|
| Shared.NewPlanUnitWithProrationPrice
|
|
@@ -934,6 +935,167 @@ export namespace PlanCreateParams {
|
|
|
934
935
|
}
|
|
935
936
|
}
|
|
936
937
|
|
|
938
|
+
export interface NewPlanTieredMatrixWithAllocationPrice {
|
|
939
|
+
/**
|
|
940
|
+
* The cadence to bill for this price on.
|
|
941
|
+
*/
|
|
942
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
943
|
+
|
|
944
|
+
/**
|
|
945
|
+
* The id of the item the price will be associated with.
|
|
946
|
+
*/
|
|
947
|
+
item_id: string;
|
|
948
|
+
|
|
949
|
+
/**
|
|
950
|
+
* The pricing model type
|
|
951
|
+
*/
|
|
952
|
+
model_type: 'tiered_matrix_with_allocation';
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* The name of the price.
|
|
956
|
+
*/
|
|
957
|
+
name: string;
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
961
|
+
*/
|
|
962
|
+
tiered_matrix_with_allocation_config: NewPlanTieredMatrixWithAllocationPrice.TieredMatrixWithAllocationConfig;
|
|
963
|
+
|
|
964
|
+
/**
|
|
965
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
966
|
+
* usage-based.
|
|
967
|
+
*/
|
|
968
|
+
billable_metric_id?: string | null;
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
972
|
+
* this is true, and in-arrears if this is false.
|
|
973
|
+
*/
|
|
974
|
+
billed_in_advance?: boolean | null;
|
|
975
|
+
|
|
976
|
+
/**
|
|
977
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
978
|
+
* months.
|
|
979
|
+
*/
|
|
980
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
981
|
+
|
|
982
|
+
/**
|
|
983
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
984
|
+
*/
|
|
985
|
+
conversion_rate?: number | null;
|
|
986
|
+
|
|
987
|
+
/**
|
|
988
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
989
|
+
*/
|
|
990
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
994
|
+
* price is billed.
|
|
995
|
+
*/
|
|
996
|
+
currency?: string | null;
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
* For dimensional price: specifies a price group and dimension values
|
|
1000
|
+
*/
|
|
1001
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
* An alias for the price.
|
|
1005
|
+
*/
|
|
1006
|
+
external_price_id?: string | null;
|
|
1007
|
+
|
|
1008
|
+
/**
|
|
1009
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
1010
|
+
* applied.
|
|
1011
|
+
*/
|
|
1012
|
+
fixed_price_quantity?: number | null;
|
|
1013
|
+
|
|
1014
|
+
/**
|
|
1015
|
+
* The property used to group this price on an invoice
|
|
1016
|
+
*/
|
|
1017
|
+
invoice_grouping_key?: string | null;
|
|
1018
|
+
|
|
1019
|
+
/**
|
|
1020
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1021
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
1022
|
+
*/
|
|
1023
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* The ID of the license type to associate with this price. On a usage price this
|
|
1027
|
+
* also marks the price as eligible to draw down from that license type's
|
|
1028
|
+
* allocation; a usage price created without it is billed normally. Usage prices
|
|
1029
|
+
* with a license type must use the `unit` model, and only draw down when their
|
|
1030
|
+
* currency matches the allocation's.
|
|
1031
|
+
*/
|
|
1032
|
+
license_type_id?: string | null;
|
|
1033
|
+
|
|
1034
|
+
/**
|
|
1035
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1036
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1037
|
+
* by setting `metadata` to `null`.
|
|
1038
|
+
*/
|
|
1039
|
+
metadata?: { [key: string]: string | null } | null;
|
|
1040
|
+
|
|
1041
|
+
/**
|
|
1042
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
1043
|
+
* in the same API call.
|
|
1044
|
+
*/
|
|
1045
|
+
reference_id?: string | null;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
export namespace NewPlanTieredMatrixWithAllocationPrice {
|
|
1049
|
+
/**
|
|
1050
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
1051
|
+
*/
|
|
1052
|
+
export interface TieredMatrixWithAllocationConfig {
|
|
1053
|
+
/**
|
|
1054
|
+
* Usage allocation, pooled across all matrix cells
|
|
1055
|
+
*/
|
|
1056
|
+
allocation: string;
|
|
1057
|
+
|
|
1058
|
+
/**
|
|
1059
|
+
* Per unit rate for usage whose matrix cell has no configured tiers
|
|
1060
|
+
*/
|
|
1061
|
+
default_unit_amount: string;
|
|
1062
|
+
|
|
1063
|
+
/**
|
|
1064
|
+
* One or two event property values to evaluate matrix cells by
|
|
1065
|
+
*/
|
|
1066
|
+
dimensions: Array<string>;
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
|
|
1070
|
+
* own rows
|
|
1071
|
+
*/
|
|
1072
|
+
tiers: Array<TieredMatrixWithAllocationConfig.Tier>;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
export namespace TieredMatrixWithAllocationConfig {
|
|
1076
|
+
/**
|
|
1077
|
+
* Configuration for a single tier scoped to one matrix cell
|
|
1078
|
+
*/
|
|
1079
|
+
export interface Tier {
|
|
1080
|
+
/**
|
|
1081
|
+
* The matrix cell this tier applies to, as one or two dimension values
|
|
1082
|
+
*/
|
|
1083
|
+
dimension_values: Array<string>;
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* Exclusive tier starting value. The tier runs up to and including the next bound
|
|
1087
|
+
* configured for the same matrix cell.
|
|
1088
|
+
*/
|
|
1089
|
+
tier_lower_bound: string;
|
|
1090
|
+
|
|
1091
|
+
/**
|
|
1092
|
+
* Per unit amount
|
|
1093
|
+
*/
|
|
1094
|
+
unit_amount: string;
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
|
|
937
1099
|
export interface NewPlanMatrixWithThresholdDiscountsPrice {
|
|
938
1100
|
/**
|
|
939
1101
|
* The cadence to bill for this price on.
|