@openmeter/sdk 1.0.0-beta-58820b52d5a5 → 1.0.0-beta-3bece3efbf2e

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.
@@ -2256,43 +2256,6 @@ export interface components {
2256
2256
  * Expand settings govern if this includes the whole app object or just the ID references. */
2257
2257
  readonly apps: components['schemas']['BillingProfileAppsOrReference'];
2258
2258
  };
2259
- /** @description InvoiceLineCharge represents an amount added to the line, and will be applied before taxes. */
2260
- BillingLineCharge: {
2261
- /**
2262
- * Creation Time
2263
- * Format: date-time
2264
- * @description Timestamp of when the resource was created.
2265
- * @example 2024-01-01T01:01:01.001Z
2266
- */
2267
- readonly createdAt: Date;
2268
- /**
2269
- * Last Update Time
2270
- * Format: date-time
2271
- * @description Timestamp of when the resource was last updated.
2272
- * @example 2024-01-01T01:01:01.001Z
2273
- */
2274
- readonly updatedAt: Date;
2275
- /**
2276
- * Deletion Time
2277
- * Format: date-time
2278
- * @description Timestamp of when the resource was permanently deleted.
2279
- * @example 2024-01-01T01:01:01.001Z
2280
- */
2281
- readonly deletedAt?: Date;
2282
- /**
2283
- * @description ID of the charge or discount.
2284
- * @example 01G65Z755AFWAKHE12NY0CQ9FH
2285
- */
2286
- readonly id: string;
2287
- /** @description Percentage if fixed amount not applied */
2288
- percent?: components['schemas']['Percentage'];
2289
- /** @description Fixed discount amount to apply (calculated if percent present). */
2290
- amount: components['schemas']['Numeric'];
2291
- /** @description Reason code. */
2292
- code?: string;
2293
- /** @description Text description as to why the discount was applied. */
2294
- description?: string;
2295
- };
2296
2259
  /** @description Party represents a person or business entity. */
2297
2260
  BillingParty: {
2298
2261
  /** @description Unique identifier for the party (if available) */
@@ -4688,8 +4651,6 @@ export interface components {
4688
4651
  workflow: components['schemas']['InvoiceWorkflowSettings'];
4689
4652
  /** @description List of invoice lines representing each of the items sold to the customer. */
4690
4653
  lines?: components['schemas']['InvoiceLine'][];
4691
- /** @description Discounts or allowances applied to the complete invoice. */
4692
- discounts?: components['schemas']['Discount'][];
4693
4654
  /** @description Information on when, how, and to whom the invoice should be paid. */
4694
4655
  readonly payment?: components['schemas']['InvoicePaymentTerms'];
4695
4656
  /** @description Validation issues reported by the invoice workflow. */
@@ -4806,18 +4767,16 @@ export interface components {
4806
4767
  * New discounts can be added via the invoice's discounts API, to facilitate
4807
4768
  * discounts that are affecting multiple lines. */
4808
4769
  readonly discounts?: components['schemas']['InvoiceLineDiscount'][];
4809
- /** @description Charges applied to this line. (like minimum spend)
4810
- *
4811
- * New charges can be added via the invoice's charges API, to facilitate
4812
- * charges that are affecting multiple lines. */
4813
- readonly charges?: components['schemas']['BillingLineCharge'][];
4814
4770
  /** @description The invoice this item belongs to. */
4815
4771
  invoice?: components['schemas']['InvoiceReference'];
4816
4772
  /** @description The currency of this line. */
4817
4773
  currency: components['schemas']['CurrencyCode'];
4818
4774
  /** @description Taxes applied to the invoice totals. */
4819
4775
  readonly taxes?: components['schemas']['InvoiceLineTaxItem'][];
4820
- /** @description Tax config specify the tax configuration for this line. */
4776
+ /**
4777
+ * @deprecated
4778
+ * @description Tax config specify the tax configuration for this line.
4779
+ */
4821
4780
  taxConfig?: components['schemas']['TaxConfig'];
4822
4781
  /** @description The lines detailing the item or service sold. */
4823
4782
  readonly children?: components['schemas']['InvoiceLine'][];
@@ -4836,21 +4795,30 @@ export interface components {
4836
4795
  /** @description External IDs of the invoice in other apps such as Stripe. */
4837
4796
  readonly externalIds?: components['schemas']['InvoiceLineAppExternalIds'];
4838
4797
  /** @description Subscription are the references to the subscritpions that this line is related to. */
4839
- readonly subscriptions?: components['schemas']['InvoiceLineSubscriptionReference'];
4798
+ readonly subscription?: components['schemas']['InvoiceLineSubscriptionReference'];
4840
4799
  /**
4841
4800
  * @description Type of the line. (enum property replaced by openapi-typescript)
4842
4801
  * @enum {string}
4843
4802
  */
4844
4803
  type: 'flat_fee';
4845
- /** @description Price of the item being sold. */
4846
- perUnitAmount: components['schemas']['Numeric'];
4847
4804
  /**
4805
+ * @deprecated
4806
+ * @description Price of the item being sold.
4807
+ */
4808
+ perUnitAmount?: components['schemas']['Numeric'];
4809
+ /**
4810
+ * @deprecated
4848
4811
  * @description Payment term of the line.
4849
4812
  * @default in_advance
4850
4813
  */
4851
4814
  paymentTerm?: components['schemas']['PricePaymentTerm'];
4852
- /** @description Quantity of the item being sold. */
4853
- quantity: components['schemas']['Numeric'];
4815
+ /**
4816
+ * @deprecated
4817
+ * @description Quantity of the item being sold.
4818
+ */
4819
+ quantity?: components['schemas']['Numeric'];
4820
+ /** @description The rate card that is used for this line. */
4821
+ rateCard?: components['schemas']['InvoiceFlatFeeRateCard'];
4854
4822
  /**
4855
4823
  * @description Category of the flat fee.
4856
4824
  * @default regular
@@ -4876,7 +4844,10 @@ export interface components {
4876
4844
  * @description Additional metadata for the resource.
4877
4845
  */
4878
4846
  metadata?: components['schemas']['Metadata'] | null;
4879
- /** @description Tax config specify the tax configuration for this line. */
4847
+ /**
4848
+ * @deprecated
4849
+ * @description Tax config specify the tax configuration for this line.
4850
+ */
4880
4851
  taxConfig?: components['schemas']['TaxConfig'];
4881
4852
  /** @description Period of the line item applies to for revenue recognition pruposes.
4882
4853
  *
@@ -4893,15 +4864,24 @@ export interface components {
4893
4864
  * @enum {string}
4894
4865
  */
4895
4866
  type: 'flat_fee';
4896
- /** @description Price of the item being sold. */
4897
- perUnitAmount: components['schemas']['Numeric'];
4898
4867
  /**
4868
+ * @deprecated
4869
+ * @description Price of the item being sold.
4870
+ */
4871
+ perUnitAmount?: components['schemas']['Numeric'];
4872
+ /**
4873
+ * @deprecated
4899
4874
  * @description Payment term of the line.
4900
4875
  * @default in_advance
4901
4876
  */
4902
4877
  paymentTerm?: components['schemas']['PricePaymentTerm'];
4903
- /** @description Quantity of the item being sold. */
4904
- quantity: components['schemas']['Numeric'];
4878
+ /**
4879
+ * @deprecated
4880
+ * @description Quantity of the item being sold.
4881
+ */
4882
+ quantity?: components['schemas']['Numeric'];
4883
+ /** @description The rate card that is used for this line. */
4884
+ rateCard?: components['schemas']['InvoiceFlatFeeRateCard'];
4905
4885
  /**
4906
4886
  * @description Category of the flat fee.
4907
4887
  * @default regular
@@ -4932,7 +4912,10 @@ export interface components {
4932
4912
  metadata?: components['schemas']['Metadata'] | null;
4933
4913
  /** @description The currency of this line. */
4934
4914
  currency: components['schemas']['CurrencyCode'];
4935
- /** @description Tax config specify the tax configuration for this line. */
4915
+ /**
4916
+ * @deprecated
4917
+ * @description Tax config specify the tax configuration for this line.
4918
+ */
4936
4919
  taxConfig?: components['schemas']['TaxConfig'];
4937
4920
  /** @description Period of the line item applies to for revenue recognition pruposes.
4938
4921
  *
@@ -4949,15 +4932,24 @@ export interface components {
4949
4932
  * @enum {string}
4950
4933
  */
4951
4934
  type: 'flat_fee';
4952
- /** @description Price of the item being sold. */
4953
- perUnitAmount: components['schemas']['Numeric'];
4954
4935
  /**
4936
+ * @deprecated
4937
+ * @description Price of the item being sold.
4938
+ */
4939
+ perUnitAmount?: components['schemas']['Numeric'];
4940
+ /**
4941
+ * @deprecated
4955
4942
  * @description Payment term of the line.
4956
4943
  * @default in_advance
4957
4944
  */
4958
4945
  paymentTerm?: components['schemas']['PricePaymentTerm'];
4959
- /** @description Quantity of the item being sold. */
4960
- quantity: components['schemas']['Numeric'];
4946
+ /**
4947
+ * @deprecated
4948
+ * @description Quantity of the item being sold.
4949
+ */
4950
+ quantity?: components['schemas']['Numeric'];
4951
+ /** @description The rate card that is used for this line. */
4952
+ rateCard?: components['schemas']['InvoiceFlatFeeRateCard'];
4961
4953
  /**
4962
4954
  * @description Category of the flat fee.
4963
4955
  * @default regular
@@ -4969,6 +4961,36 @@ export interface components {
4969
4961
  */
4970
4962
  customerId: string;
4971
4963
  };
4964
+ /** @description InvoiceFlatFeeRateCard represents the rate card (intent) for a flat fee line. */
4965
+ InvoiceFlatFeeRateCard: {
4966
+ /**
4967
+ * Tax config
4968
+ * @description The tax config of the rate card.
4969
+ * When undefined, the tax config of the feature or the default tax config of the plan is used.
4970
+ */
4971
+ taxConfig?: components['schemas']['TaxConfig'];
4972
+ /**
4973
+ * Price
4974
+ * @description The price of the rate card.
4975
+ * When null, the feature or service is free.
4976
+ * @example {
4977
+ * "type": "flat",
4978
+ * "amount": "100",
4979
+ * "paymentTerm": "in_arrears"
4980
+ * }
4981
+ */
4982
+ price: components['schemas']['FlatPriceWithPaymentTerm'] | null;
4983
+ /**
4984
+ * Discounts
4985
+ * @description The discount of the rate card. For flat fee rate cards only percentage discounts are supported.
4986
+ * Only available when price is set.
4987
+ */
4988
+ discounts?: components['schemas']['DiscountPercentage'][];
4989
+ /** @description Quantity of the item being sold.
4990
+ *
4991
+ * Default: 1 */
4992
+ quantity?: components['schemas']['Numeric'];
4993
+ };
4972
4994
  /**
4973
4995
  * InvoiceGenericDocumentRef is used to describe an existing document or a specific part of it's contents.
4974
4996
  * @description Omitted fields:
@@ -4993,8 +5015,10 @@ export interface components {
4993
5015
  /** @description The external ID of the invoice in the tax app if available. */
4994
5016
  readonly tax?: string;
4995
5017
  };
4996
- /** @description InvoiceLineDiscount represents an amount deducted from the line, and will be applied before taxes. */
4997
- InvoiceLineDiscount: {
5018
+ /** @description InvoiceLineDiscount represents the actual discount applied to the invoice line. */
5019
+ InvoiceLineDiscount: components['schemas']['InvoiceLineDiscountAmount'] | components['schemas']['InvoiceLineDiscountUsage'];
5020
+ /** @description InvoiceLineDiscountAmount represents an amount deducted from the line, and will be applied before taxes. */
5021
+ InvoiceLineDiscountAmount: {
4998
5022
  /**
4999
5023
  * Creation Time
5000
5024
  * Format: date-time
@@ -5021,17 +5045,79 @@ export interface components {
5021
5045
  * @example 01G65Z755AFWAKHE12NY0CQ9FH
5022
5046
  */
5023
5047
  readonly id: string;
5024
- /** @description Percentage if fixed amount not applied */
5025
- percent?: components['schemas']['Percentage'];
5026
- /** @description Fixed discount amount to apply (calculated if percent present). */
5027
- amount: components['schemas']['Numeric'];
5028
5048
  /** @description Reason code. */
5029
- code?: string;
5049
+ readonly code?: string;
5030
5050
  /** @description Text description as to why the discount was applied. */
5031
- description?: string;
5051
+ readonly description?: string;
5052
+ /**
5053
+ * Amount in the currency of the invoice
5054
+ * @description Fixed discount amount to apply (calculated if percent present).
5055
+ */
5056
+ readonly amount: components['schemas']['Numeric'];
5057
+ /**
5058
+ * @description The type of the discount. (enum property replaced by openapi-typescript)
5059
+ * @enum {string}
5060
+ */
5061
+ type: 'amount';
5062
+ /** @description The discount from the rate card this discount is based on. */
5063
+ readonly rateCardDiscount?: components['schemas']['Discount'];
5032
5064
  /** @description External IDs of the invoice in other apps such as Stripe. */
5033
5065
  readonly externalIds?: components['schemas']['InvoiceLineAppExternalIds'];
5034
5066
  };
5067
+ /** @description InvoiceLineDiscountUsage represents an usage-based discount applied to the line.
5068
+ *
5069
+ * The deduction is done before the pricing algorithm is applied. */
5070
+ InvoiceLineDiscountUsage: {
5071
+ /**
5072
+ * Creation Time
5073
+ * Format: date-time
5074
+ * @description Timestamp of when the resource was created.
5075
+ * @example 2024-01-01T01:01:01.001Z
5076
+ */
5077
+ readonly createdAt: Date;
5078
+ /**
5079
+ * Last Update Time
5080
+ * Format: date-time
5081
+ * @description Timestamp of when the resource was last updated.
5082
+ * @example 2024-01-01T01:01:01.001Z
5083
+ */
5084
+ readonly updatedAt: Date;
5085
+ /**
5086
+ * Deletion Time
5087
+ * Format: date-time
5088
+ * @description Timestamp of when the resource was permanently deleted.
5089
+ * @example 2024-01-01T01:01:01.001Z
5090
+ */
5091
+ readonly deletedAt?: Date;
5092
+ /**
5093
+ * @description ID of the charge or discount.
5094
+ * @example 01G65Z755AFWAKHE12NY0CQ9FH
5095
+ */
5096
+ readonly id: string;
5097
+ /** @description Reason code. */
5098
+ readonly code?: string;
5099
+ /** @description Text description as to why the discount was applied. */
5100
+ readonly description?: string;
5101
+ /**
5102
+ * Usage quantity in the unit of the underlying meter
5103
+ * @description The usage to apply.
5104
+ */
5105
+ readonly quantity: components['schemas']['Numeric'];
5106
+ /**
5107
+ * Usage quantity in the unit of the underlying meter
5108
+ * @description The usage discount already applied to the previous split lines.
5109
+ *
5110
+ * Only set if progressive billing is enabled and the line is a split line.
5111
+ */
5112
+ readonly preLinePeriodQuantity?: components['schemas']['Numeric'];
5113
+ /**
5114
+ * @description The type of the discount. (enum property replaced by openapi-typescript)
5115
+ * @enum {string}
5116
+ */
5117
+ type: 'usage';
5118
+ /** @description The discount from the rate card this discount is based on. */
5119
+ readonly rateCardDiscount?: components['schemas']['Discount'];
5120
+ };
5035
5121
  /**
5036
5122
  * @description InvoiceLineManagedBy specifies who manages the line.
5037
5123
  * @enum {string}
@@ -5044,7 +5130,7 @@ export interface components {
5044
5130
  * @enum {string}
5045
5131
  */
5046
5132
  InvoiceLineStatus: 'valid' | 'detail' | 'split';
5047
- /** @description InvoiceLineSubscriptionReference contains the references to the subscriptions that this line is related to. */
5133
+ /** @description InvoiceLineSubscriptionReference contains the references to the subscription that this line is related to. */
5048
5134
  InvoiceLineSubscriptionReference: {
5049
5135
  /** @description The subscription. */
5050
5136
  readonly subscription: components['schemas']['IDResource'];
@@ -5205,7 +5291,10 @@ export interface components {
5205
5291
  * @description Additional metadata for the resource.
5206
5292
  */
5207
5293
  metadata?: components['schemas']['Metadata'] | null;
5208
- /** @description Tax config specify the tax configuration for this line. */
5294
+ /**
5295
+ * @deprecated
5296
+ * @description Tax config specify the tax configuration for this line.
5297
+ */
5209
5298
  taxConfig?: components['schemas']['TaxConfig'];
5210
5299
  /** @description Period of the line item applies to for revenue recognition pruposes.
5211
5300
  *
@@ -5222,15 +5311,24 @@ export interface components {
5222
5311
  * @enum {string}
5223
5312
  */
5224
5313
  type: 'flat_fee';
5225
- /** @description Price of the item being sold. */
5226
- perUnitAmount: components['schemas']['Numeric'];
5227
5314
  /**
5315
+ * @deprecated
5316
+ * @description Price of the item being sold.
5317
+ */
5318
+ perUnitAmount?: components['schemas']['Numeric'];
5319
+ /**
5320
+ * @deprecated
5228
5321
  * @description Payment term of the line.
5229
5322
  * @default in_advance
5230
5323
  */
5231
5324
  paymentTerm?: components['schemas']['PricePaymentTerm'];
5232
- /** @description Quantity of the item being sold. */
5233
- quantity: components['schemas']['Numeric'];
5325
+ /**
5326
+ * @deprecated
5327
+ * @description Quantity of the item being sold.
5328
+ */
5329
+ quantity?: components['schemas']['Numeric'];
5330
+ /** @description The rate card that is used for this line. */
5331
+ rateCard?: components['schemas']['InvoiceFlatFeeRateCard'];
5234
5332
  /**
5235
5333
  * @description Category of the flat fee.
5236
5334
  * @default regular
@@ -5274,7 +5372,10 @@ export interface components {
5274
5372
  * @description Additional metadata for the resource.
5275
5373
  */
5276
5374
  metadata?: components['schemas']['Metadata'] | null;
5277
- /** @description Tax config specify the tax configuration for this line. */
5375
+ /**
5376
+ * @deprecated
5377
+ * @description Tax config specify the tax configuration for this line.
5378
+ */
5278
5379
  taxConfig?: components['schemas']['TaxConfig'];
5279
5380
  /** @description Period of the line item applies to for revenue recognition pruposes.
5280
5381
  *
@@ -5291,10 +5392,20 @@ export interface components {
5291
5392
  * @enum {string}
5292
5393
  */
5293
5394
  type: 'usage_based';
5294
- /** @description Price of the usage-based item being sold. */
5295
- price: components['schemas']['RateCardUsageBasedPrice'];
5296
- /** @description The feature that the usage is based on. */
5297
- featureKey: string;
5395
+ /**
5396
+ * @deprecated
5397
+ * @description Price of the usage-based item being sold.
5398
+ */
5399
+ price?: components['schemas']['RateCardUsageBasedPrice'];
5400
+ /**
5401
+ * @deprecated
5402
+ * @description The feature that the usage is based on.
5403
+ */
5404
+ featureKey?: string;
5405
+ /** @description The rate card that is used for this line.
5406
+ *
5407
+ * The rate card captures the intent of the price and discounts for the usage-based item. */
5408
+ rateCard?: components['schemas']['InvoiceUsageBasedRateCard'];
5298
5409
  /** @description The quantity of the item being sold. */
5299
5410
  quantity: components['schemas']['Numeric'];
5300
5411
  /** @description The quantity of the item used before this line's period, if the line is billed progressively. */
@@ -5405,18 +5516,16 @@ export interface components {
5405
5516
  * New discounts can be added via the invoice's discounts API, to facilitate
5406
5517
  * discounts that are affecting multiple lines. */
5407
5518
  readonly discounts?: components['schemas']['InvoiceLineDiscount'][];
5408
- /** @description Charges applied to this line. (like minimum spend)
5409
- *
5410
- * New charges can be added via the invoice's charges API, to facilitate
5411
- * charges that are affecting multiple lines. */
5412
- readonly charges?: components['schemas']['BillingLineCharge'][];
5413
5519
  /** @description The invoice this item belongs to. */
5414
5520
  invoice?: components['schemas']['InvoiceReference'];
5415
5521
  /** @description The currency of this line. */
5416
5522
  currency: components['schemas']['CurrencyCode'];
5417
5523
  /** @description Taxes applied to the invoice totals. */
5418
5524
  readonly taxes?: components['schemas']['InvoiceLineTaxItem'][];
5419
- /** @description Tax config specify the tax configuration for this line. */
5525
+ /**
5526
+ * @deprecated
5527
+ * @description Tax config specify the tax configuration for this line.
5528
+ */
5420
5529
  taxConfig?: components['schemas']['TaxConfig'];
5421
5530
  /** @description The lines detailing the item or service sold. */
5422
5531
  readonly children?: components['schemas']['InvoiceLine'][];
@@ -5435,16 +5544,26 @@ export interface components {
5435
5544
  /** @description External IDs of the invoice in other apps such as Stripe. */
5436
5545
  readonly externalIds?: components['schemas']['InvoiceLineAppExternalIds'];
5437
5546
  /** @description Subscription are the references to the subscritpions that this line is related to. */
5438
- readonly subscriptions?: components['schemas']['InvoiceLineSubscriptionReference'];
5547
+ readonly subscription?: components['schemas']['InvoiceLineSubscriptionReference'];
5439
5548
  /**
5440
5549
  * @description Type of the line. (enum property replaced by openapi-typescript)
5441
5550
  * @enum {string}
5442
5551
  */
5443
5552
  type: 'usage_based';
5444
- /** @description Price of the usage-based item being sold. */
5445
- price: components['schemas']['RateCardUsageBasedPrice'];
5446
- /** @description The feature that the usage is based on. */
5447
- featureKey: string;
5553
+ /**
5554
+ * @deprecated
5555
+ * @description Price of the usage-based item being sold.
5556
+ */
5557
+ price?: components['schemas']['RateCardUsageBasedPrice'];
5558
+ /**
5559
+ * @deprecated
5560
+ * @description The feature that the usage is based on.
5561
+ */
5562
+ featureKey?: string;
5563
+ /** @description The rate card that is used for this line.
5564
+ *
5565
+ * The rate card captures the intent of the price and discounts for the usage-based item. */
5566
+ rateCard?: components['schemas']['InvoiceUsageBasedRateCard'];
5448
5567
  /** @description The quantity of the item being sold. */
5449
5568
  readonly quantity?: components['schemas']['Numeric'];
5450
5569
  /** @description The quantity of the item used in before this line's period.
@@ -5471,7 +5590,10 @@ export interface components {
5471
5590
  * @description Additional metadata for the resource.
5472
5591
  */
5473
5592
  metadata?: components['schemas']['Metadata'] | null;
5474
- /** @description Tax config specify the tax configuration for this line. */
5593
+ /**
5594
+ * @deprecated
5595
+ * @description Tax config specify the tax configuration for this line.
5596
+ */
5475
5597
  taxConfig?: components['schemas']['TaxConfig'];
5476
5598
  /** @description Period of the line item applies to for revenue recognition pruposes.
5477
5599
  *
@@ -5488,10 +5610,20 @@ export interface components {
5488
5610
  * @enum {string}
5489
5611
  */
5490
5612
  type: 'usage_based';
5491
- /** @description Price of the usage-based item being sold. */
5492
- price: components['schemas']['RateCardUsageBasedPrice'];
5493
- /** @description The feature that the usage is based on. */
5494
- featureKey: string;
5613
+ /**
5614
+ * @deprecated
5615
+ * @description Price of the usage-based item being sold.
5616
+ */
5617
+ price?: components['schemas']['RateCardUsageBasedPrice'];
5618
+ /**
5619
+ * @deprecated
5620
+ * @description The feature that the usage is based on.
5621
+ */
5622
+ featureKey?: string;
5623
+ /** @description The rate card that is used for this line.
5624
+ *
5625
+ * The rate card captures the intent of the price and discounts for the usage-based item. */
5626
+ rateCard?: components['schemas']['InvoiceUsageBasedRateCard'];
5495
5627
  /**
5496
5628
  * @description The ID of the line.
5497
5629
  * @example 01G65Z755AFWAKHE12NY0CQ9FH
@@ -5517,7 +5649,10 @@ export interface components {
5517
5649
  metadata?: components['schemas']['Metadata'] | null;
5518
5650
  /** @description The currency of this line. */
5519
5651
  currency: components['schemas']['CurrencyCode'];
5520
- /** @description Tax config specify the tax configuration for this line. */
5652
+ /**
5653
+ * @deprecated
5654
+ * @description Tax config specify the tax configuration for this line.
5655
+ */
5521
5656
  taxConfig?: components['schemas']['TaxConfig'];
5522
5657
  /** @description Period of the line item applies to for revenue recognition pruposes.
5523
5658
  *
@@ -5534,16 +5669,50 @@ export interface components {
5534
5669
  * @enum {string}
5535
5670
  */
5536
5671
  type: 'usage_based';
5537
- /** @description Price of the usage-based item being sold. */
5538
- price: components['schemas']['RateCardUsageBasedPrice'];
5539
- /** @description The feature that the usage is based on. */
5540
- featureKey: string;
5672
+ /**
5673
+ * @deprecated
5674
+ * @description Price of the usage-based item being sold.
5675
+ */
5676
+ price?: components['schemas']['RateCardUsageBasedPrice'];
5677
+ /**
5678
+ * @deprecated
5679
+ * @description The feature that the usage is based on.
5680
+ */
5681
+ featureKey?: string;
5682
+ /** @description The rate card that is used for this line.
5683
+ *
5684
+ * The rate card captures the intent of the price and discounts for the usage-based item. */
5685
+ rateCard?: components['schemas']['InvoiceUsageBasedRateCard'];
5541
5686
  /**
5542
5687
  * @description The customer this line item belongs to.
5543
5688
  * @example 01G65Z755AFWAKHE12NY0CQ9FH
5544
5689
  */
5545
5690
  customerId: string;
5546
5691
  };
5692
+ /** @description InvoiceUsageBasedRateCard represents the rate card (intent) for an usage-based line. */
5693
+ InvoiceUsageBasedRateCard: {
5694
+ /**
5695
+ * Feature key
5696
+ * @description The feature the customer is entitled to use.
5697
+ */
5698
+ featureKey?: string;
5699
+ /**
5700
+ * Tax config
5701
+ * @description The tax config of the rate card.
5702
+ * When undefined, the tax config of the feature or the default tax config of the plan is used.
5703
+ */
5704
+ taxConfig?: components['schemas']['TaxConfig'];
5705
+ /** @description The price of the rate card.
5706
+ * When null, the feature or service is free. */
5707
+ price: components['schemas']['RateCardUsageBasedPrice'] | null;
5708
+ /**
5709
+ * Discounts
5710
+ * @description The discounts of the rate card.
5711
+ *
5712
+ * Flat fee rate cards only support percentage discounts.
5713
+ */
5714
+ discounts?: components['schemas']['Discount'][];
5715
+ };
5547
5716
  /** @description InvoiceWorkflowInvoicingSettingsReplaceUpdate represents the update model for the invoicing settings of an invoice workflow. */
5548
5717
  InvoiceWorkflowInvoicingSettingsReplaceUpdate: {
5549
5718
  /**
@@ -8533,7 +8702,6 @@ export type AppType = components['schemas']['AppType'];
8533
8702
  export type BadRequestProblemResponse = components['schemas']['BadRequestProblemResponse'];
8534
8703
  export type BalanceHistoryWindow = components['schemas']['BalanceHistoryWindow'];
8535
8704
  export type BillingCustomerProfile = components['schemas']['BillingCustomerProfile'];
8536
- export type BillingLineCharge = components['schemas']['BillingLineCharge'];
8537
8705
  export type BillingParty = components['schemas']['BillingParty'];
8538
8706
  export type BillingPartyReplaceUpdate = components['schemas']['BillingPartyReplaceUpdate'];
8539
8707
  export type BillingPartyTaxIdentity = components['schemas']['BillingPartyTaxIdentity'];
@@ -8657,10 +8825,13 @@ export type InvoiceFlatFeeCategory = components['schemas']['InvoiceFlatFeeCatego
8657
8825
  export type InvoiceFlatFeeLine = components['schemas']['InvoiceFlatFeeLine'];
8658
8826
  export type InvoiceFlatFeeLineReplaceUpdate = components['schemas']['InvoiceFlatFeeLineReplaceUpdate'];
8659
8827
  export type InvoiceFlatFeePendingLineCreate = components['schemas']['InvoiceFlatFeePendingLineCreate'];
8828
+ export type InvoiceFlatFeeRateCard = components['schemas']['InvoiceFlatFeeRateCard'];
8660
8829
  export type InvoiceGenericDocumentRef = components['schemas']['InvoiceGenericDocumentRef'];
8661
8830
  export type InvoiceLine = components['schemas']['InvoiceLine'];
8662
8831
  export type InvoiceLineAppExternalIds = components['schemas']['InvoiceLineAppExternalIds'];
8663
8832
  export type InvoiceLineDiscount = components['schemas']['InvoiceLineDiscount'];
8833
+ export type InvoiceLineDiscountAmount = components['schemas']['InvoiceLineDiscountAmount'];
8834
+ export type InvoiceLineDiscountUsage = components['schemas']['InvoiceLineDiscountUsage'];
8664
8835
  export type InvoiceLineManagedBy = components['schemas']['InvoiceLineManagedBy'];
8665
8836
  export type InvoiceLineReplaceUpdate = components['schemas']['InvoiceLineReplaceUpdate'];
8666
8837
  export type InvoiceLineStatus = components['schemas']['InvoiceLineStatus'];
@@ -8687,6 +8858,7 @@ export type InvoiceType = components['schemas']['InvoiceType'];
8687
8858
  export type InvoiceUsageBasedLine = components['schemas']['InvoiceUsageBasedLine'];
8688
8859
  export type InvoiceUsageBasedLineReplaceUpdate = components['schemas']['InvoiceUsageBasedLineReplaceUpdate'];
8689
8860
  export type InvoiceUsageBasedPendingLineCreate = components['schemas']['InvoiceUsageBasedPendingLineCreate'];
8861
+ export type InvoiceUsageBasedRateCard = components['schemas']['InvoiceUsageBasedRateCard'];
8690
8862
  export type InvoiceWorkflowInvoicingSettingsReplaceUpdate = components['schemas']['InvoiceWorkflowInvoicingSettingsReplaceUpdate'];
8691
8863
  export type InvoiceWorkflowReplaceUpdate = components['schemas']['InvoiceWorkflowReplaceUpdate'];
8692
8864
  export type InvoiceWorkflowSettings = components['schemas']['InvoiceWorkflowSettings'];