orb-billing 2.2.0 → 2.4.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.
Files changed (123) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/client.d.ts +222 -0
  3. package/client.d.ts.map +1 -0
  4. package/client.js +156 -0
  5. package/client.js.map +1 -0
  6. package/client.mjs +129 -0
  7. package/client.mjs.map +1 -0
  8. package/index.d.mts +5 -217
  9. package/index.d.ts +5 -217
  10. package/index.d.ts.map +1 -1
  11. package/index.js +10 -133
  12. package/index.js.map +1 -1
  13. package/index.mjs +5 -130
  14. package/index.mjs.map +1 -1
  15. package/package.json +4 -4
  16. package/resources/coupons/coupons.d.ts +3 -22
  17. package/resources/coupons/coupons.d.ts.map +1 -1
  18. package/resources/coupons/coupons.js.map +1 -1
  19. package/resources/coupons/coupons.mjs.map +1 -1
  20. package/resources/customers/costs.d.ts +4 -4
  21. package/resources/customers/costs.d.ts.map +1 -1
  22. package/resources/customers/costs.js.map +1 -1
  23. package/resources/customers/costs.mjs.map +1 -1
  24. package/resources/customers/credits/credits.d.ts +12 -4
  25. package/resources/customers/credits/credits.d.ts.map +1 -1
  26. package/resources/customers/credits/credits.js.map +1 -1
  27. package/resources/customers/credits/credits.mjs.map +1 -1
  28. package/resources/customers/credits/ledger.d.ts +16 -6
  29. package/resources/customers/credits/ledger.d.ts.map +1 -1
  30. package/resources/customers/credits/ledger.js.map +1 -1
  31. package/resources/customers/credits/ledger.mjs.map +1 -1
  32. package/resources/customers/credits/top-ups.d.ts +38 -8
  33. package/resources/customers/credits/top-ups.d.ts.map +1 -1
  34. package/resources/customers/credits/top-ups.js.map +1 -1
  35. package/resources/customers/credits/top-ups.mjs.map +1 -1
  36. package/resources/customers/usage.d.ts +2 -2
  37. package/resources/customers/usage.d.ts.map +1 -1
  38. package/resources/customers/usage.js.map +1 -1
  39. package/resources/customers/usage.mjs.map +1 -1
  40. package/resources/events/backfills.d.ts +20 -0
  41. package/resources/events/backfills.d.ts.map +1 -1
  42. package/resources/events/backfills.js.map +1 -1
  43. package/resources/events/backfills.mjs.map +1 -1
  44. package/resources/index.d.ts +2 -3
  45. package/resources/index.d.ts.map +1 -1
  46. package/resources/index.js +4 -6
  47. package/resources/index.js.map +1 -1
  48. package/resources/index.mjs +1 -2
  49. package/resources/index.mjs.map +1 -1
  50. package/resources/invoices.d.ts +1 -1
  51. package/resources/invoices.js +1 -1
  52. package/resources/invoices.mjs +1 -1
  53. package/resources/plans/plans.d.ts +118 -1
  54. package/resources/plans/plans.d.ts.map +1 -1
  55. package/resources/plans/plans.js.map +1 -1
  56. package/resources/plans/plans.mjs.map +1 -1
  57. package/resources/prices/index.d.ts +1 -1
  58. package/resources/prices/index.d.ts.map +1 -1
  59. package/resources/prices/index.js +3 -3
  60. package/resources/prices/index.js.map +1 -1
  61. package/resources/prices/index.mjs +1 -1
  62. package/resources/prices/index.mjs.map +1 -1
  63. package/resources/prices/prices.d.ts +236 -2
  64. package/resources/prices/prices.d.ts.map +1 -1
  65. package/resources/prices/prices.js +26 -0
  66. package/resources/prices/prices.js.map +1 -1
  67. package/resources/prices/prices.mjs +26 -0
  68. package/resources/prices/prices.mjs.map +1 -1
  69. package/resources/shared.d.ts +5 -0
  70. package/resources/shared.d.ts.map +1 -1
  71. package/resources/subscriptions.d.ts +353 -19
  72. package/resources/subscriptions.d.ts.map +1 -1
  73. package/resources/subscriptions.js +11 -0
  74. package/resources/subscriptions.js.map +1 -1
  75. package/resources/subscriptions.mjs +11 -0
  76. package/resources/subscriptions.mjs.map +1 -1
  77. package/resources/webhooks.d.ts.map +1 -1
  78. package/resources/webhooks.js +4 -2
  79. package/resources/webhooks.js.map +1 -1
  80. package/resources/webhooks.mjs +5 -3
  81. package/resources/webhooks.mjs.map +1 -1
  82. package/src/client.ts +301 -0
  83. package/src/index.ts +6 -297
  84. package/src/resources/coupons/coupons.ts +3 -26
  85. package/src/resources/customers/costs.ts +6 -6
  86. package/src/resources/customers/credits/credits.ts +16 -6
  87. package/src/resources/customers/credits/ledger.ts +20 -8
  88. package/src/resources/customers/credits/top-ups.ts +46 -10
  89. package/src/resources/customers/usage.ts +2 -2
  90. package/src/resources/events/backfills.ts +25 -0
  91. package/src/resources/index.ts +11 -2
  92. package/src/resources/invoices.ts +1 -1
  93. package/src/resources/plans/plans.ts +144 -1
  94. package/src/resources/prices/index.ts +10 -1
  95. package/src/resources/prices/prices.ts +333 -2
  96. package/src/resources/shared.ts +8 -0
  97. package/src/resources/subscriptions.ts +441 -23
  98. package/src/resources/webhooks.ts +5 -3
  99. package/src/version.ts +1 -1
  100. package/version.d.ts +1 -1
  101. package/version.js +1 -1
  102. package/version.mjs +1 -1
  103. package/resources/beta/beta.d.ts +0 -12
  104. package/resources/beta/beta.d.ts.map +0 -1
  105. package/resources/beta/beta.js +0 -40
  106. package/resources/beta/beta.js.map +0 -1
  107. package/resources/beta/beta.mjs +0 -13
  108. package/resources/beta/beta.mjs.map +0 -1
  109. package/resources/beta/index.d.ts +0 -3
  110. package/resources/beta/index.d.ts.map +0 -1
  111. package/resources/beta/index.js +0 -9
  112. package/resources/beta/index.js.map +0 -1
  113. package/resources/beta/index.mjs +0 -4
  114. package/resources/beta/index.mjs.map +0 -1
  115. package/resources/beta/price.d.ts +0 -82
  116. package/resources/beta/price.d.ts.map +0 -1
  117. package/resources/beta/price.js +0 -37
  118. package/resources/beta/price.js.map +0 -1
  119. package/resources/beta/price.mjs +0 -33
  120. package/resources/beta/price.mjs.map +0 -1
  121. package/src/resources/beta/beta.ts +0 -15
  122. package/src/resources/beta/index.ts +0 -4
  123. package/src/resources/beta/price.ts +0 -101
@@ -1,6 +1,7 @@
1
1
  import * as Core from 'orb-billing/core';
2
2
  import { APIResource } from 'orb-billing/resource';
3
3
  import * as SubscriptionsAPI from 'orb-billing/resources/subscriptions';
4
+ import * as Shared from 'orb-billing/resources/shared';
4
5
  import * as CustomersAPI from 'orb-billing/resources/customers/customers';
5
6
  import * as PlansAPI from 'orb-billing/resources/plans/plans';
6
7
  import * as PricesAPI from 'orb-billing/resources/prices/prices';
@@ -400,6 +401,13 @@ export declare class Subscriptions extends APIResource {
400
401
  */
401
402
  create(body?: SubscriptionCreateParams, options?: Core.RequestOptions): Core.APIPromise<Subscription>;
402
403
  create(options?: Core.RequestOptions): Core.APIPromise<Subscription>;
404
+ /**
405
+ * This endpoint can be used to update the `metadata`, `net terms`,
406
+ * `auto_collection`, `invoicing_threshold`, and `default_invoice_memo` properties
407
+ * on a subscription.
408
+ */
409
+ update(subscriptionId: string, body?: SubscriptionUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Subscription>;
410
+ update(subscriptionId: string, options?: Core.RequestOptions): Core.APIPromise<Subscription>;
403
411
  /**
404
412
  * This endpoint returns a list of all subscriptions for an account as a
405
413
  * [paginated](../reference/pagination) list, ordered starting from the most
@@ -795,6 +803,11 @@ export declare class Subscriptions extends APIResource {
795
803
  * default for the plan. The request format for price overrides, maximums, and
796
804
  * minimums are the same as those in [subscription creation](create-subscription).
797
805
  *
806
+ * ## Scheduling multiple plan changes
807
+ *
808
+ * When scheduling multiple plan changes with the same date, the latest plan change
809
+ * on that day takes effect.
810
+ *
798
811
  * ## Prorations for in-advance fees
799
812
  *
800
813
  * By default, Orb calculates the prorated difference in any fixed fees when making
@@ -1422,7 +1435,7 @@ export declare namespace SubscriptionUsage {
1422
1435
  }
1423
1436
  interface GroupedSubscriptionUsage {
1424
1437
  data: Array<GroupedSubscriptionUsage.Data>;
1425
- pagination_metadata?: GroupedSubscriptionUsage.PaginationMetadata | null;
1438
+ pagination_metadata?: Shared.PaginationMetadata | null;
1426
1439
  }
1427
1440
  namespace GroupedSubscriptionUsage {
1428
1441
  interface Data {
@@ -1446,21 +1459,11 @@ export declare namespace SubscriptionUsage {
1446
1459
  timeframe_start: string;
1447
1460
  }
1448
1461
  }
1449
- interface PaginationMetadata {
1450
- has_more: boolean;
1451
- next_cursor: string | null;
1452
- }
1453
1462
  }
1454
1463
  }
1455
1464
  export interface Subscriptions {
1456
1465
  data: Array<Subscription>;
1457
- pagination_metadata: Subscriptions.PaginationMetadata;
1458
- }
1459
- export declare namespace Subscriptions {
1460
- interface PaginationMetadata {
1461
- has_more: boolean;
1462
- next_cursor: string | null;
1463
- }
1466
+ pagination_metadata: Shared.PaginationMetadata;
1464
1467
  }
1465
1468
  export interface SubscriptionFetchCostsResponse {
1466
1469
  data: Array<SubscriptionFetchCostsResponse.Data>;
@@ -1791,6 +1794,15 @@ export declare namespace SubscriptionCreateParams {
1791
1794
  id: string;
1792
1795
  model_type: 'unit';
1793
1796
  unit_config: OverrideUnitPrice.UnitConfig;
1797
+ /**
1798
+ * The per unit conversion rate of the price currency to the invoicing currency.
1799
+ */
1800
+ conversion_rate?: number | null;
1801
+ /**
1802
+ * The currency of the price. If not provided, the currency of the plan will be
1803
+ * used.
1804
+ */
1805
+ currency?: string | null;
1794
1806
  /**
1795
1807
  * The subscription's override discount for the plan.
1796
1808
  */
@@ -1849,6 +1861,15 @@ export declare namespace SubscriptionCreateParams {
1849
1861
  id: string;
1850
1862
  model_type: 'package';
1851
1863
  package_config: OverridePackagePrice.PackageConfig;
1864
+ /**
1865
+ * The per unit conversion rate of the price currency to the invoicing currency.
1866
+ */
1867
+ conversion_rate?: number | null;
1868
+ /**
1869
+ * The currency of the price. If not provided, the currency of the plan will be
1870
+ * used.
1871
+ */
1872
+ currency?: string | null;
1852
1873
  /**
1853
1874
  * The subscription's override discount for the plan.
1854
1875
  */
@@ -1876,7 +1897,7 @@ export declare namespace SubscriptionCreateParams {
1876
1897
  * An integer amount to represent package size. For example, 1000 here would divide
1877
1898
  * usage by 1000 before multiplying by package_amount in rating
1878
1899
  */
1879
- package_size?: number | null;
1900
+ package_size: number;
1880
1901
  }
1881
1902
  /**
1882
1903
  * The subscription's override discount for the plan.
@@ -1912,6 +1933,15 @@ export declare namespace SubscriptionCreateParams {
1912
1933
  id: string;
1913
1934
  matrix_config: OverrideMatrixPrice.MatrixConfig;
1914
1935
  model_type: 'matrix';
1936
+ /**
1937
+ * The per unit conversion rate of the price currency to the invoicing currency.
1938
+ */
1939
+ conversion_rate?: number | null;
1940
+ /**
1941
+ * The currency of the price. If not provided, the currency of the plan will be
1942
+ * used.
1943
+ */
1944
+ currency?: string | null;
1915
1945
  /**
1916
1946
  * The subscription's override discount for the plan.
1917
1947
  */
@@ -1992,6 +2022,15 @@ export declare namespace SubscriptionCreateParams {
1992
2022
  id: string;
1993
2023
  model_type: 'tiered';
1994
2024
  tiered_config: OverrideTieredPrice.TieredConfig;
2025
+ /**
2026
+ * The per unit conversion rate of the price currency to the invoicing currency.
2027
+ */
2028
+ conversion_rate?: number | null;
2029
+ /**
2030
+ * The currency of the price. If not provided, the currency of the plan will be
2031
+ * used.
2032
+ */
2033
+ currency?: string | null;
1995
2034
  /**
1996
2035
  * The subscription's override discount for the plan.
1997
2036
  */
@@ -2066,6 +2105,15 @@ export declare namespace SubscriptionCreateParams {
2066
2105
  id: string;
2067
2106
  model_type: 'tiered_bps';
2068
2107
  tiered_bps_config: OverrideTieredBpsPrice.TieredBpsConfig;
2108
+ /**
2109
+ * The per unit conversion rate of the price currency to the invoicing currency.
2110
+ */
2111
+ conversion_rate?: number | null;
2112
+ /**
2113
+ * The currency of the price. If not provided, the currency of the plan will be
2114
+ * used.
2115
+ */
2116
+ currency?: string | null;
2069
2117
  /**
2070
2118
  * The subscription's override discount for the plan.
2071
2119
  */
@@ -2145,6 +2193,15 @@ export declare namespace SubscriptionCreateParams {
2145
2193
  id: string;
2146
2194
  bps_config: OverrideBpsPrice.BpsConfig;
2147
2195
  model_type: 'bps';
2196
+ /**
2197
+ * The per unit conversion rate of the price currency to the invoicing currency.
2198
+ */
2199
+ conversion_rate?: number | null;
2200
+ /**
2201
+ * The currency of the price. If not provided, the currency of the plan will be
2202
+ * used.
2203
+ */
2204
+ currency?: string | null;
2148
2205
  /**
2149
2206
  * The subscription's override discount for the plan.
2150
2207
  */
@@ -2207,6 +2264,15 @@ export declare namespace SubscriptionCreateParams {
2207
2264
  id: string;
2208
2265
  bulk_bps_config: OverrideBulkBpsPrice.BulkBpsConfig;
2209
2266
  model_type: 'bulk_bps';
2267
+ /**
2268
+ * The per unit conversion rate of the price currency to the invoicing currency.
2269
+ */
2270
+ conversion_rate?: number | null;
2271
+ /**
2272
+ * The currency of the price. If not provided, the currency of the plan will be
2273
+ * used.
2274
+ */
2275
+ currency?: string | null;
2210
2276
  /**
2211
2277
  * The subscription's override discount for the plan.
2212
2278
  */
@@ -2282,6 +2348,15 @@ export declare namespace SubscriptionCreateParams {
2282
2348
  id: string;
2283
2349
  bulk_config: OverrideBulkPrice.BulkConfig;
2284
2350
  model_type: 'bulk';
2351
+ /**
2352
+ * The per unit conversion rate of the price currency to the invoicing currency.
2353
+ */
2354
+ conversion_rate?: number | null;
2355
+ /**
2356
+ * The currency of the price. If not provided, the currency of the plan will be
2357
+ * used.
2358
+ */
2359
+ currency?: string | null;
2285
2360
  /**
2286
2361
  * The subscription's override discount for the plan.
2287
2362
  */
@@ -2352,6 +2427,15 @@ export declare namespace SubscriptionCreateParams {
2352
2427
  id: string;
2353
2428
  model_type: 'threshold_total_amount';
2354
2429
  threshold_total_amount_config: Record<string, unknown>;
2430
+ /**
2431
+ * The per unit conversion rate of the price currency to the invoicing currency.
2432
+ */
2433
+ conversion_rate?: number | null;
2434
+ /**
2435
+ * The currency of the price. If not provided, the currency of the plan will be
2436
+ * used.
2437
+ */
2438
+ currency?: string | null;
2355
2439
  /**
2356
2440
  * The subscription's override discount for the plan.
2357
2441
  */
@@ -2404,6 +2488,15 @@ export declare namespace SubscriptionCreateParams {
2404
2488
  id: string;
2405
2489
  model_type: 'tiered_package';
2406
2490
  tiered_package_config: Record<string, unknown>;
2491
+ /**
2492
+ * The per unit conversion rate of the price currency to the invoicing currency.
2493
+ */
2494
+ conversion_rate?: number | null;
2495
+ /**
2496
+ * The currency of the price. If not provided, the currency of the plan will be
2497
+ * used.
2498
+ */
2499
+ currency?: string | null;
2407
2500
  /**
2408
2501
  * The subscription's override discount for the plan.
2409
2502
  */
@@ -2456,6 +2549,15 @@ export declare namespace SubscriptionCreateParams {
2456
2549
  id: string;
2457
2550
  model_type: 'tiered_with_minimum';
2458
2551
  tiered_with_minimum_config: Record<string, unknown>;
2552
+ /**
2553
+ * The per unit conversion rate of the price currency to the invoicing currency.
2554
+ */
2555
+ conversion_rate?: number | null;
2556
+ /**
2557
+ * The currency of the price. If not provided, the currency of the plan will be
2558
+ * used.
2559
+ */
2560
+ currency?: string | null;
2459
2561
  /**
2460
2562
  * The subscription's override discount for the plan.
2461
2563
  */
@@ -2508,6 +2610,15 @@ export declare namespace SubscriptionCreateParams {
2508
2610
  id: string;
2509
2611
  model_type: 'package_with_allocation';
2510
2612
  package_with_allocation_config: Record<string, unknown>;
2613
+ /**
2614
+ * The per unit conversion rate of the price currency to the invoicing currency.
2615
+ */
2616
+ conversion_rate?: number | null;
2617
+ /**
2618
+ * The currency of the price. If not provided, the currency of the plan will be
2619
+ * used.
2620
+ */
2621
+ currency?: string | null;
2511
2622
  /**
2512
2623
  * The subscription's override discount for the plan.
2513
2624
  */
@@ -2560,6 +2671,15 @@ export declare namespace SubscriptionCreateParams {
2560
2671
  id: string;
2561
2672
  model_type: 'unit_with_percent';
2562
2673
  unit_with_percent_config: Record<string, unknown>;
2674
+ /**
2675
+ * The per unit conversion rate of the price currency to the invoicing currency.
2676
+ */
2677
+ conversion_rate?: number | null;
2678
+ /**
2679
+ * The currency of the price. If not provided, the currency of the plan will be
2680
+ * used.
2681
+ */
2682
+ currency?: string | null;
2563
2683
  /**
2564
2684
  * The subscription's override discount for the plan.
2565
2685
  */
@@ -2609,6 +2729,38 @@ export declare namespace SubscriptionCreateParams {
2609
2729
  }
2610
2730
  }
2611
2731
  }
2732
+ export interface SubscriptionUpdateParams {
2733
+ /**
2734
+ * Determines whether issued invoices for this subscription will automatically be
2735
+ * charged with the saved payment method on the due date. This property defaults to
2736
+ * the plan's behavior.
2737
+ */
2738
+ auto_collection?: boolean | null;
2739
+ /**
2740
+ * Determines the default memo on this subscription's invoices. Note that if this
2741
+ * is not provided, it is determined by the plan configuration.
2742
+ */
2743
+ default_invoice_memo?: string | null;
2744
+ /**
2745
+ * When this subscription's accrued usage reaches this threshold, an invoice will
2746
+ * be issued for the subscription. If not specified, invoices will only be issued
2747
+ * at the end of the billing period.
2748
+ */
2749
+ invoicing_threshold?: string | null;
2750
+ /**
2751
+ * User-specified key/value pairs for the resource. Individual keys can be removed
2752
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
2753
+ * by setting `metadata` to `null`.
2754
+ */
2755
+ metadata?: Record<string, string | null> | null;
2756
+ /**
2757
+ * Determines the difference between the invoice issue date for subscription
2758
+ * invoices as the date that they are due. A value of `0` here represents that the
2759
+ * invoice is due on issue, whereas a value of `30` represents that the customer
2760
+ * has a month to pay the invoice.
2761
+ */
2762
+ net_terms?: number | null;
2763
+ }
2612
2764
  export interface SubscriptionListParams extends PageParams {
2613
2765
  'created_at[gt]'?: string | null;
2614
2766
  'created_at[gte]'?: string | null;
@@ -2713,7 +2865,7 @@ export declare namespace SubscriptionPriceIntervalsParams {
2713
2865
  * The start date of the price interval. This is the date that the price will start
2714
2866
  * billing on the subscription.
2715
2867
  */
2716
- start_date: (string & {}) | 'start_of_term' | 'end_of_term';
2868
+ start_date: (string & {}) | Shared.BillingCycleRelativeDate;
2717
2869
  /**
2718
2870
  * A list of discounts to initialize on the price interval.
2719
2871
  */
@@ -2722,7 +2874,7 @@ export declare namespace SubscriptionPriceIntervalsParams {
2722
2874
  * The end date of the price interval. This is the date that the price will stop
2723
2875
  * billing on the subscription.
2724
2876
  */
2725
- end_date?: (string & {}) | 'start_of_term' | 'end_of_term' | null;
2877
+ end_date?: (string & {}) | Shared.BillingCycleRelativeDate | null;
2726
2878
  /**
2727
2879
  * The external price id of the price to add to the subscription.
2728
2880
  */
@@ -2813,6 +2965,10 @@ export declare namespace SubscriptionPriceIntervalsParams {
2813
2965
  * this is true, and in-arrears if this is false.
2814
2966
  */
2815
2967
  billed_in_advance?: boolean | null;
2968
+ /**
2969
+ * The per unit conversion rate of the price currency to the invoicing currency.
2970
+ */
2971
+ conversion_rate?: number | null;
2816
2972
  /**
2817
2973
  * An alias for the price.
2818
2974
  */
@@ -2864,6 +3020,10 @@ export declare namespace SubscriptionPriceIntervalsParams {
2864
3020
  * this is true, and in-arrears if this is false.
2865
3021
  */
2866
3022
  billed_in_advance?: boolean | null;
3023
+ /**
3024
+ * The per unit conversion rate of the price currency to the invoicing currency.
3025
+ */
3026
+ conversion_rate?: number | null;
2867
3027
  /**
2868
3028
  * An alias for the price.
2869
3029
  */
@@ -2888,7 +3048,7 @@ export declare namespace SubscriptionPriceIntervalsParams {
2888
3048
  * An integer amount to represent package size. For example, 1000 here would divide
2889
3049
  * usage by 1000 before multiplying by package_amount in rating
2890
3050
  */
2891
- package_size?: number | null;
3051
+ package_size: number;
2892
3052
  }
2893
3053
  }
2894
3054
  interface NewFloatingMatrixPrice {
@@ -2920,6 +3080,10 @@ export declare namespace SubscriptionPriceIntervalsParams {
2920
3080
  * this is true, and in-arrears if this is false.
2921
3081
  */
2922
3082
  billed_in_advance?: boolean | null;
3083
+ /**
3084
+ * The per unit conversion rate of the price currency to the invoicing currency.
3085
+ */
3086
+ conversion_rate?: number | null;
2923
3087
  /**
2924
3088
  * An alias for the price.
2925
3089
  */
@@ -2993,6 +3157,10 @@ export declare namespace SubscriptionPriceIntervalsParams {
2993
3157
  * this is true, and in-arrears if this is false.
2994
3158
  */
2995
3159
  billed_in_advance?: boolean | null;
3160
+ /**
3161
+ * The per unit conversion rate of the price currency to the invoicing currency.
3162
+ */
3163
+ conversion_rate?: number | null;
2996
3164
  /**
2997
3165
  * An alias for the price.
2998
3166
  */
@@ -3070,6 +3238,10 @@ export declare namespace SubscriptionPriceIntervalsParams {
3070
3238
  * this is true, and in-arrears if this is false.
3071
3239
  */
3072
3240
  billed_in_advance?: boolean | null;
3241
+ /**
3242
+ * The per unit conversion rate of the price currency to the invoicing currency.
3243
+ */
3244
+ conversion_rate?: number | null;
3073
3245
  /**
3074
3246
  * An alias for the price.
3075
3247
  */
@@ -3137,6 +3309,10 @@ export declare namespace SubscriptionPriceIntervalsParams {
3137
3309
  * this is true, and in-arrears if this is false.
3138
3310
  */
3139
3311
  billed_in_advance?: boolean | null;
3312
+ /**
3313
+ * The per unit conversion rate of the price currency to the invoicing currency.
3314
+ */
3315
+ conversion_rate?: number | null;
3140
3316
  /**
3141
3317
  * An alias for the price.
3142
3318
  */
@@ -3209,6 +3385,10 @@ export declare namespace SubscriptionPriceIntervalsParams {
3209
3385
  * this is true, and in-arrears if this is false.
3210
3386
  */
3211
3387
  billed_in_advance?: boolean | null;
3388
+ /**
3389
+ * The per unit conversion rate of the price currency to the invoicing currency.
3390
+ */
3391
+ conversion_rate?: number | null;
3212
3392
  /**
3213
3393
  * An alias for the price.
3214
3394
  */
@@ -3264,6 +3444,10 @@ export declare namespace SubscriptionPriceIntervalsParams {
3264
3444
  * this is true, and in-arrears if this is false.
3265
3445
  */
3266
3446
  billed_in_advance?: boolean | null;
3447
+ /**
3448
+ * The per unit conversion rate of the price currency to the invoicing currency.
3449
+ */
3450
+ conversion_rate?: number | null;
3267
3451
  /**
3268
3452
  * An alias for the price.
3269
3453
  */
@@ -3332,6 +3516,10 @@ export declare namespace SubscriptionPriceIntervalsParams {
3332
3516
  * this is true, and in-arrears if this is false.
3333
3517
  */
3334
3518
  billed_in_advance?: boolean | null;
3519
+ /**
3520
+ * The per unit conversion rate of the price currency to the invoicing currency.
3521
+ */
3522
+ conversion_rate?: number | null;
3335
3523
  /**
3336
3524
  * An alias for the price.
3337
3525
  */
@@ -3395,6 +3583,10 @@ export declare namespace SubscriptionPriceIntervalsParams {
3395
3583
  * this is true, and in-arrears if this is false.
3396
3584
  */
3397
3585
  billed_in_advance?: boolean | null;
3586
+ /**
3587
+ * The per unit conversion rate of the price currency to the invoicing currency.
3588
+ */
3589
+ conversion_rate?: number | null;
3398
3590
  /**
3399
3591
  * An alias for the price.
3400
3592
  */
@@ -3438,6 +3630,10 @@ export declare namespace SubscriptionPriceIntervalsParams {
3438
3630
  * this is true, and in-arrears if this is false.
3439
3631
  */
3440
3632
  billed_in_advance?: boolean | null;
3633
+ /**
3634
+ * The per unit conversion rate of the price currency to the invoicing currency.
3635
+ */
3636
+ conversion_rate?: number | null;
3441
3637
  /**
3442
3638
  * An alias for the price.
3443
3639
  */
@@ -3481,6 +3677,10 @@ export declare namespace SubscriptionPriceIntervalsParams {
3481
3677
  * this is true, and in-arrears if this is false.
3482
3678
  */
3483
3679
  billed_in_advance?: boolean | null;
3680
+ /**
3681
+ * The per unit conversion rate of the price currency to the invoicing currency.
3682
+ */
3683
+ conversion_rate?: number | null;
3484
3684
  /**
3485
3685
  * An alias for the price.
3486
3686
  */
@@ -3524,6 +3724,10 @@ export declare namespace SubscriptionPriceIntervalsParams {
3524
3724
  * this is true, and in-arrears if this is false.
3525
3725
  */
3526
3726
  billed_in_advance?: boolean | null;
3727
+ /**
3728
+ * The per unit conversion rate of the price currency to the invoicing currency.
3729
+ */
3730
+ conversion_rate?: number | null;
3527
3731
  /**
3528
3732
  * An alias for the price.
3529
3733
  */
@@ -3567,6 +3771,10 @@ export declare namespace SubscriptionPriceIntervalsParams {
3567
3771
  * this is true, and in-arrears if this is false.
3568
3772
  */
3569
3773
  billed_in_advance?: boolean | null;
3774
+ /**
3775
+ * The per unit conversion rate of the price currency to the invoicing currency.
3776
+ */
3777
+ conversion_rate?: number | null;
3570
3778
  /**
3571
3779
  * An alias for the price.
3572
3780
  */
@@ -3610,6 +3818,10 @@ export declare namespace SubscriptionPriceIntervalsParams {
3610
3818
  * this is true, and in-arrears if this is false.
3611
3819
  */
3612
3820
  billed_in_advance?: boolean | null;
3821
+ /**
3822
+ * The per unit conversion rate of the price currency to the invoicing currency.
3823
+ */
3824
+ conversion_rate?: number | null;
3613
3825
  /**
3614
3826
  * An alias for the price.
3615
3827
  */
@@ -3653,6 +3865,10 @@ export declare namespace SubscriptionPriceIntervalsParams {
3653
3865
  * this is true, and in-arrears if this is false.
3654
3866
  */
3655
3867
  billed_in_advance?: boolean | null;
3868
+ /**
3869
+ * The per unit conversion rate of the price currency to the invoicing currency.
3870
+ */
3871
+ conversion_rate?: number | null;
3656
3872
  /**
3657
3873
  * An alias for the price.
3658
3874
  */
@@ -3683,7 +3899,7 @@ export declare namespace SubscriptionPriceIntervalsParams {
3683
3899
  * The updated end date of this price interval. If not specified, the start date
3684
3900
  * will not be updated.
3685
3901
  */
3686
- end_date?: (string & {}) | 'start_of_term' | 'end_of_term' | null;
3902
+ end_date?: (string & {}) | Shared.BillingCycleRelativeDate | null;
3687
3903
  /**
3688
3904
  * A list of fixed fee quantity transitions to use for this price interval. Note
3689
3905
  * that this list will overwrite all existing fixed fee quantity transitions on the
@@ -3694,7 +3910,7 @@ export declare namespace SubscriptionPriceIntervalsParams {
3694
3910
  * The updated start date of this price interval. If not specified, the start date
3695
3911
  * will not be updated.
3696
3912
  */
3697
- start_date?: (string & {}) | 'start_of_term' | 'end_of_term';
3913
+ start_date?: (string & {}) | Shared.BillingCycleRelativeDate;
3698
3914
  }
3699
3915
  namespace Edit {
3700
3916
  interface FixedFeeQuantityTransition {
@@ -3765,6 +3981,15 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
3765
3981
  id: string;
3766
3982
  model_type: 'unit';
3767
3983
  unit_config: OverrideUnitPrice.UnitConfig;
3984
+ /**
3985
+ * The per unit conversion rate of the price currency to the invoicing currency.
3986
+ */
3987
+ conversion_rate?: number | null;
3988
+ /**
3989
+ * The currency of the price. If not provided, the currency of the plan will be
3990
+ * used.
3991
+ */
3992
+ currency?: string | null;
3768
3993
  /**
3769
3994
  * The subscription's override discount for the plan.
3770
3995
  */
@@ -3823,6 +4048,15 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
3823
4048
  id: string;
3824
4049
  model_type: 'package';
3825
4050
  package_config: OverridePackagePrice.PackageConfig;
4051
+ /**
4052
+ * The per unit conversion rate of the price currency to the invoicing currency.
4053
+ */
4054
+ conversion_rate?: number | null;
4055
+ /**
4056
+ * The currency of the price. If not provided, the currency of the plan will be
4057
+ * used.
4058
+ */
4059
+ currency?: string | null;
3826
4060
  /**
3827
4061
  * The subscription's override discount for the plan.
3828
4062
  */
@@ -3850,7 +4084,7 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
3850
4084
  * An integer amount to represent package size. For example, 1000 here would divide
3851
4085
  * usage by 1000 before multiplying by package_amount in rating
3852
4086
  */
3853
- package_size?: number | null;
4087
+ package_size: number;
3854
4088
  }
3855
4089
  /**
3856
4090
  * The subscription's override discount for the plan.
@@ -3886,6 +4120,15 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
3886
4120
  id: string;
3887
4121
  matrix_config: OverrideMatrixPrice.MatrixConfig;
3888
4122
  model_type: 'matrix';
4123
+ /**
4124
+ * The per unit conversion rate of the price currency to the invoicing currency.
4125
+ */
4126
+ conversion_rate?: number | null;
4127
+ /**
4128
+ * The currency of the price. If not provided, the currency of the plan will be
4129
+ * used.
4130
+ */
4131
+ currency?: string | null;
3889
4132
  /**
3890
4133
  * The subscription's override discount for the plan.
3891
4134
  */
@@ -3966,6 +4209,15 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
3966
4209
  id: string;
3967
4210
  model_type: 'tiered';
3968
4211
  tiered_config: OverrideTieredPrice.TieredConfig;
4212
+ /**
4213
+ * The per unit conversion rate of the price currency to the invoicing currency.
4214
+ */
4215
+ conversion_rate?: number | null;
4216
+ /**
4217
+ * The currency of the price. If not provided, the currency of the plan will be
4218
+ * used.
4219
+ */
4220
+ currency?: string | null;
3969
4221
  /**
3970
4222
  * The subscription's override discount for the plan.
3971
4223
  */
@@ -4040,6 +4292,15 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
4040
4292
  id: string;
4041
4293
  model_type: 'tiered_bps';
4042
4294
  tiered_bps_config: OverrideTieredBpsPrice.TieredBpsConfig;
4295
+ /**
4296
+ * The per unit conversion rate of the price currency to the invoicing currency.
4297
+ */
4298
+ conversion_rate?: number | null;
4299
+ /**
4300
+ * The currency of the price. If not provided, the currency of the plan will be
4301
+ * used.
4302
+ */
4303
+ currency?: string | null;
4043
4304
  /**
4044
4305
  * The subscription's override discount for the plan.
4045
4306
  */
@@ -4119,6 +4380,15 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
4119
4380
  id: string;
4120
4381
  bps_config: OverrideBpsPrice.BpsConfig;
4121
4382
  model_type: 'bps';
4383
+ /**
4384
+ * The per unit conversion rate of the price currency to the invoicing currency.
4385
+ */
4386
+ conversion_rate?: number | null;
4387
+ /**
4388
+ * The currency of the price. If not provided, the currency of the plan will be
4389
+ * used.
4390
+ */
4391
+ currency?: string | null;
4122
4392
  /**
4123
4393
  * The subscription's override discount for the plan.
4124
4394
  */
@@ -4181,6 +4451,15 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
4181
4451
  id: string;
4182
4452
  bulk_bps_config: OverrideBulkBpsPrice.BulkBpsConfig;
4183
4453
  model_type: 'bulk_bps';
4454
+ /**
4455
+ * The per unit conversion rate of the price currency to the invoicing currency.
4456
+ */
4457
+ conversion_rate?: number | null;
4458
+ /**
4459
+ * The currency of the price. If not provided, the currency of the plan will be
4460
+ * used.
4461
+ */
4462
+ currency?: string | null;
4184
4463
  /**
4185
4464
  * The subscription's override discount for the plan.
4186
4465
  */
@@ -4256,6 +4535,15 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
4256
4535
  id: string;
4257
4536
  bulk_config: OverrideBulkPrice.BulkConfig;
4258
4537
  model_type: 'bulk';
4538
+ /**
4539
+ * The per unit conversion rate of the price currency to the invoicing currency.
4540
+ */
4541
+ conversion_rate?: number | null;
4542
+ /**
4543
+ * The currency of the price. If not provided, the currency of the plan will be
4544
+ * used.
4545
+ */
4546
+ currency?: string | null;
4259
4547
  /**
4260
4548
  * The subscription's override discount for the plan.
4261
4549
  */
@@ -4326,6 +4614,15 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
4326
4614
  id: string;
4327
4615
  model_type: 'threshold_total_amount';
4328
4616
  threshold_total_amount_config: Record<string, unknown>;
4617
+ /**
4618
+ * The per unit conversion rate of the price currency to the invoicing currency.
4619
+ */
4620
+ conversion_rate?: number | null;
4621
+ /**
4622
+ * The currency of the price. If not provided, the currency of the plan will be
4623
+ * used.
4624
+ */
4625
+ currency?: string | null;
4329
4626
  /**
4330
4627
  * The subscription's override discount for the plan.
4331
4628
  */
@@ -4378,6 +4675,15 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
4378
4675
  id: string;
4379
4676
  model_type: 'tiered_package';
4380
4677
  tiered_package_config: Record<string, unknown>;
4678
+ /**
4679
+ * The per unit conversion rate of the price currency to the invoicing currency.
4680
+ */
4681
+ conversion_rate?: number | null;
4682
+ /**
4683
+ * The currency of the price. If not provided, the currency of the plan will be
4684
+ * used.
4685
+ */
4686
+ currency?: string | null;
4381
4687
  /**
4382
4688
  * The subscription's override discount for the plan.
4383
4689
  */
@@ -4430,6 +4736,15 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
4430
4736
  id: string;
4431
4737
  model_type: 'tiered_with_minimum';
4432
4738
  tiered_with_minimum_config: Record<string, unknown>;
4739
+ /**
4740
+ * The per unit conversion rate of the price currency to the invoicing currency.
4741
+ */
4742
+ conversion_rate?: number | null;
4743
+ /**
4744
+ * The currency of the price. If not provided, the currency of the plan will be
4745
+ * used.
4746
+ */
4747
+ currency?: string | null;
4433
4748
  /**
4434
4749
  * The subscription's override discount for the plan.
4435
4750
  */
@@ -4482,6 +4797,15 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
4482
4797
  id: string;
4483
4798
  model_type: 'package_with_allocation';
4484
4799
  package_with_allocation_config: Record<string, unknown>;
4800
+ /**
4801
+ * The per unit conversion rate of the price currency to the invoicing currency.
4802
+ */
4803
+ conversion_rate?: number | null;
4804
+ /**
4805
+ * The currency of the price. If not provided, the currency of the plan will be
4806
+ * used.
4807
+ */
4808
+ currency?: string | null;
4485
4809
  /**
4486
4810
  * The subscription's override discount for the plan.
4487
4811
  */
@@ -4534,6 +4858,15 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
4534
4858
  id: string;
4535
4859
  model_type: 'unit_with_percent';
4536
4860
  unit_with_percent_config: Record<string, unknown>;
4861
+ /**
4862
+ * The per unit conversion rate of the price currency to the invoicing currency.
4863
+ */
4864
+ conversion_rate?: number | null;
4865
+ /**
4866
+ * The currency of the price. If not provided, the currency of the plan will be
4867
+ * used.
4868
+ */
4869
+ currency?: string | null;
4537
4870
  /**
4538
4871
  * The subscription's override discount for the plan.
4539
4872
  */
@@ -4624,6 +4957,7 @@ export declare namespace Subscriptions {
4624
4957
  export import SubscriptionsPage = SubscriptionsAPI.SubscriptionsPage;
4625
4958
  export import SubscriptionFetchScheduleResponsesPage = SubscriptionsAPI.SubscriptionFetchScheduleResponsesPage;
4626
4959
  export import SubscriptionCreateParams = SubscriptionsAPI.SubscriptionCreateParams;
4960
+ export import SubscriptionUpdateParams = SubscriptionsAPI.SubscriptionUpdateParams;
4627
4961
  export import SubscriptionListParams = SubscriptionsAPI.SubscriptionListParams;
4628
4962
  export import SubscriptionCancelParams = SubscriptionsAPI.SubscriptionCancelParams;
4629
4963
  export import SubscriptionFetchCostsParams = SubscriptionsAPI.SubscriptionFetchCostsParams;