orb-billing 5.5.1 → 5.7.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 +33 -0
- package/core.js +3 -3
- package/core.js.map +1 -1
- package/core.mjs +3 -3
- package/core.mjs.map +1 -1
- package/index.d.mts +4 -15
- package/index.d.ts +4 -15
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +4 -1
- package/resources/alerts.d.ts +1 -1
- package/resources/beta/beta.d.ts +448 -4
- 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.ts +448 -4
- package/resources/beta/external-plan-id.d.ts.map +1 -1
- package/resources/customers/balance-transactions.d.ts +2 -2
- package/resources/customers/balance-transactions.d.ts.map +1 -1
- package/resources/customers/balance-transactions.js.map +1 -1
- package/resources/customers/balance-transactions.mjs.map +1 -1
- package/resources/customers/credits/ledger.d.ts +22 -8
- package/resources/customers/credits/ledger.d.ts.map +1 -1
- package/resources/customers/credits/ledger.js.map +1 -1
- package/resources/customers/credits/ledger.mjs.map +1 -1
- package/resources/customers/customers.d.ts +54 -6
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.js +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs +1 -1
- package/resources/events/backfills.d.ts +2 -2
- package/resources/events/backfills.js +2 -2
- package/resources/events/backfills.mjs +2 -2
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invoice-line-items.d.ts +1 -1
- package/resources/invoices.d.ts +39 -11
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +4 -4
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +4 -4
- package/resources/invoices.mjs.map +1 -1
- package/resources/plans/plans.d.ts +224 -2
- 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.ts +1089 -192
- 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.ts +2656 -925
- package/resources/shared.d.ts.map +1 -1
- package/resources/shared.js.map +1 -1
- package/resources/shared.mjs.map +1 -1
- package/resources/subscriptions.d.ts +1831 -370
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +1 -1
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +1 -1
- package/resources/subscriptions.mjs.map +1 -1
- package/src/core.ts +3 -3
- package/src/index.ts +5 -21
- package/src/resources/alerts.ts +1 -1
- package/src/resources/beta/beta.ts +544 -24
- package/src/resources/beta/external-plan-id.ts +544 -24
- package/src/resources/customers/balance-transactions.ts +4 -2
- package/src/resources/customers/credits/ledger.ts +24 -8
- package/src/resources/customers/customers.ts +79 -6
- package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +1 -1
- package/src/resources/events/backfills.ts +2 -2
- package/src/resources/index.ts +1 -4
- package/src/resources/invoice-line-items.ts +1 -1
- package/src/resources/invoices.ts +44 -11
- package/src/resources/plans/plans.ts +272 -12
- package/src/resources/prices/prices.ts +1255 -206
- package/src/resources/shared.ts +3057 -1046
- package/src/resources/subscriptions.ts +2401 -694
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -233,6 +233,13 @@ export interface Customer {
|
|
|
233
233
|
|
|
234
234
|
auto_collection: boolean;
|
|
235
235
|
|
|
236
|
+
/**
|
|
237
|
+
* Whether invoices for this customer should be automatically issued. If true,
|
|
238
|
+
* invoices will be automatically issued. If false, invoices will require manual
|
|
239
|
+
* approval. If null, inherits the account-level setting.
|
|
240
|
+
*/
|
|
241
|
+
auto_issuance: boolean | null;
|
|
242
|
+
|
|
236
243
|
/**
|
|
237
244
|
* The customer's current balance in their currency.
|
|
238
245
|
*/
|
|
@@ -547,7 +554,8 @@ export interface CustomerCreateParams {
|
|
|
547
554
|
|
|
548
555
|
/**
|
|
549
556
|
* Additional email addresses for this customer. If populated, these email
|
|
550
|
-
* addresses will be CC'd for customer communications.
|
|
557
|
+
* addresses will be CC'd for customer communications. The total number of email
|
|
558
|
+
* addresses (including the primary email) cannot exceed 50.
|
|
551
559
|
*/
|
|
552
560
|
additional_emails?: Array<string> | null;
|
|
553
561
|
|
|
@@ -558,6 +566,14 @@ export interface CustomerCreateParams {
|
|
|
558
566
|
*/
|
|
559
567
|
auto_collection?: boolean | null;
|
|
560
568
|
|
|
569
|
+
/**
|
|
570
|
+
* Used to determine if invoices for this customer will be automatically issued. If
|
|
571
|
+
* true, invoices will be automatically issued. If false, invoices will require
|
|
572
|
+
* manual approval. If `null` is specified, the customer's auto issuance setting
|
|
573
|
+
* will be inherited from the account-level setting.
|
|
574
|
+
*/
|
|
575
|
+
auto_issuance?: boolean | null;
|
|
576
|
+
|
|
561
577
|
billing_address?: AddressInput | null;
|
|
562
578
|
|
|
563
579
|
/**
|
|
@@ -604,7 +620,12 @@ export interface CustomerCreateParams {
|
|
|
604
620
|
|
|
605
621
|
shipping_address?: AddressInput | null;
|
|
606
622
|
|
|
607
|
-
tax_configuration?:
|
|
623
|
+
tax_configuration?:
|
|
624
|
+
| NewAvalaraTaxConfiguration
|
|
625
|
+
| NewTaxJarConfiguration
|
|
626
|
+
| NewSphereConfiguration
|
|
627
|
+
| CustomerCreateParams.NewNumeralConfiguration
|
|
628
|
+
| null;
|
|
608
629
|
|
|
609
630
|
/**
|
|
610
631
|
* Tax IDs are commonly required to be displayed on customer invoices, which are
|
|
@@ -762,12 +783,21 @@ export interface CustomerCreateParams {
|
|
|
762
783
|
timezone?: string | null;
|
|
763
784
|
}
|
|
764
785
|
|
|
786
|
+
export namespace CustomerCreateParams {
|
|
787
|
+
export interface NewNumeralConfiguration {
|
|
788
|
+
tax_exempt: boolean;
|
|
789
|
+
|
|
790
|
+
tax_provider: 'numeral';
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
|
|
765
794
|
export interface CustomerUpdateParams {
|
|
766
795
|
accounting_sync_configuration?: NewAccountingSyncConfiguration | null;
|
|
767
796
|
|
|
768
797
|
/**
|
|
769
798
|
* Additional email addresses for this customer. If populated, these email
|
|
770
|
-
* addresses will be CC'd for customer communications.
|
|
799
|
+
* addresses will be CC'd for customer communications. The total number of email
|
|
800
|
+
* addresses (including the primary email) cannot exceed 50.
|
|
771
801
|
*/
|
|
772
802
|
additional_emails?: Array<string> | null;
|
|
773
803
|
|
|
@@ -778,6 +808,14 @@ export interface CustomerUpdateParams {
|
|
|
778
808
|
*/
|
|
779
809
|
auto_collection?: boolean | null;
|
|
780
810
|
|
|
811
|
+
/**
|
|
812
|
+
* Used to determine if invoices for this customer will be automatically issued. If
|
|
813
|
+
* true, invoices will be automatically issued. If false, invoices will require
|
|
814
|
+
* manual approval.If `null` is specified, the customer's auto issuance setting
|
|
815
|
+
* will be inherited from the account-level setting.
|
|
816
|
+
*/
|
|
817
|
+
auto_issuance?: boolean | null;
|
|
818
|
+
|
|
781
819
|
billing_address?: AddressInput | null;
|
|
782
820
|
|
|
783
821
|
/**
|
|
@@ -840,7 +878,12 @@ export interface CustomerUpdateParams {
|
|
|
840
878
|
|
|
841
879
|
shipping_address?: AddressInput | null;
|
|
842
880
|
|
|
843
|
-
tax_configuration?:
|
|
881
|
+
tax_configuration?:
|
|
882
|
+
| NewAvalaraTaxConfiguration
|
|
883
|
+
| NewTaxJarConfiguration
|
|
884
|
+
| NewSphereConfiguration
|
|
885
|
+
| CustomerUpdateParams.NewNumeralConfiguration
|
|
886
|
+
| null;
|
|
844
887
|
|
|
845
888
|
/**
|
|
846
889
|
* Tax IDs are commonly required to be displayed on customer invoices, which are
|
|
@@ -991,6 +1034,14 @@ export interface CustomerUpdateParams {
|
|
|
991
1034
|
tax_id?: Shared.CustomerTaxID | null;
|
|
992
1035
|
}
|
|
993
1036
|
|
|
1037
|
+
export namespace CustomerUpdateParams {
|
|
1038
|
+
export interface NewNumeralConfiguration {
|
|
1039
|
+
tax_exempt: boolean;
|
|
1040
|
+
|
|
1041
|
+
tax_provider: 'numeral';
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
|
|
994
1045
|
export interface CustomerListParams extends PageParams {
|
|
995
1046
|
'created_at[gt]'?: string | null;
|
|
996
1047
|
|
|
@@ -1006,7 +1057,8 @@ export interface CustomerUpdateByExternalIDParams {
|
|
|
1006
1057
|
|
|
1007
1058
|
/**
|
|
1008
1059
|
* Additional email addresses for this customer. If populated, these email
|
|
1009
|
-
* addresses will be CC'd for customer communications.
|
|
1060
|
+
* addresses will be CC'd for customer communications. The total number of email
|
|
1061
|
+
* addresses (including the primary email) cannot exceed 50.
|
|
1010
1062
|
*/
|
|
1011
1063
|
additional_emails?: Array<string> | null;
|
|
1012
1064
|
|
|
@@ -1017,6 +1069,14 @@ export interface CustomerUpdateByExternalIDParams {
|
|
|
1017
1069
|
*/
|
|
1018
1070
|
auto_collection?: boolean | null;
|
|
1019
1071
|
|
|
1072
|
+
/**
|
|
1073
|
+
* Used to determine if invoices for this customer will be automatically issued. If
|
|
1074
|
+
* true, invoices will be automatically issued. If false, invoices will require
|
|
1075
|
+
* manual approval.If `null` is specified, the customer's auto issuance setting
|
|
1076
|
+
* will be inherited from the account-level setting.
|
|
1077
|
+
*/
|
|
1078
|
+
auto_issuance?: boolean | null;
|
|
1079
|
+
|
|
1020
1080
|
billing_address?: AddressInput | null;
|
|
1021
1081
|
|
|
1022
1082
|
/**
|
|
@@ -1079,7 +1139,12 @@ export interface CustomerUpdateByExternalIDParams {
|
|
|
1079
1139
|
|
|
1080
1140
|
shipping_address?: AddressInput | null;
|
|
1081
1141
|
|
|
1082
|
-
tax_configuration?:
|
|
1142
|
+
tax_configuration?:
|
|
1143
|
+
| NewAvalaraTaxConfiguration
|
|
1144
|
+
| NewTaxJarConfiguration
|
|
1145
|
+
| NewSphereConfiguration
|
|
1146
|
+
| CustomerUpdateByExternalIDParams.NewNumeralConfiguration
|
|
1147
|
+
| null;
|
|
1083
1148
|
|
|
1084
1149
|
/**
|
|
1085
1150
|
* Tax IDs are commonly required to be displayed on customer invoices, which are
|
|
@@ -1230,6 +1295,14 @@ export interface CustomerUpdateByExternalIDParams {
|
|
|
1230
1295
|
tax_id?: Shared.CustomerTaxID | null;
|
|
1231
1296
|
}
|
|
1232
1297
|
|
|
1298
|
+
export namespace CustomerUpdateByExternalIDParams {
|
|
1299
|
+
export interface NewNumeralConfiguration {
|
|
1300
|
+
tax_exempt: boolean;
|
|
1301
|
+
|
|
1302
|
+
tax_provider: 'numeral';
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1233
1306
|
Customers.CustomersPage = CustomersPage;
|
|
1234
1307
|
Customers.Costs = Costs;
|
|
1235
1308
|
Customers.Credits = Credits;
|
|
@@ -17,7 +17,7 @@ export class DimensionalPriceGroups extends APIResource {
|
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* A dimensional price group is used to partition the result of a billable metric
|
|
20
|
-
* by a set of dimensions. Prices in a price group must specify the
|
|
20
|
+
* by a set of dimensions. Prices in a price group must specify the partition used
|
|
21
21
|
* to derive their usage.
|
|
22
22
|
*
|
|
23
23
|
* For example, suppose we have a billable metric that measures the number of
|
|
@@ -39,8 +39,8 @@ export class Backfills extends APIResource {
|
|
|
39
39
|
*
|
|
40
40
|
* When `replace_existing_events` is `true`, this indicates that existing events in
|
|
41
41
|
* the timeframe should no longer be counted towards invoiced usage. In this
|
|
42
|
-
* scenario, the parameter `
|
|
43
|
-
* using
|
|
42
|
+
* scenario, the parameter `deprecation_filter` can be optionally added which
|
|
43
|
+
* enables filtering using
|
|
44
44
|
* [computed properties](/extensibility/advanced-metrics#computed-properties). The
|
|
45
45
|
* expressiveness of computed properties allows you to deprecate existing events
|
|
46
46
|
* based on both a period of time and specific property values.
|
package/src/resources/index.ts
CHANGED
|
@@ -129,8 +129,6 @@ export {
|
|
|
129
129
|
SubscriptionFetchScheduleResponsesPage,
|
|
130
130
|
Subscriptions,
|
|
131
131
|
type DiscountOverride,
|
|
132
|
-
type NewSubscriptionBPSPrice,
|
|
133
|
-
type NewSubscriptionBulkBPSPrice,
|
|
134
132
|
type NewSubscriptionBulkPrice,
|
|
135
133
|
type NewSubscriptionBulkWithProrationPrice,
|
|
136
134
|
type NewSubscriptionCumulativeGroupedBulkPrice,
|
|
@@ -143,13 +141,12 @@ export {
|
|
|
143
141
|
type NewSubscriptionMatrixWithAllocationPrice,
|
|
144
142
|
type NewSubscriptionMatrixWithDisplayNamePrice,
|
|
145
143
|
type NewSubscriptionMaxGroupTieredPackagePrice,
|
|
144
|
+
type NewSubscriptionMinimumCompositePrice,
|
|
146
145
|
type NewSubscriptionPackagePrice,
|
|
147
146
|
type NewSubscriptionPackageWithAllocationPrice,
|
|
148
147
|
type NewSubscriptionScalableMatrixWithTieredPricingPrice,
|
|
149
148
|
type NewSubscriptionScalableMatrixWithUnitPricingPrice,
|
|
150
149
|
type NewSubscriptionThresholdTotalAmountPrice,
|
|
151
|
-
type NewSubscriptionTierWithProrationPrice,
|
|
152
|
-
type NewSubscriptionTieredBPSPrice,
|
|
153
150
|
type NewSubscriptionTieredPackagePrice,
|
|
154
151
|
type NewSubscriptionTieredPackageWithMinimumPrice,
|
|
155
152
|
type NewSubscriptionTieredPrice,
|
|
@@ -136,7 +136,7 @@ export interface InvoiceLineItemCreateResponse {
|
|
|
136
136
|
sub_line_items: Array<Shared.MatrixSubLineItem | Shared.TierSubLineItem | Shared.OtherSubLineItem>;
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
|
-
* The line amount before
|
|
139
|
+
* The line amount before any adjustments.
|
|
140
140
|
*/
|
|
141
141
|
subtotal: string;
|
|
142
142
|
|
|
@@ -107,8 +107,8 @@ export class Invoices extends APIResource {
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
|
-
* This endpoint allows an invoice's status to be set the `paid` status. This
|
|
111
|
-
* only be done to invoices that are in the `issued` status.
|
|
110
|
+
* This endpoint allows an invoice's status to be set to the `paid` status. This
|
|
111
|
+
* can only be done to invoices that are in the `issued` or `synced` status.
|
|
112
112
|
*/
|
|
113
113
|
markPaid(
|
|
114
114
|
invoiceId: string,
|
|
@@ -127,8 +127,8 @@ export class Invoices extends APIResource {
|
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
|
-
* This endpoint allows an invoice's status to be set the `void` status. This
|
|
131
|
-
* only be done to invoices that are in the `issued` status.
|
|
130
|
+
* This endpoint allows an invoice's status to be set to the `void` status. This
|
|
131
|
+
* can only be done to invoices that are in the `issued` status.
|
|
132
132
|
*
|
|
133
133
|
* If the associated invoice has used the customer balance to change the amount
|
|
134
134
|
* due, the customer balance operation will be reverted. For example, if the
|
|
@@ -543,7 +543,8 @@ export namespace InvoiceFetchUpcomingResponse {
|
|
|
543
543
|
| 'credit_note_applied'
|
|
544
544
|
| 'credit_note_voided'
|
|
545
545
|
| 'overpayment_refund'
|
|
546
|
-
| 'external_payment'
|
|
546
|
+
| 'external_payment'
|
|
547
|
+
| 'small_invoice_carryover';
|
|
547
548
|
|
|
548
549
|
/**
|
|
549
550
|
* The value of the amount changed in the transaction.
|
|
@@ -698,7 +699,7 @@ export namespace InvoiceFetchUpcomingResponse {
|
|
|
698
699
|
sub_line_items: Array<Shared.MatrixSubLineItem | Shared.TierSubLineItem | Shared.OtherSubLineItem>;
|
|
699
700
|
|
|
700
701
|
/**
|
|
701
|
-
* The line amount before
|
|
702
|
+
* The line amount before any adjustments.
|
|
702
703
|
*/
|
|
703
704
|
subtotal: string;
|
|
704
705
|
|
|
@@ -740,6 +741,12 @@ export namespace InvoiceFetchUpcomingResponse {
|
|
|
740
741
|
*/
|
|
741
742
|
payment_provider_id: string | null;
|
|
742
743
|
|
|
744
|
+
/**
|
|
745
|
+
* URL to the downloadable PDF version of the receipt. This field will be `null`
|
|
746
|
+
* for payment attempts that did not succeed.
|
|
747
|
+
*/
|
|
748
|
+
receipt_pdf: string | null;
|
|
749
|
+
|
|
743
750
|
/**
|
|
744
751
|
* Whether the payment attempt succeeded.
|
|
745
752
|
*/
|
|
@@ -773,6 +780,12 @@ export interface InvoiceCreateParams {
|
|
|
773
780
|
*/
|
|
774
781
|
discount?: Shared.Discount | null;
|
|
775
782
|
|
|
783
|
+
/**
|
|
784
|
+
* An optional custom due date for the invoice. If not set, the due date will be
|
|
785
|
+
* calculated based on the `net_terms` value.
|
|
786
|
+
*/
|
|
787
|
+
due_date?: (string & {}) | (string & {}) | null;
|
|
788
|
+
|
|
776
789
|
/**
|
|
777
790
|
* The `external_customer_id` of the `Customer` to create this invoice for. One of
|
|
778
791
|
* `customer_id` and `external_customer_id` are required.
|
|
@@ -780,7 +793,8 @@ export interface InvoiceCreateParams {
|
|
|
780
793
|
external_customer_id?: string | null;
|
|
781
794
|
|
|
782
795
|
/**
|
|
783
|
-
* An optional memo to attach to the invoice.
|
|
796
|
+
* An optional memo to attach to the invoice. If no memo is provided, we will
|
|
797
|
+
* attach the default memo
|
|
784
798
|
*/
|
|
785
799
|
memo?: string | null;
|
|
786
800
|
|
|
@@ -792,10 +806,11 @@ export interface InvoiceCreateParams {
|
|
|
792
806
|
metadata?: { [key: string]: string | null } | null;
|
|
793
807
|
|
|
794
808
|
/**
|
|
795
|
-
*
|
|
796
|
-
*
|
|
797
|
-
*
|
|
798
|
-
* 30
|
|
809
|
+
* The net terms determines the due date of the invoice. Due date is calculated
|
|
810
|
+
* based on the invoice or issuance date, depending on the account's configured due
|
|
811
|
+
* date calculation method. A value of '0' here represents that the invoice is due
|
|
812
|
+
* on issue, whereas a value of '30' represents that the customer has 30 days to
|
|
813
|
+
* pay the invoice. Do not set this field if you want to set a custom due date.
|
|
799
814
|
*/
|
|
800
815
|
net_terms?: number | null;
|
|
801
816
|
|
|
@@ -833,17 +848,35 @@ export namespace InvoiceCreateParams {
|
|
|
833
848
|
*/
|
|
834
849
|
start_date: string;
|
|
835
850
|
|
|
851
|
+
/**
|
|
852
|
+
* Configuration for unit pricing
|
|
853
|
+
*/
|
|
836
854
|
unit_config: Shared.UnitConfig;
|
|
837
855
|
}
|
|
838
856
|
}
|
|
839
857
|
|
|
840
858
|
export interface InvoiceUpdateParams {
|
|
859
|
+
/**
|
|
860
|
+
* An optional custom due date for the invoice. If not set, the due date will be
|
|
861
|
+
* calculated based on the `net_terms` value.
|
|
862
|
+
*/
|
|
863
|
+
due_date?: (string & {}) | (string & {}) | null;
|
|
864
|
+
|
|
841
865
|
/**
|
|
842
866
|
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
843
867
|
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
844
868
|
* by setting `metadata` to `null`.
|
|
845
869
|
*/
|
|
846
870
|
metadata?: { [key: string]: string | null } | null;
|
|
871
|
+
|
|
872
|
+
/**
|
|
873
|
+
* The net terms determines the due date of the invoice. Due date is calculated
|
|
874
|
+
* based on the invoice or issuance date, depending on the account's configured due
|
|
875
|
+
* date calculation method. A value of '0' here represents that the invoice is due
|
|
876
|
+
* on issue, whereas a value of '30' represents that the customer has 30 days to
|
|
877
|
+
* pay the invoice. Do not set this field if you want to set a custom due date.
|
|
878
|
+
*/
|
|
879
|
+
net_terms?: number | null;
|
|
847
880
|
}
|
|
848
881
|
|
|
849
882
|
export interface InvoiceListParams extends PageParams {
|
|
@@ -320,40 +320,300 @@ export namespace PlanCreateParams {
|
|
|
320
320
|
plan_phase_order?: number | null;
|
|
321
321
|
|
|
322
322
|
/**
|
|
323
|
-
*
|
|
323
|
+
* New plan price request body params.
|
|
324
324
|
*/
|
|
325
325
|
price?:
|
|
326
326
|
| Shared.NewPlanUnitPrice
|
|
327
|
-
| Shared.NewPlanPackagePrice
|
|
328
|
-
| Shared.NewPlanMatrixPrice
|
|
329
327
|
| Shared.NewPlanTieredPrice
|
|
330
|
-
| Shared.NewPlanTieredBPSPrice
|
|
331
|
-
| Shared.NewPlanBPSPrice
|
|
332
|
-
| Shared.NewPlanBulkBPSPrice
|
|
333
328
|
| Shared.NewPlanBulkPrice
|
|
329
|
+
| Shared.NewPlanPackagePrice
|
|
330
|
+
| Shared.NewPlanMatrixPrice
|
|
334
331
|
| Shared.NewPlanThresholdTotalAmountPrice
|
|
335
332
|
| Shared.NewPlanTieredPackagePrice
|
|
336
333
|
| Shared.NewPlanTieredWithMinimumPrice
|
|
337
|
-
| Shared.
|
|
334
|
+
| Shared.NewPlanGroupedTieredPrice
|
|
335
|
+
| Shared.NewPlanTieredPackageWithMinimumPrice
|
|
338
336
|
| Shared.NewPlanPackageWithAllocationPrice
|
|
339
|
-
| Shared.
|
|
337
|
+
| Shared.NewPlanUnitWithPercentPrice
|
|
338
|
+
| Shared.NewPlanMatrixWithAllocationPrice
|
|
339
|
+
| Price.NewPlanTieredWithProrationPrice
|
|
340
340
|
| Shared.NewPlanUnitWithProrationPrice
|
|
341
341
|
| Shared.NewPlanGroupedAllocationPrice
|
|
342
|
+
| Shared.NewPlanBulkWithProrationPrice
|
|
342
343
|
| Shared.NewPlanGroupedWithProratedMinimumPrice
|
|
343
344
|
| Shared.NewPlanGroupedWithMeteredMinimumPrice
|
|
345
|
+
| Price.NewPlanGroupedWithMinMaxThresholdsPrice
|
|
344
346
|
| Shared.NewPlanMatrixWithDisplayNamePrice
|
|
345
|
-
| Shared.NewPlanBulkWithProrationPrice
|
|
346
347
|
| Shared.NewPlanGroupedTieredPackagePrice
|
|
347
348
|
| Shared.NewPlanMaxGroupTieredPackagePrice
|
|
348
349
|
| Shared.NewPlanScalableMatrixWithUnitPricingPrice
|
|
349
350
|
| Shared.NewPlanScalableMatrixWithTieredPricingPrice
|
|
350
351
|
| Shared.NewPlanCumulativeGroupedBulkPrice
|
|
351
|
-
| Shared.
|
|
352
|
-
| Shared.NewPlanMatrixWithAllocationPrice
|
|
353
|
-
| Shared.NewPlanGroupedTieredPrice
|
|
352
|
+
| Shared.NewPlanMinimumCompositePrice
|
|
354
353
|
| null;
|
|
355
354
|
}
|
|
356
355
|
|
|
356
|
+
export namespace Price {
|
|
357
|
+
export interface NewPlanTieredWithProrationPrice {
|
|
358
|
+
/**
|
|
359
|
+
* The cadence to bill for this price on.
|
|
360
|
+
*/
|
|
361
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* The id of the item the price will be associated with.
|
|
365
|
+
*/
|
|
366
|
+
item_id: string;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* The pricing model type
|
|
370
|
+
*/
|
|
371
|
+
model_type: 'tiered_with_proration';
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* The name of the price.
|
|
375
|
+
*/
|
|
376
|
+
name: string;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Configuration for tiered_with_proration pricing
|
|
380
|
+
*/
|
|
381
|
+
tiered_with_proration_config: NewPlanTieredWithProrationPrice.TieredWithProrationConfig;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
385
|
+
* usage-based.
|
|
386
|
+
*/
|
|
387
|
+
billable_metric_id?: string | null;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
391
|
+
* this is true, and in-arrears if this is false.
|
|
392
|
+
*/
|
|
393
|
+
billed_in_advance?: boolean | null;
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
397
|
+
* months.
|
|
398
|
+
*/
|
|
399
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
403
|
+
*/
|
|
404
|
+
conversion_rate?: number | null;
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
408
|
+
*/
|
|
409
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
413
|
+
* price is billed.
|
|
414
|
+
*/
|
|
415
|
+
currency?: string | null;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* For dimensional price: specifies a price group and dimension values
|
|
419
|
+
*/
|
|
420
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* An alias for the price.
|
|
424
|
+
*/
|
|
425
|
+
external_price_id?: string | null;
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
429
|
+
* applied.
|
|
430
|
+
*/
|
|
431
|
+
fixed_price_quantity?: number | null;
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* The property used to group this price on an invoice
|
|
435
|
+
*/
|
|
436
|
+
invoice_grouping_key?: string | null;
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
440
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
441
|
+
*/
|
|
442
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
446
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
447
|
+
* by setting `metadata` to `null`.
|
|
448
|
+
*/
|
|
449
|
+
metadata?: { [key: string]: string | null } | null;
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
453
|
+
* in the same API call.
|
|
454
|
+
*/
|
|
455
|
+
reference_id?: string | null;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export namespace NewPlanTieredWithProrationPrice {
|
|
459
|
+
/**
|
|
460
|
+
* Configuration for tiered_with_proration pricing
|
|
461
|
+
*/
|
|
462
|
+
export interface TieredWithProrationConfig {
|
|
463
|
+
/**
|
|
464
|
+
* Tiers for rating based on total usage quantities into the specified tier with
|
|
465
|
+
* proration
|
|
466
|
+
*/
|
|
467
|
+
tiers: Array<TieredWithProrationConfig.Tier>;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
export namespace TieredWithProrationConfig {
|
|
471
|
+
/**
|
|
472
|
+
* Configuration for a single tiered with proration tier
|
|
473
|
+
*/
|
|
474
|
+
export interface Tier {
|
|
475
|
+
/**
|
|
476
|
+
* Inclusive tier starting value
|
|
477
|
+
*/
|
|
478
|
+
tier_lower_bound: string;
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* Amount per unit
|
|
482
|
+
*/
|
|
483
|
+
unit_amount: string;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
export interface NewPlanGroupedWithMinMaxThresholdsPrice {
|
|
489
|
+
/**
|
|
490
|
+
* The cadence to bill for this price on.
|
|
491
|
+
*/
|
|
492
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
496
|
+
*/
|
|
497
|
+
grouped_with_min_max_thresholds_config: NewPlanGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* The id of the item the price will be associated with.
|
|
501
|
+
*/
|
|
502
|
+
item_id: string;
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* The pricing model type
|
|
506
|
+
*/
|
|
507
|
+
model_type: 'grouped_with_min_max_thresholds';
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* The name of the price.
|
|
511
|
+
*/
|
|
512
|
+
name: string;
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
516
|
+
* usage-based.
|
|
517
|
+
*/
|
|
518
|
+
billable_metric_id?: string | null;
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
522
|
+
* this is true, and in-arrears if this is false.
|
|
523
|
+
*/
|
|
524
|
+
billed_in_advance?: boolean | null;
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
528
|
+
* months.
|
|
529
|
+
*/
|
|
530
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
534
|
+
*/
|
|
535
|
+
conversion_rate?: number | null;
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
539
|
+
*/
|
|
540
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
544
|
+
* price is billed.
|
|
545
|
+
*/
|
|
546
|
+
currency?: string | null;
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* For dimensional price: specifies a price group and dimension values
|
|
550
|
+
*/
|
|
551
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* An alias for the price.
|
|
555
|
+
*/
|
|
556
|
+
external_price_id?: string | null;
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
560
|
+
* applied.
|
|
561
|
+
*/
|
|
562
|
+
fixed_price_quantity?: number | null;
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* The property used to group this price on an invoice
|
|
566
|
+
*/
|
|
567
|
+
invoice_grouping_key?: string | null;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
571
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
572
|
+
*/
|
|
573
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
577
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
578
|
+
* by setting `metadata` to `null`.
|
|
579
|
+
*/
|
|
580
|
+
metadata?: { [key: string]: string | null } | null;
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
584
|
+
* in the same API call.
|
|
585
|
+
*/
|
|
586
|
+
reference_id?: string | null;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
export namespace NewPlanGroupedWithMinMaxThresholdsPrice {
|
|
590
|
+
/**
|
|
591
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
592
|
+
*/
|
|
593
|
+
export interface GroupedWithMinMaxThresholdsConfig {
|
|
594
|
+
/**
|
|
595
|
+
* The event property used to group before applying thresholds
|
|
596
|
+
*/
|
|
597
|
+
grouping_key: string;
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* The maximum amount to charge each group
|
|
601
|
+
*/
|
|
602
|
+
maximum_charge: string;
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* The minimum amount to charge each group, regardless of usage
|
|
606
|
+
*/
|
|
607
|
+
minimum_charge: string;
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* The base price charged per group
|
|
611
|
+
*/
|
|
612
|
+
per_unit_rate: string;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
|
|
357
617
|
export interface Adjustment {
|
|
358
618
|
/**
|
|
359
619
|
* The definition of a new adjustment to create and add to the plan.
|