@openmeter/sdk 1.0.0-beta.205 → 1.0.0-beta.206

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.
@@ -601,6 +601,26 @@ export interface paths {
601
601
  patch?: never;
602
602
  trace?: never;
603
603
  };
604
+ '/api/v1/customers/{customerIdOrKey}/access': {
605
+ parameters: {
606
+ query?: never;
607
+ header?: never;
608
+ path?: never;
609
+ cookie?: never;
610
+ };
611
+ /**
612
+ * Get customer access
613
+ * @description Get the overall access of a customer.
614
+ */
615
+ get: operations['getCustomerAccess'];
616
+ put?: never;
617
+ post?: never;
618
+ delete?: never;
619
+ options?: never;
620
+ head?: never;
621
+ patch?: never;
622
+ trace?: never;
623
+ };
604
624
  '/api/v1/customers/{customerIdOrKey}/apps': {
605
625
  parameters: {
606
626
  query?: never;
@@ -2256,43 +2276,6 @@ export interface components {
2256
2276
  * Expand settings govern if this includes the whole app object or just the ID references. */
2257
2277
  readonly apps: components['schemas']['BillingProfileAppsOrReference'];
2258
2278
  };
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
2279
  /** @description Party represents a person or business entity. */
2297
2280
  BillingParty: {
2298
2281
  /** @description Unique identifier for the party (if available) */
@@ -3129,6 +3112,14 @@ export interface components {
3129
3112
  */
3130
3113
  readonly currentSubscriptionId?: string;
3131
3114
  };
3115
+ /** @description CustomerAccess describes what features the customer has access to. */
3116
+ CustomerAccess: {
3117
+ /** @description Map of entitlements the customer has access to.
3118
+ * The key is the feature key, the value is the entitlement value + the entitlement ID. */
3119
+ readonly entitlements: {
3120
+ [key: string]: components['schemas']['EntitlementValue'];
3121
+ };
3122
+ };
3132
3123
  /** @description CustomerAppData
3133
3124
  * Stores the app specific data for the customer.
3134
3125
  * One of: stripe, sandbox */
@@ -3336,8 +3327,8 @@ export interface components {
3336
3327
  */
3337
3328
  type: 'dynamic';
3338
3329
  /**
3339
- * The rate to apply to the base price to get the dynamic price
3340
- * @description The rate to apply to the base price to get the dynamic price.
3330
+ * The multiplier to apply to the base price to get the dynamic price
3331
+ * @description The multiplier to apply to the base price to get the dynamic price.
3341
3332
  *
3342
3333
  * Examples:
3343
3334
  * - 0.0: the price is zero
@@ -3346,7 +3337,7 @@ export interface components {
3346
3337
  * - 1.5: the price is 150% of the base price
3347
3338
  * @default 1
3348
3339
  */
3349
- markupRate?: components['schemas']['Numeric'];
3340
+ multiplier?: components['schemas']['Numeric'];
3350
3341
  /**
3351
3342
  * Minimum amount
3352
3343
  * @description The customer is committed to spend at least the amount.
@@ -4688,8 +4679,6 @@ export interface components {
4688
4679
  workflow: components['schemas']['InvoiceWorkflowSettings'];
4689
4680
  /** @description List of invoice lines representing each of the items sold to the customer. */
4690
4681
  lines?: components['schemas']['InvoiceLine'][];
4691
- /** @description Discounts or allowances applied to the complete invoice. */
4692
- discounts?: components['schemas']['Discount'][];
4693
4682
  /** @description Information on when, how, and to whom the invoice should be paid. */
4694
4683
  readonly payment?: components['schemas']['InvoicePaymentTerms'];
4695
4684
  /** @description Validation issues reported by the invoice workflow. */
@@ -4806,18 +4795,16 @@ export interface components {
4806
4795
  * New discounts can be added via the invoice's discounts API, to facilitate
4807
4796
  * discounts that are affecting multiple lines. */
4808
4797
  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
4798
  /** @description The invoice this item belongs to. */
4815
4799
  invoice?: components['schemas']['InvoiceReference'];
4816
4800
  /** @description The currency of this line. */
4817
4801
  currency: components['schemas']['CurrencyCode'];
4818
4802
  /** @description Taxes applied to the invoice totals. */
4819
4803
  readonly taxes?: components['schemas']['InvoiceLineTaxItem'][];
4820
- /** @description Tax config specify the tax configuration for this line. */
4804
+ /**
4805
+ * @deprecated
4806
+ * @description Tax config specify the tax configuration for this line.
4807
+ */
4821
4808
  taxConfig?: components['schemas']['TaxConfig'];
4822
4809
  /** @description The lines detailing the item or service sold. */
4823
4810
  readonly children?: components['schemas']['InvoiceLine'][];
@@ -4836,21 +4823,30 @@ export interface components {
4836
4823
  /** @description External IDs of the invoice in other apps such as Stripe. */
4837
4824
  readonly externalIds?: components['schemas']['InvoiceLineAppExternalIds'];
4838
4825
  /** @description Subscription are the references to the subscritpions that this line is related to. */
4839
- readonly subscriptions?: components['schemas']['InvoiceLineSubscriptionReference'];
4826
+ readonly subscription?: components['schemas']['InvoiceLineSubscriptionReference'];
4840
4827
  /**
4841
4828
  * @description Type of the line. (enum property replaced by openapi-typescript)
4842
4829
  * @enum {string}
4843
4830
  */
4844
4831
  type: 'flat_fee';
4845
- /** @description Price of the item being sold. */
4846
- perUnitAmount: components['schemas']['Numeric'];
4847
4832
  /**
4833
+ * @deprecated
4834
+ * @description Price of the item being sold.
4835
+ */
4836
+ perUnitAmount?: components['schemas']['Numeric'];
4837
+ /**
4838
+ * @deprecated
4848
4839
  * @description Payment term of the line.
4849
4840
  * @default in_advance
4850
4841
  */
4851
4842
  paymentTerm?: components['schemas']['PricePaymentTerm'];
4852
- /** @description Quantity of the item being sold. */
4853
- quantity: components['schemas']['Numeric'];
4843
+ /**
4844
+ * @deprecated
4845
+ * @description Quantity of the item being sold.
4846
+ */
4847
+ quantity?: components['schemas']['Numeric'];
4848
+ /** @description The rate card that is used for this line. */
4849
+ rateCard?: components['schemas']['InvoiceFlatFeeRateCard'];
4854
4850
  /**
4855
4851
  * @description Category of the flat fee.
4856
4852
  * @default regular
@@ -4876,7 +4872,10 @@ export interface components {
4876
4872
  * @description Additional metadata for the resource.
4877
4873
  */
4878
4874
  metadata?: components['schemas']['Metadata'] | null;
4879
- /** @description Tax config specify the tax configuration for this line. */
4875
+ /**
4876
+ * @deprecated
4877
+ * @description Tax config specify the tax configuration for this line.
4878
+ */
4880
4879
  taxConfig?: components['schemas']['TaxConfig'];
4881
4880
  /** @description Period of the line item applies to for revenue recognition pruposes.
4882
4881
  *
@@ -4893,15 +4892,24 @@ export interface components {
4893
4892
  * @enum {string}
4894
4893
  */
4895
4894
  type: 'flat_fee';
4896
- /** @description Price of the item being sold. */
4897
- perUnitAmount: components['schemas']['Numeric'];
4898
4895
  /**
4896
+ * @deprecated
4897
+ * @description Price of the item being sold.
4898
+ */
4899
+ perUnitAmount?: components['schemas']['Numeric'];
4900
+ /**
4901
+ * @deprecated
4899
4902
  * @description Payment term of the line.
4900
4903
  * @default in_advance
4901
4904
  */
4902
4905
  paymentTerm?: components['schemas']['PricePaymentTerm'];
4903
- /** @description Quantity of the item being sold. */
4904
- quantity: components['schemas']['Numeric'];
4906
+ /**
4907
+ * @deprecated
4908
+ * @description Quantity of the item being sold.
4909
+ */
4910
+ quantity?: components['schemas']['Numeric'];
4911
+ /** @description The rate card that is used for this line. */
4912
+ rateCard?: components['schemas']['InvoiceFlatFeeRateCard'];
4905
4913
  /**
4906
4914
  * @description Category of the flat fee.
4907
4915
  * @default regular
@@ -4932,7 +4940,10 @@ export interface components {
4932
4940
  metadata?: components['schemas']['Metadata'] | null;
4933
4941
  /** @description The currency of this line. */
4934
4942
  currency: components['schemas']['CurrencyCode'];
4935
- /** @description Tax config specify the tax configuration for this line. */
4943
+ /**
4944
+ * @deprecated
4945
+ * @description Tax config specify the tax configuration for this line.
4946
+ */
4936
4947
  taxConfig?: components['schemas']['TaxConfig'];
4937
4948
  /** @description Period of the line item applies to for revenue recognition pruposes.
4938
4949
  *
@@ -4949,15 +4960,24 @@ export interface components {
4949
4960
  * @enum {string}
4950
4961
  */
4951
4962
  type: 'flat_fee';
4952
- /** @description Price of the item being sold. */
4953
- perUnitAmount: components['schemas']['Numeric'];
4954
4963
  /**
4964
+ * @deprecated
4965
+ * @description Price of the item being sold.
4966
+ */
4967
+ perUnitAmount?: components['schemas']['Numeric'];
4968
+ /**
4969
+ * @deprecated
4955
4970
  * @description Payment term of the line.
4956
4971
  * @default in_advance
4957
4972
  */
4958
4973
  paymentTerm?: components['schemas']['PricePaymentTerm'];
4959
- /** @description Quantity of the item being sold. */
4960
- quantity: components['schemas']['Numeric'];
4974
+ /**
4975
+ * @deprecated
4976
+ * @description Quantity of the item being sold.
4977
+ */
4978
+ quantity?: components['schemas']['Numeric'];
4979
+ /** @description The rate card that is used for this line. */
4980
+ rateCard?: components['schemas']['InvoiceFlatFeeRateCard'];
4961
4981
  /**
4962
4982
  * @description Category of the flat fee.
4963
4983
  * @default regular
@@ -4969,6 +4989,36 @@ export interface components {
4969
4989
  */
4970
4990
  customerId: string;
4971
4991
  };
4992
+ /** @description InvoiceFlatFeeRateCard represents the rate card (intent) for a flat fee line. */
4993
+ InvoiceFlatFeeRateCard: {
4994
+ /**
4995
+ * Tax config
4996
+ * @description The tax config of the rate card.
4997
+ * When undefined, the tax config of the feature or the default tax config of the plan is used.
4998
+ */
4999
+ taxConfig?: components['schemas']['TaxConfig'];
5000
+ /**
5001
+ * Price
5002
+ * @description The price of the rate card.
5003
+ * When null, the feature or service is free.
5004
+ * @example {
5005
+ * "type": "flat",
5006
+ * "amount": "100",
5007
+ * "paymentTerm": "in_arrears"
5008
+ * }
5009
+ */
5010
+ price: components['schemas']['FlatPriceWithPaymentTerm'] | null;
5011
+ /**
5012
+ * Discounts
5013
+ * @description The discount of the rate card. For flat fee rate cards only percentage discounts are supported.
5014
+ * Only available when price is set.
5015
+ */
5016
+ discounts?: components['schemas']['DiscountPercentage'][];
5017
+ /** @description Quantity of the item being sold.
5018
+ *
5019
+ * Default: 1 */
5020
+ quantity?: components['schemas']['Numeric'];
5021
+ };
4972
5022
  /**
4973
5023
  * InvoiceGenericDocumentRef is used to describe an existing document or a specific part of it's contents.
4974
5024
  * @description Omitted fields:
@@ -4993,8 +5043,10 @@ export interface components {
4993
5043
  /** @description The external ID of the invoice in the tax app if available. */
4994
5044
  readonly tax?: string;
4995
5045
  };
4996
- /** @description InvoiceLineDiscount represents an amount deducted from the line, and will be applied before taxes. */
4997
- InvoiceLineDiscount: {
5046
+ /** @description InvoiceLineDiscount represents the actual discount applied to the invoice line. */
5047
+ InvoiceLineDiscount: components['schemas']['InvoiceLineDiscountAmount'] | components['schemas']['InvoiceLineDiscountUsage'];
5048
+ /** @description InvoiceLineDiscountAmount represents an amount deducted from the line, and will be applied before taxes. */
5049
+ InvoiceLineDiscountAmount: {
4998
5050
  /**
4999
5051
  * Creation Time
5000
5052
  * Format: date-time
@@ -5021,17 +5073,79 @@ export interface components {
5021
5073
  * @example 01G65Z755AFWAKHE12NY0CQ9FH
5022
5074
  */
5023
5075
  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
5076
  /** @description Reason code. */
5029
- code?: string;
5077
+ readonly code?: string;
5030
5078
  /** @description Text description as to why the discount was applied. */
5031
- description?: string;
5079
+ readonly description?: string;
5080
+ /**
5081
+ * Amount in the currency of the invoice
5082
+ * @description Fixed discount amount to apply (calculated if percent present).
5083
+ */
5084
+ readonly amount: components['schemas']['Numeric'];
5085
+ /**
5086
+ * @description The type of the discount. (enum property replaced by openapi-typescript)
5087
+ * @enum {string}
5088
+ */
5089
+ type: 'amount';
5090
+ /** @description The discount from the rate card this discount is based on. */
5091
+ readonly rateCardDiscount?: components['schemas']['Discount'];
5032
5092
  /** @description External IDs of the invoice in other apps such as Stripe. */
5033
5093
  readonly externalIds?: components['schemas']['InvoiceLineAppExternalIds'];
5034
5094
  };
5095
+ /** @description InvoiceLineDiscountUsage represents an usage-based discount applied to the line.
5096
+ *
5097
+ * The deduction is done before the pricing algorithm is applied. */
5098
+ InvoiceLineDiscountUsage: {
5099
+ /**
5100
+ * Creation Time
5101
+ * Format: date-time
5102
+ * @description Timestamp of when the resource was created.
5103
+ * @example 2024-01-01T01:01:01.001Z
5104
+ */
5105
+ readonly createdAt: Date;
5106
+ /**
5107
+ * Last Update Time
5108
+ * Format: date-time
5109
+ * @description Timestamp of when the resource was last updated.
5110
+ * @example 2024-01-01T01:01:01.001Z
5111
+ */
5112
+ readonly updatedAt: Date;
5113
+ /**
5114
+ * Deletion Time
5115
+ * Format: date-time
5116
+ * @description Timestamp of when the resource was permanently deleted.
5117
+ * @example 2024-01-01T01:01:01.001Z
5118
+ */
5119
+ readonly deletedAt?: Date;
5120
+ /**
5121
+ * @description ID of the charge or discount.
5122
+ * @example 01G65Z755AFWAKHE12NY0CQ9FH
5123
+ */
5124
+ readonly id: string;
5125
+ /** @description Reason code. */
5126
+ readonly code?: string;
5127
+ /** @description Text description as to why the discount was applied. */
5128
+ readonly description?: string;
5129
+ /**
5130
+ * Usage quantity in the unit of the underlying meter
5131
+ * @description The usage to apply.
5132
+ */
5133
+ readonly quantity: components['schemas']['Numeric'];
5134
+ /**
5135
+ * Usage quantity in the unit of the underlying meter
5136
+ * @description The usage discount already applied to the previous split lines.
5137
+ *
5138
+ * Only set if progressive billing is enabled and the line is a split line.
5139
+ */
5140
+ readonly preLinePeriodQuantity?: components['schemas']['Numeric'];
5141
+ /**
5142
+ * @description The type of the discount. (enum property replaced by openapi-typescript)
5143
+ * @enum {string}
5144
+ */
5145
+ type: 'usage';
5146
+ /** @description The discount from the rate card this discount is based on. */
5147
+ readonly rateCardDiscount?: components['schemas']['Discount'];
5148
+ };
5035
5149
  /**
5036
5150
  * @description InvoiceLineManagedBy specifies who manages the line.
5037
5151
  * @enum {string}
@@ -5044,7 +5158,7 @@ export interface components {
5044
5158
  * @enum {string}
5045
5159
  */
5046
5160
  InvoiceLineStatus: 'valid' | 'detail' | 'split';
5047
- /** @description InvoiceLineSubscriptionReference contains the references to the subscriptions that this line is related to. */
5161
+ /** @description InvoiceLineSubscriptionReference contains the references to the subscription that this line is related to. */
5048
5162
  InvoiceLineSubscriptionReference: {
5049
5163
  /** @description The subscription. */
5050
5164
  readonly subscription: components['schemas']['IDResource'];
@@ -5205,7 +5319,10 @@ export interface components {
5205
5319
  * @description Additional metadata for the resource.
5206
5320
  */
5207
5321
  metadata?: components['schemas']['Metadata'] | null;
5208
- /** @description Tax config specify the tax configuration for this line. */
5322
+ /**
5323
+ * @deprecated
5324
+ * @description Tax config specify the tax configuration for this line.
5325
+ */
5209
5326
  taxConfig?: components['schemas']['TaxConfig'];
5210
5327
  /** @description Period of the line item applies to for revenue recognition pruposes.
5211
5328
  *
@@ -5222,15 +5339,24 @@ export interface components {
5222
5339
  * @enum {string}
5223
5340
  */
5224
5341
  type: 'flat_fee';
5225
- /** @description Price of the item being sold. */
5226
- perUnitAmount: components['schemas']['Numeric'];
5227
5342
  /**
5343
+ * @deprecated
5344
+ * @description Price of the item being sold.
5345
+ */
5346
+ perUnitAmount?: components['schemas']['Numeric'];
5347
+ /**
5348
+ * @deprecated
5228
5349
  * @description Payment term of the line.
5229
5350
  * @default in_advance
5230
5351
  */
5231
5352
  paymentTerm?: components['schemas']['PricePaymentTerm'];
5232
- /** @description Quantity of the item being sold. */
5233
- quantity: components['schemas']['Numeric'];
5353
+ /**
5354
+ * @deprecated
5355
+ * @description Quantity of the item being sold.
5356
+ */
5357
+ quantity?: components['schemas']['Numeric'];
5358
+ /** @description The rate card that is used for this line. */
5359
+ rateCard?: components['schemas']['InvoiceFlatFeeRateCard'];
5234
5360
  /**
5235
5361
  * @description Category of the flat fee.
5236
5362
  * @default regular
@@ -5274,7 +5400,10 @@ export interface components {
5274
5400
  * @description Additional metadata for the resource.
5275
5401
  */
5276
5402
  metadata?: components['schemas']['Metadata'] | null;
5277
- /** @description Tax config specify the tax configuration for this line. */
5403
+ /**
5404
+ * @deprecated
5405
+ * @description Tax config specify the tax configuration for this line.
5406
+ */
5278
5407
  taxConfig?: components['schemas']['TaxConfig'];
5279
5408
  /** @description Period of the line item applies to for revenue recognition pruposes.
5280
5409
  *
@@ -5291,10 +5420,20 @@ export interface components {
5291
5420
  * @enum {string}
5292
5421
  */
5293
5422
  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;
5423
+ /**
5424
+ * @deprecated
5425
+ * @description Price of the usage-based item being sold.
5426
+ */
5427
+ price?: components['schemas']['RateCardUsageBasedPrice'];
5428
+ /**
5429
+ * @deprecated
5430
+ * @description The feature that the usage is based on.
5431
+ */
5432
+ featureKey?: string;
5433
+ /** @description The rate card that is used for this line.
5434
+ *
5435
+ * The rate card captures the intent of the price and discounts for the usage-based item. */
5436
+ rateCard?: components['schemas']['InvoiceUsageBasedRateCard'];
5298
5437
  /** @description The quantity of the item being sold. */
5299
5438
  quantity: components['schemas']['Numeric'];
5300
5439
  /** @description The quantity of the item used before this line's period, if the line is billed progressively. */
@@ -5405,18 +5544,16 @@ export interface components {
5405
5544
  * New discounts can be added via the invoice's discounts API, to facilitate
5406
5545
  * discounts that are affecting multiple lines. */
5407
5546
  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
5547
  /** @description The invoice this item belongs to. */
5414
5548
  invoice?: components['schemas']['InvoiceReference'];
5415
5549
  /** @description The currency of this line. */
5416
5550
  currency: components['schemas']['CurrencyCode'];
5417
5551
  /** @description Taxes applied to the invoice totals. */
5418
5552
  readonly taxes?: components['schemas']['InvoiceLineTaxItem'][];
5419
- /** @description Tax config specify the tax configuration for this line. */
5553
+ /**
5554
+ * @deprecated
5555
+ * @description Tax config specify the tax configuration for this line.
5556
+ */
5420
5557
  taxConfig?: components['schemas']['TaxConfig'];
5421
5558
  /** @description The lines detailing the item or service sold. */
5422
5559
  readonly children?: components['schemas']['InvoiceLine'][];
@@ -5435,16 +5572,26 @@ export interface components {
5435
5572
  /** @description External IDs of the invoice in other apps such as Stripe. */
5436
5573
  readonly externalIds?: components['schemas']['InvoiceLineAppExternalIds'];
5437
5574
  /** @description Subscription are the references to the subscritpions that this line is related to. */
5438
- readonly subscriptions?: components['schemas']['InvoiceLineSubscriptionReference'];
5575
+ readonly subscription?: components['schemas']['InvoiceLineSubscriptionReference'];
5439
5576
  /**
5440
5577
  * @description Type of the line. (enum property replaced by openapi-typescript)
5441
5578
  * @enum {string}
5442
5579
  */
5443
5580
  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;
5581
+ /**
5582
+ * @deprecated
5583
+ * @description Price of the usage-based item being sold.
5584
+ */
5585
+ price?: components['schemas']['RateCardUsageBasedPrice'];
5586
+ /**
5587
+ * @deprecated
5588
+ * @description The feature that the usage is based on.
5589
+ */
5590
+ featureKey?: string;
5591
+ /** @description The rate card that is used for this line.
5592
+ *
5593
+ * The rate card captures the intent of the price and discounts for the usage-based item. */
5594
+ rateCard?: components['schemas']['InvoiceUsageBasedRateCard'];
5448
5595
  /** @description The quantity of the item being sold. */
5449
5596
  readonly quantity?: components['schemas']['Numeric'];
5450
5597
  /** @description The quantity of the item used in before this line's period.
@@ -5471,7 +5618,10 @@ export interface components {
5471
5618
  * @description Additional metadata for the resource.
5472
5619
  */
5473
5620
  metadata?: components['schemas']['Metadata'] | null;
5474
- /** @description Tax config specify the tax configuration for this line. */
5621
+ /**
5622
+ * @deprecated
5623
+ * @description Tax config specify the tax configuration for this line.
5624
+ */
5475
5625
  taxConfig?: components['schemas']['TaxConfig'];
5476
5626
  /** @description Period of the line item applies to for revenue recognition pruposes.
5477
5627
  *
@@ -5488,10 +5638,20 @@ export interface components {
5488
5638
  * @enum {string}
5489
5639
  */
5490
5640
  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;
5641
+ /**
5642
+ * @deprecated
5643
+ * @description Price of the usage-based item being sold.
5644
+ */
5645
+ price?: components['schemas']['RateCardUsageBasedPrice'];
5646
+ /**
5647
+ * @deprecated
5648
+ * @description The feature that the usage is based on.
5649
+ */
5650
+ featureKey?: string;
5651
+ /** @description The rate card that is used for this line.
5652
+ *
5653
+ * The rate card captures the intent of the price and discounts for the usage-based item. */
5654
+ rateCard?: components['schemas']['InvoiceUsageBasedRateCard'];
5495
5655
  /**
5496
5656
  * @description The ID of the line.
5497
5657
  * @example 01G65Z755AFWAKHE12NY0CQ9FH
@@ -5517,7 +5677,10 @@ export interface components {
5517
5677
  metadata?: components['schemas']['Metadata'] | null;
5518
5678
  /** @description The currency of this line. */
5519
5679
  currency: components['schemas']['CurrencyCode'];
5520
- /** @description Tax config specify the tax configuration for this line. */
5680
+ /**
5681
+ * @deprecated
5682
+ * @description Tax config specify the tax configuration for this line.
5683
+ */
5521
5684
  taxConfig?: components['schemas']['TaxConfig'];
5522
5685
  /** @description Period of the line item applies to for revenue recognition pruposes.
5523
5686
  *
@@ -5534,16 +5697,50 @@ export interface components {
5534
5697
  * @enum {string}
5535
5698
  */
5536
5699
  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;
5700
+ /**
5701
+ * @deprecated
5702
+ * @description Price of the usage-based item being sold.
5703
+ */
5704
+ price?: components['schemas']['RateCardUsageBasedPrice'];
5705
+ /**
5706
+ * @deprecated
5707
+ * @description The feature that the usage is based on.
5708
+ */
5709
+ featureKey?: string;
5710
+ /** @description The rate card that is used for this line.
5711
+ *
5712
+ * The rate card captures the intent of the price and discounts for the usage-based item. */
5713
+ rateCard?: components['schemas']['InvoiceUsageBasedRateCard'];
5541
5714
  /**
5542
5715
  * @description The customer this line item belongs to.
5543
5716
  * @example 01G65Z755AFWAKHE12NY0CQ9FH
5544
5717
  */
5545
5718
  customerId: string;
5546
5719
  };
5720
+ /** @description InvoiceUsageBasedRateCard represents the rate card (intent) for an usage-based line. */
5721
+ InvoiceUsageBasedRateCard: {
5722
+ /**
5723
+ * Feature key
5724
+ * @description The feature the customer is entitled to use.
5725
+ */
5726
+ featureKey?: string;
5727
+ /**
5728
+ * Tax config
5729
+ * @description The tax config of the rate card.
5730
+ * When undefined, the tax config of the feature or the default tax config of the plan is used.
5731
+ */
5732
+ taxConfig?: components['schemas']['TaxConfig'];
5733
+ /** @description The price of the rate card.
5734
+ * When null, the feature or service is free. */
5735
+ price: components['schemas']['RateCardUsageBasedPrice'] | null;
5736
+ /**
5737
+ * Discounts
5738
+ * @description The discounts of the rate card.
5739
+ *
5740
+ * Flat fee rate cards only support percentage discounts.
5741
+ */
5742
+ discounts?: components['schemas']['Discount'][];
5743
+ };
5547
5744
  /** @description InvoiceWorkflowInvoicingSettingsReplaceUpdate represents the update model for the invoicing settings of an invoice workflow. */
5548
5745
  InvoiceWorkflowInvoicingSettingsReplaceUpdate: {
5549
5746
  /**
@@ -8533,7 +8730,6 @@ export type AppType = components['schemas']['AppType'];
8533
8730
  export type BadRequestProblemResponse = components['schemas']['BadRequestProblemResponse'];
8534
8731
  export type BalanceHistoryWindow = components['schemas']['BalanceHistoryWindow'];
8535
8732
  export type BillingCustomerProfile = components['schemas']['BillingCustomerProfile'];
8536
- export type BillingLineCharge = components['schemas']['BillingLineCharge'];
8537
8733
  export type BillingParty = components['schemas']['BillingParty'];
8538
8734
  export type BillingPartyReplaceUpdate = components['schemas']['BillingPartyReplaceUpdate'];
8539
8735
  export type BillingPartyTaxIdentity = components['schemas']['BillingPartyTaxIdentity'];
@@ -8588,6 +8784,7 @@ export type CustomPlanInput = components['schemas']['CustomPlanInput'];
8588
8784
  export type CustomSubscriptionChange = components['schemas']['CustomSubscriptionChange'];
8589
8785
  export type CustomSubscriptionCreate = components['schemas']['CustomSubscriptionCreate'];
8590
8786
  export type Customer = components['schemas']['Customer'];
8787
+ export type CustomerAccess = components['schemas']['CustomerAccess'];
8591
8788
  export type CustomerAppData = components['schemas']['CustomerAppData'];
8592
8789
  export type CustomerAppDataPaginatedResponse = components['schemas']['CustomerAppDataPaginatedResponse'];
8593
8790
  export type CustomerCreate = components['schemas']['CustomerCreate'];
@@ -8657,10 +8854,13 @@ export type InvoiceFlatFeeCategory = components['schemas']['InvoiceFlatFeeCatego
8657
8854
  export type InvoiceFlatFeeLine = components['schemas']['InvoiceFlatFeeLine'];
8658
8855
  export type InvoiceFlatFeeLineReplaceUpdate = components['schemas']['InvoiceFlatFeeLineReplaceUpdate'];
8659
8856
  export type InvoiceFlatFeePendingLineCreate = components['schemas']['InvoiceFlatFeePendingLineCreate'];
8857
+ export type InvoiceFlatFeeRateCard = components['schemas']['InvoiceFlatFeeRateCard'];
8660
8858
  export type InvoiceGenericDocumentRef = components['schemas']['InvoiceGenericDocumentRef'];
8661
8859
  export type InvoiceLine = components['schemas']['InvoiceLine'];
8662
8860
  export type InvoiceLineAppExternalIds = components['schemas']['InvoiceLineAppExternalIds'];
8663
8861
  export type InvoiceLineDiscount = components['schemas']['InvoiceLineDiscount'];
8862
+ export type InvoiceLineDiscountAmount = components['schemas']['InvoiceLineDiscountAmount'];
8863
+ export type InvoiceLineDiscountUsage = components['schemas']['InvoiceLineDiscountUsage'];
8664
8864
  export type InvoiceLineManagedBy = components['schemas']['InvoiceLineManagedBy'];
8665
8865
  export type InvoiceLineReplaceUpdate = components['schemas']['InvoiceLineReplaceUpdate'];
8666
8866
  export type InvoiceLineStatus = components['schemas']['InvoiceLineStatus'];
@@ -8687,6 +8887,7 @@ export type InvoiceType = components['schemas']['InvoiceType'];
8687
8887
  export type InvoiceUsageBasedLine = components['schemas']['InvoiceUsageBasedLine'];
8688
8888
  export type InvoiceUsageBasedLineReplaceUpdate = components['schemas']['InvoiceUsageBasedLineReplaceUpdate'];
8689
8889
  export type InvoiceUsageBasedPendingLineCreate = components['schemas']['InvoiceUsageBasedPendingLineCreate'];
8890
+ export type InvoiceUsageBasedRateCard = components['schemas']['InvoiceUsageBasedRateCard'];
8690
8891
  export type InvoiceWorkflowInvoicingSettingsReplaceUpdate = components['schemas']['InvoiceWorkflowInvoicingSettingsReplaceUpdate'];
8691
8892
  export type InvoiceWorkflowReplaceUpdate = components['schemas']['InvoiceWorkflowReplaceUpdate'];
8692
8893
  export type InvoiceWorkflowSettings = components['schemas']['InvoiceWorkflowSettings'];
@@ -12625,6 +12826,100 @@ export interface operations {
12625
12826
  };
12626
12827
  };
12627
12828
  };
12829
+ getCustomerAccess: {
12830
+ parameters: {
12831
+ query?: never;
12832
+ header?: never;
12833
+ path: {
12834
+ customerIdOrKey: string;
12835
+ };
12836
+ cookie?: never;
12837
+ };
12838
+ requestBody?: never;
12839
+ responses: {
12840
+ /** @description The request has succeeded. */
12841
+ 200: {
12842
+ headers: {
12843
+ [name: string]: unknown;
12844
+ };
12845
+ content: {
12846
+ 'application/json': components['schemas']['CustomerAccess'];
12847
+ };
12848
+ };
12849
+ /** @description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */
12850
+ 400: {
12851
+ headers: {
12852
+ [name: string]: unknown;
12853
+ };
12854
+ content: {
12855
+ 'application/problem+json': components['schemas']['BadRequestProblemResponse'];
12856
+ };
12857
+ };
12858
+ /** @description The request has not been applied because it lacks valid authentication credentials for the target resource. */
12859
+ 401: {
12860
+ headers: {
12861
+ [name: string]: unknown;
12862
+ };
12863
+ content: {
12864
+ 'application/problem+json': components['schemas']['UnauthorizedProblemResponse'];
12865
+ };
12866
+ };
12867
+ /** @description The server understood the request but refuses to authorize it. */
12868
+ 403: {
12869
+ headers: {
12870
+ [name: string]: unknown;
12871
+ };
12872
+ content: {
12873
+ 'application/problem+json': components['schemas']['ForbiddenProblemResponse'];
12874
+ };
12875
+ };
12876
+ /** @description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. */
12877
+ 404: {
12878
+ headers: {
12879
+ [name: string]: unknown;
12880
+ };
12881
+ content: {
12882
+ 'application/problem+json': components['schemas']['NotFoundProblemResponse'];
12883
+ };
12884
+ };
12885
+ /** @description One or more conditions given in the request header fields evaluated to false when tested on the server. */
12886
+ 412: {
12887
+ headers: {
12888
+ [name: string]: unknown;
12889
+ };
12890
+ content: {
12891
+ 'application/problem+json': components['schemas']['PreconditionFailedProblemResponse'];
12892
+ };
12893
+ };
12894
+ /** @description The server encountered an unexpected condition that prevented it from fulfilling the request. */
12895
+ 500: {
12896
+ headers: {
12897
+ [name: string]: unknown;
12898
+ };
12899
+ content: {
12900
+ 'application/problem+json': components['schemas']['InternalServerErrorProblemResponse'];
12901
+ };
12902
+ };
12903
+ /** @description The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. */
12904
+ 503: {
12905
+ headers: {
12906
+ [name: string]: unknown;
12907
+ };
12908
+ content: {
12909
+ 'application/problem+json': components['schemas']['ServiceUnavailableProblemResponse'];
12910
+ };
12911
+ };
12912
+ /** @description An unexpected error response. */
12913
+ default: {
12914
+ headers: {
12915
+ [name: string]: unknown;
12916
+ };
12917
+ content: {
12918
+ 'application/problem+json': components['schemas']['UnexpectedProblemResponse'];
12919
+ };
12920
+ };
12921
+ };
12922
+ };
12628
12923
  listCustomerAppData: {
12629
12924
  parameters: {
12630
12925
  query?: {