orb-billing 4.33.0 → 4.47.2

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 (255) hide show
  1. package/CHANGELOG.md +188 -0
  2. package/LICENSE +1 -1
  3. package/README.md +10 -1
  4. package/core.d.ts +4 -5
  5. package/core.d.ts.map +1 -1
  6. package/core.js +16 -11
  7. package/core.js.map +1 -1
  8. package/core.mjs +16 -11
  9. package/core.mjs.map +1 -1
  10. package/error.d.ts +30 -36
  11. package/error.d.ts.map +1 -1
  12. package/error.js +24 -43
  13. package/error.js.map +1 -1
  14. package/error.mjs +24 -43
  15. package/error.mjs.map +1 -1
  16. package/index.d.mts +43 -109
  17. package/index.d.ts +43 -109
  18. package/index.d.ts.map +1 -1
  19. package/index.js +71 -33
  20. package/index.js.map +1 -1
  21. package/index.mjs +43 -32
  22. package/index.mjs.map +1 -1
  23. package/package.json +1 -1
  24. package/resources/alerts.d.ts +58 -19
  25. package/resources/alerts.d.ts.map +1 -1
  26. package/resources/alerts.js +19 -37
  27. package/resources/alerts.js.map +1 -1
  28. package/resources/alerts.mjs +19 -14
  29. package/resources/alerts.mjs.map +1 -1
  30. package/resources/coupons/coupons.d.ts +3 -7
  31. package/resources/coupons/coupons.d.ts.map +1 -1
  32. package/resources/coupons/coupons.js +3 -5
  33. package/resources/coupons/coupons.js.map +1 -1
  34. package/resources/coupons/coupons.mjs +3 -5
  35. package/resources/coupons/coupons.mjs.map +1 -1
  36. package/resources/coupons/index.d.ts +2 -2
  37. package/resources/coupons/index.d.ts.map +1 -1
  38. package/resources/coupons/index.js.map +1 -1
  39. package/resources/coupons/index.mjs.map +1 -1
  40. package/resources/coupons/subscriptions.d.ts +1 -2
  41. package/resources/coupons/subscriptions.d.ts.map +1 -1
  42. package/resources/coupons/subscriptions.js +0 -2
  43. package/resources/coupons/subscriptions.js.map +1 -1
  44. package/resources/coupons/subscriptions.mjs +0 -2
  45. package/resources/coupons/subscriptions.mjs.map +1 -1
  46. package/resources/credit-notes.d.ts +29 -4
  47. package/resources/credit-notes.d.ts.map +1 -1
  48. package/resources/credit-notes.js +8 -27
  49. package/resources/credit-notes.js.map +1 -1
  50. package/resources/credit-notes.mjs +8 -4
  51. package/resources/credit-notes.mjs.map +1 -1
  52. package/resources/customers/balance-transactions.d.ts +1 -6
  53. package/resources/customers/balance-transactions.d.ts.map +1 -1
  54. package/resources/customers/balance-transactions.js +1 -27
  55. package/resources/customers/balance-transactions.js.map +1 -1
  56. package/resources/customers/balance-transactions.mjs +1 -4
  57. package/resources/customers/balance-transactions.mjs.map +1 -1
  58. package/resources/customers/costs.d.ts +1 -5
  59. package/resources/customers/costs.d.ts.map +1 -1
  60. package/resources/customers/costs.js +0 -2
  61. package/resources/customers/costs.js.map +1 -1
  62. package/resources/customers/costs.mjs +0 -2
  63. package/resources/customers/costs.mjs.map +1 -1
  64. package/resources/customers/credits/credits.d.ts +15 -31
  65. package/resources/customers/credits/credits.d.ts.map +1 -1
  66. package/resources/customers/credits/credits.js +10 -11
  67. package/resources/customers/credits/credits.js.map +1 -1
  68. package/resources/customers/credits/credits.mjs +10 -11
  69. package/resources/customers/credits/credits.mjs.map +1 -1
  70. package/resources/customers/credits/index.d.ts +3 -3
  71. package/resources/customers/credits/index.d.ts.map +1 -1
  72. package/resources/customers/credits/index.js.map +1 -1
  73. package/resources/customers/credits/index.mjs.map +1 -1
  74. package/resources/customers/credits/ledger.d.ts +15 -23
  75. package/resources/customers/credits/ledger.d.ts.map +1 -1
  76. package/resources/customers/credits/ledger.js +12 -36
  77. package/resources/customers/credits/ledger.js.map +1 -1
  78. package/resources/customers/credits/ledger.mjs +12 -13
  79. package/resources/customers/credits/ledger.mjs.map +1 -1
  80. package/resources/customers/credits/top-ups.d.ts +1 -11
  81. package/resources/customers/credits/top-ups.d.ts.map +1 -1
  82. package/resources/customers/credits/top-ups.js +2 -28
  83. package/resources/customers/credits/top-ups.js.map +1 -1
  84. package/resources/customers/credits/top-ups.mjs +2 -5
  85. package/resources/customers/credits/top-ups.mjs.map +1 -1
  86. package/resources/customers/customers.d.ts +7 -25
  87. package/resources/customers/customers.d.ts.map +1 -1
  88. package/resources/customers/customers.js +10 -10
  89. package/resources/customers/customers.js.map +1 -1
  90. package/resources/customers/customers.mjs +10 -10
  91. package/resources/customers/customers.mjs.map +1 -1
  92. package/resources/customers/index.d.ts +4 -4
  93. package/resources/customers/index.d.ts.map +1 -1
  94. package/resources/customers/index.js.map +1 -1
  95. package/resources/customers/index.mjs.map +1 -1
  96. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +90 -0
  97. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts.map +1 -0
  98. package/resources/dimensional-price-groups/dimensional-price-groups.js +73 -0
  99. package/resources/dimensional-price-groups/dimensional-price-groups.js.map +1 -0
  100. package/resources/dimensional-price-groups/dimensional-price-groups.mjs +45 -0
  101. package/resources/dimensional-price-groups/dimensional-price-groups.mjs.map +1 -0
  102. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts +10 -0
  103. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts.map +1 -0
  104. package/resources/dimensional-price-groups/external-dimensional-price-group-id.js +15 -0
  105. package/resources/dimensional-price-groups/external-dimensional-price-group-id.js.map +1 -0
  106. package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs +11 -0
  107. package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs.map +1 -0
  108. package/resources/dimensional-price-groups/index.d.ts +3 -0
  109. package/resources/dimensional-price-groups/index.d.ts.map +1 -0
  110. package/resources/dimensional-price-groups/index.js +9 -0
  111. package/resources/dimensional-price-groups/index.js.map +1 -0
  112. package/resources/dimensional-price-groups/index.mjs +4 -0
  113. package/resources/dimensional-price-groups/index.mjs.map +1 -0
  114. package/resources/events/backfills.d.ts +5 -11
  115. package/resources/events/backfills.d.ts.map +1 -1
  116. package/resources/events/backfills.js +5 -29
  117. package/resources/events/backfills.js.map +1 -1
  118. package/resources/events/backfills.mjs +5 -6
  119. package/resources/events/backfills.mjs.map +1 -1
  120. package/resources/events/events.d.ts +7 -22
  121. package/resources/events/events.d.ts.map +1 -1
  122. package/resources/events/events.js +7 -7
  123. package/resources/events/events.js.map +1 -1
  124. package/resources/events/events.mjs +7 -7
  125. package/resources/events/events.mjs.map +1 -1
  126. package/resources/events/index.d.ts +3 -3
  127. package/resources/events/index.d.ts.map +1 -1
  128. package/resources/events/index.js.map +1 -1
  129. package/resources/events/index.mjs.map +1 -1
  130. package/resources/events/volume.d.ts +1 -3
  131. package/resources/events/volume.d.ts.map +1 -1
  132. package/resources/events/volume.js +0 -2
  133. package/resources/events/volume.js.map +1 -1
  134. package/resources/events/volume.mjs +0 -2
  135. package/resources/events/volume.mjs.map +1 -1
  136. package/resources/index.d.ts +14 -13
  137. package/resources/index.d.ts.map +1 -1
  138. package/resources/index.js +10 -7
  139. package/resources/index.js.map +1 -1
  140. package/resources/index.mjs +8 -7
  141. package/resources/index.mjs.map +1 -1
  142. package/resources/invoice-line-items.d.ts +1 -3
  143. package/resources/invoice-line-items.d.ts.map +1 -1
  144. package/resources/invoice-line-items.js +0 -2
  145. package/resources/invoice-line-items.js.map +1 -1
  146. package/resources/invoice-line-items.mjs +0 -2
  147. package/resources/invoice-line-items.mjs.map +1 -1
  148. package/resources/invoices.d.ts +78 -13
  149. package/resources/invoices.d.ts.map +1 -1
  150. package/resources/invoices.js +8 -27
  151. package/resources/invoices.js.map +1 -1
  152. package/resources/invoices.mjs +8 -4
  153. package/resources/invoices.mjs.map +1 -1
  154. package/resources/items.d.ts +1 -6
  155. package/resources/items.d.ts.map +1 -1
  156. package/resources/items.js +1 -27
  157. package/resources/items.js.map +1 -1
  158. package/resources/items.mjs +1 -4
  159. package/resources/items.mjs.map +1 -1
  160. package/resources/metrics.d.ts +1 -6
  161. package/resources/metrics.d.ts.map +1 -1
  162. package/resources/metrics.js +1 -27
  163. package/resources/metrics.js.map +1 -1
  164. package/resources/metrics.mjs +1 -4
  165. package/resources/metrics.mjs.map +1 -1
  166. package/resources/plans/external-plan-id.d.ts +1 -2
  167. package/resources/plans/external-plan-id.d.ts.map +1 -1
  168. package/resources/plans/external-plan-id.js +0 -2
  169. package/resources/plans/external-plan-id.js.map +1 -1
  170. package/resources/plans/external-plan-id.mjs +0 -2
  171. package/resources/plans/external-plan-id.mjs.map +1 -1
  172. package/resources/plans/index.d.ts +2 -2
  173. package/resources/plans/index.d.ts.map +1 -1
  174. package/resources/plans/index.js.map +1 -1
  175. package/resources/plans/index.mjs +1 -1
  176. package/resources/plans/index.mjs.map +1 -1
  177. package/resources/plans/plans.d.ts +331 -9
  178. package/resources/plans/plans.d.ts.map +1 -1
  179. package/resources/plans/plans.js +3 -5
  180. package/resources/plans/plans.js.map +1 -1
  181. package/resources/plans/plans.mjs +3 -5
  182. package/resources/plans/plans.mjs.map +1 -1
  183. package/resources/prices/external-price-id.d.ts +1 -2
  184. package/resources/prices/external-price-id.d.ts.map +1 -1
  185. package/resources/prices/external-price-id.js +0 -2
  186. package/resources/prices/external-price-id.js.map +1 -1
  187. package/resources/prices/external-price-id.mjs +0 -2
  188. package/resources/prices/external-price-id.mjs.map +1 -1
  189. package/resources/prices/index.d.ts +2 -2
  190. package/resources/prices/index.d.ts.map +1 -1
  191. package/resources/prices/index.js +3 -3
  192. package/resources/prices/index.js.map +1 -1
  193. package/resources/prices/index.mjs +1 -1
  194. package/resources/prices/index.mjs.map +1 -1
  195. package/resources/prices/prices.d.ts +339 -13
  196. package/resources/prices/prices.d.ts.map +1 -1
  197. package/resources/prices/prices.js +3 -5
  198. package/resources/prices/prices.js.map +1 -1
  199. package/resources/prices/prices.mjs +3 -5
  200. package/resources/prices/prices.mjs.map +1 -1
  201. package/resources/shared.d.ts +14 -16
  202. package/resources/shared.d.ts.map +1 -1
  203. package/resources/subscriptions.d.ts +7629 -191
  204. package/resources/subscriptions.d.ts.map +1 -1
  205. package/resources/subscriptions.js +2 -29
  206. package/resources/subscriptions.js.map +1 -1
  207. package/resources/subscriptions.mjs +2 -6
  208. package/resources/subscriptions.mjs.map +1 -1
  209. package/resources/top-level.d.ts +1 -2
  210. package/resources/top-level.d.ts.map +1 -1
  211. package/resources/top-level.js +0 -2
  212. package/resources/top-level.js.map +1 -1
  213. package/resources/top-level.mjs +0 -2
  214. package/resources/top-level.mjs.map +1 -1
  215. package/src/core.ts +23 -19
  216. package/src/error.ts +82 -125
  217. package/src/index.ts +334 -130
  218. package/src/resources/alerts.ts +117 -24
  219. package/src/resources/coupons/coupons.ts +13 -8
  220. package/src/resources/coupons/index.ts +2 -2
  221. package/src/resources/coupons/subscriptions.ts +2 -3
  222. package/src/resources/credit-notes.ts +45 -5
  223. package/src/resources/customers/balance-transactions.ts +10 -7
  224. package/src/resources/customers/costs.ts +7 -6
  225. package/src/resources/customers/credits/credits.ts +82 -32
  226. package/src/resources/customers/credits/index.ts +20 -20
  227. package/src/resources/customers/credits/ledger.ts +32 -26
  228. package/src/resources/customers/credits/top-ups.ts +16 -12
  229. package/src/resources/customers/customers.ts +68 -26
  230. package/src/resources/customers/index.ts +17 -17
  231. package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +146 -0
  232. package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +20 -0
  233. package/src/resources/dimensional-price-groups/index.ts +10 -0
  234. package/src/resources/events/backfills.ts +17 -12
  235. package/src/resources/events/events.ts +42 -23
  236. package/src/resources/events/index.ts +15 -15
  237. package/src/resources/events/volume.ts +2 -4
  238. package/src/resources/index.ts +113 -67
  239. package/src/resources/invoice-line-items.ts +5 -4
  240. package/src/resources/invoices.ts +108 -14
  241. package/src/resources/items.ts +10 -7
  242. package/src/resources/metrics.ts +10 -7
  243. package/src/resources/plans/external-plan-id.ts +2 -3
  244. package/src/resources/plans/index.ts +9 -2
  245. package/src/resources/plans/plans.ts +424 -9
  246. package/src/resources/prices/external-price-id.ts +2 -3
  247. package/src/resources/prices/index.ts +8 -8
  248. package/src/resources/prices/prices.ts +471 -15
  249. package/src/resources/shared.ts +18 -20
  250. package/src/resources/subscriptions.ts +9231 -400
  251. package/src/resources/top-level.ts +2 -3
  252. package/src/version.ts +1 -1
  253. package/version.d.ts +1 -1
  254. package/version.js +1 -1
  255. package/version.mjs +1 -1
@@ -3,9 +3,9 @@
3
3
  import { APIResource } from '../../resource';
4
4
  import { isRequestOptions } from '../../core';
5
5
  import * as Core from '../../core';
6
- import * as PricesAPI from './prices';
7
6
  import * as Shared from '../shared';
8
7
  import * as ExternalPriceIDAPI from './external-price-id';
8
+ import { ExternalPriceID, ExternalPriceIDUpdateParams } from './external-price-id';
9
9
  import { Page, type PageParams } from '../../pagination';
10
10
 
11
11
  export class Prices extends APIResource {
@@ -365,7 +365,9 @@ export type Price =
365
365
  | Price.GroupedAllocationPrice
366
366
  | Price.GroupedWithProratedMinimumPrice
367
367
  | Price.GroupedWithMeteredMinimumPrice
368
- | Price.BulkWithProrationPrice;
368
+ | Price.MatrixWithDisplayNamePrice
369
+ | Price.BulkWithProrationPrice
370
+ | Price.GroupedTieredPackagePrice;
369
371
 
370
372
  export namespace Price {
371
373
  export interface UnitPrice {
@@ -2887,6 +2889,116 @@ export namespace Price {
2887
2889
  }
2888
2890
  }
2889
2891
 
2892
+ export interface MatrixWithDisplayNamePrice {
2893
+ id: string;
2894
+
2895
+ billable_metric: MatrixWithDisplayNamePrice.BillableMetric | null;
2896
+
2897
+ billing_cycle_configuration: MatrixWithDisplayNamePrice.BillingCycleConfiguration;
2898
+
2899
+ cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
2900
+
2901
+ conversion_rate: number | null;
2902
+
2903
+ created_at: string;
2904
+
2905
+ credit_allocation: MatrixWithDisplayNamePrice.CreditAllocation | null;
2906
+
2907
+ currency: string;
2908
+
2909
+ discount: Shared.Discount | null;
2910
+
2911
+ external_price_id: string | null;
2912
+
2913
+ fixed_price_quantity: number | null;
2914
+
2915
+ invoicing_cycle_configuration: MatrixWithDisplayNamePrice.InvoicingCycleConfiguration | null;
2916
+
2917
+ item: MatrixWithDisplayNamePrice.Item;
2918
+
2919
+ matrix_with_display_name_config: Record<string, unknown>;
2920
+
2921
+ maximum: MatrixWithDisplayNamePrice.Maximum | null;
2922
+
2923
+ maximum_amount: string | null;
2924
+
2925
+ /**
2926
+ * User specified key-value pairs for the resource. If not present, this defaults
2927
+ * to an empty dictionary. Individual keys can be removed by setting the value to
2928
+ * `null`, and the entire metadata mapping can be cleared by setting `metadata` to
2929
+ * `null`.
2930
+ */
2931
+ metadata: Record<string, string>;
2932
+
2933
+ minimum: MatrixWithDisplayNamePrice.Minimum | null;
2934
+
2935
+ minimum_amount: string | null;
2936
+
2937
+ model_type: 'matrix_with_display_name';
2938
+
2939
+ name: string;
2940
+
2941
+ plan_phase_order: number | null;
2942
+
2943
+ price_type: 'usage_price' | 'fixed_price';
2944
+ }
2945
+
2946
+ export namespace MatrixWithDisplayNamePrice {
2947
+ export interface BillableMetric {
2948
+ id: string;
2949
+ }
2950
+
2951
+ export interface BillingCycleConfiguration {
2952
+ duration: number;
2953
+
2954
+ duration_unit: 'day' | 'month';
2955
+ }
2956
+
2957
+ export interface CreditAllocation {
2958
+ allows_rollover: boolean;
2959
+
2960
+ currency: string;
2961
+ }
2962
+
2963
+ export interface InvoicingCycleConfiguration {
2964
+ duration: number;
2965
+
2966
+ duration_unit: 'day' | 'month';
2967
+ }
2968
+
2969
+ export interface Item {
2970
+ id: string;
2971
+
2972
+ name: string;
2973
+ }
2974
+
2975
+ export interface Maximum {
2976
+ /**
2977
+ * List of price_ids that this maximum amount applies to. For plan/plan phase
2978
+ * maximums, this can be a subset of prices.
2979
+ */
2980
+ applies_to_price_ids: Array<string>;
2981
+
2982
+ /**
2983
+ * Maximum amount applied
2984
+ */
2985
+ maximum_amount: string;
2986
+ }
2987
+
2988
+ export interface Minimum {
2989
+ /**
2990
+ * List of price_ids that this minimum amount applies to. For plan/plan phase
2991
+ * minimums, this can be a subset of prices.
2992
+ */
2993
+ applies_to_price_ids: Array<string>;
2994
+
2995
+ /**
2996
+ * Minimum amount applied
2997
+ */
2998
+ minimum_amount: string;
2999
+ }
3000
+ }
3001
+
2890
3002
  export interface BulkWithProrationPrice {
2891
3003
  id: string;
2892
3004
 
@@ -2996,6 +3108,116 @@ export namespace Price {
2996
3108
  minimum_amount: string;
2997
3109
  }
2998
3110
  }
3111
+
3112
+ export interface GroupedTieredPackagePrice {
3113
+ id: string;
3114
+
3115
+ billable_metric: GroupedTieredPackagePrice.BillableMetric | null;
3116
+
3117
+ billing_cycle_configuration: GroupedTieredPackagePrice.BillingCycleConfiguration;
3118
+
3119
+ cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom';
3120
+
3121
+ conversion_rate: number | null;
3122
+
3123
+ created_at: string;
3124
+
3125
+ credit_allocation: GroupedTieredPackagePrice.CreditAllocation | null;
3126
+
3127
+ currency: string;
3128
+
3129
+ discount: Shared.Discount | null;
3130
+
3131
+ external_price_id: string | null;
3132
+
3133
+ fixed_price_quantity: number | null;
3134
+
3135
+ grouped_tiered_package_config: Record<string, unknown>;
3136
+
3137
+ invoicing_cycle_configuration: GroupedTieredPackagePrice.InvoicingCycleConfiguration | null;
3138
+
3139
+ item: GroupedTieredPackagePrice.Item;
3140
+
3141
+ maximum: GroupedTieredPackagePrice.Maximum | null;
3142
+
3143
+ maximum_amount: string | null;
3144
+
3145
+ /**
3146
+ * User specified key-value pairs for the resource. If not present, this defaults
3147
+ * to an empty dictionary. Individual keys can be removed by setting the value to
3148
+ * `null`, and the entire metadata mapping can be cleared by setting `metadata` to
3149
+ * `null`.
3150
+ */
3151
+ metadata: Record<string, string>;
3152
+
3153
+ minimum: GroupedTieredPackagePrice.Minimum | null;
3154
+
3155
+ minimum_amount: string | null;
3156
+
3157
+ model_type: 'grouped_tiered_package';
3158
+
3159
+ name: string;
3160
+
3161
+ plan_phase_order: number | null;
3162
+
3163
+ price_type: 'usage_price' | 'fixed_price';
3164
+ }
3165
+
3166
+ export namespace GroupedTieredPackagePrice {
3167
+ export interface BillableMetric {
3168
+ id: string;
3169
+ }
3170
+
3171
+ export interface BillingCycleConfiguration {
3172
+ duration: number;
3173
+
3174
+ duration_unit: 'day' | 'month';
3175
+ }
3176
+
3177
+ export interface CreditAllocation {
3178
+ allows_rollover: boolean;
3179
+
3180
+ currency: string;
3181
+ }
3182
+
3183
+ export interface InvoicingCycleConfiguration {
3184
+ duration: number;
3185
+
3186
+ duration_unit: 'day' | 'month';
3187
+ }
3188
+
3189
+ export interface Item {
3190
+ id: string;
3191
+
3192
+ name: string;
3193
+ }
3194
+
3195
+ export interface Maximum {
3196
+ /**
3197
+ * List of price_ids that this maximum amount applies to. For plan/plan phase
3198
+ * maximums, this can be a subset of prices.
3199
+ */
3200
+ applies_to_price_ids: Array<string>;
3201
+
3202
+ /**
3203
+ * Maximum amount applied
3204
+ */
3205
+ maximum_amount: string;
3206
+ }
3207
+
3208
+ export interface Minimum {
3209
+ /**
3210
+ * List of price_ids that this minimum amount applies to. For plan/plan phase
3211
+ * minimums, this can be a subset of prices.
3212
+ */
3213
+ applies_to_price_ids: Array<string>;
3214
+
3215
+ /**
3216
+ * Minimum amount applied
3217
+ */
3218
+ minimum_amount: string;
3219
+ }
3220
+ }
2999
3221
  }
3000
3222
 
3001
3223
  export interface PriceEvaluateResponse {
@@ -3024,9 +3246,11 @@ export type PriceCreateParams =
3024
3246
  | PriceCreateParams.NewFloatingGroupedAllocationPrice
3025
3247
  | PriceCreateParams.NewFloatingGroupedWithProratedMinimumPrice
3026
3248
  | PriceCreateParams.NewFloatingGroupedWithMeteredMinimumPrice
3027
- | PriceCreateParams.NewFloatingBulkWithProrationPrice;
3249
+ | PriceCreateParams.NewFloatingMatrixWithDisplayNamePrice
3250
+ | PriceCreateParams.NewFloatingBulkWithProrationPrice
3251
+ | PriceCreateParams.NewFloatingGroupedTieredPackagePrice;
3028
3252
 
3029
- export namespace PriceCreateParams {
3253
+ export declare namespace PriceCreateParams {
3030
3254
  export interface NewFloatingUnitPrice {
3031
3255
  /**
3032
3256
  * The cadence to bill for this price on.
@@ -5588,6 +5812,118 @@ export namespace PriceCreateParams {
5588
5812
  }
5589
5813
  }
5590
5814
 
5815
+ export interface NewFloatingMatrixWithDisplayNamePrice {
5816
+ /**
5817
+ * The cadence to bill for this price on.
5818
+ */
5819
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5820
+
5821
+ /**
5822
+ * An ISO 4217 currency string for which this price is billed in.
5823
+ */
5824
+ currency: string;
5825
+
5826
+ /**
5827
+ * The id of the item the plan will be associated with.
5828
+ */
5829
+ item_id: string;
5830
+
5831
+ matrix_with_display_name_config: Record<string, unknown>;
5832
+
5833
+ model_type: 'matrix_with_display_name';
5834
+
5835
+ /**
5836
+ * The name of the price.
5837
+ */
5838
+ name: string;
5839
+
5840
+ /**
5841
+ * The id of the billable metric for the price. Only needed if the price is
5842
+ * usage-based.
5843
+ */
5844
+ billable_metric_id?: string | null;
5845
+
5846
+ /**
5847
+ * If the Price represents a fixed cost, the price will be billed in-advance if
5848
+ * this is true, and in-arrears if this is false.
5849
+ */
5850
+ billed_in_advance?: boolean | null;
5851
+
5852
+ /**
5853
+ * For custom cadence: specifies the duration of the billing period in days or
5854
+ * months.
5855
+ */
5856
+ billing_cycle_configuration?: PriceCreateParams.NewFloatingMatrixWithDisplayNamePrice.BillingCycleConfiguration | null;
5857
+
5858
+ /**
5859
+ * The per unit conversion rate of the price currency to the invoicing currency.
5860
+ */
5861
+ conversion_rate?: number | null;
5862
+
5863
+ /**
5864
+ * An alias for the price.
5865
+ */
5866
+ external_price_id?: string | null;
5867
+
5868
+ /**
5869
+ * If the Price represents a fixed cost, this represents the quantity of units
5870
+ * applied.
5871
+ */
5872
+ fixed_price_quantity?: number | null;
5873
+
5874
+ /**
5875
+ * The property used to group this price on an invoice
5876
+ */
5877
+ invoice_grouping_key?: string | null;
5878
+
5879
+ /**
5880
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5881
+ * If unspecified, a single invoice is produced per billing cycle.
5882
+ */
5883
+ invoicing_cycle_configuration?: PriceCreateParams.NewFloatingMatrixWithDisplayNamePrice.InvoicingCycleConfiguration | null;
5884
+
5885
+ /**
5886
+ * User-specified key/value pairs for the resource. Individual keys can be removed
5887
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
5888
+ * by setting `metadata` to `null`.
5889
+ */
5890
+ metadata?: Record<string, string | null> | null;
5891
+ }
5892
+
5893
+ export namespace NewFloatingMatrixWithDisplayNamePrice {
5894
+ /**
5895
+ * For custom cadence: specifies the duration of the billing period in days or
5896
+ * months.
5897
+ */
5898
+ export interface BillingCycleConfiguration {
5899
+ /**
5900
+ * The duration of the billing period.
5901
+ */
5902
+ duration: number;
5903
+
5904
+ /**
5905
+ * The unit of billing period duration.
5906
+ */
5907
+ duration_unit: 'day' | 'month';
5908
+ }
5909
+
5910
+ /**
5911
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5912
+ * If unspecified, a single invoice is produced per billing cycle.
5913
+ */
5914
+ export interface InvoicingCycleConfiguration {
5915
+ /**
5916
+ * The duration of the billing period.
5917
+ */
5918
+ duration: number;
5919
+
5920
+ /**
5921
+ * The unit of billing period duration.
5922
+ */
5923
+ duration_unit: 'day' | 'month';
5924
+ }
5925
+ }
5926
+
5591
5927
  export interface NewFloatingBulkWithProrationPrice {
5592
5928
  bulk_with_proration_config: Record<string, unknown>;
5593
5929
 
@@ -5699,6 +6035,118 @@ export namespace PriceCreateParams {
5699
6035
  duration_unit: 'day' | 'month';
5700
6036
  }
5701
6037
  }
6038
+
6039
+ export interface NewFloatingGroupedTieredPackagePrice {
6040
+ /**
6041
+ * The cadence to bill for this price on.
6042
+ */
6043
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
6044
+
6045
+ /**
6046
+ * An ISO 4217 currency string for which this price is billed in.
6047
+ */
6048
+ currency: string;
6049
+
6050
+ grouped_tiered_package_config: Record<string, unknown>;
6051
+
6052
+ /**
6053
+ * The id of the item the plan will be associated with.
6054
+ */
6055
+ item_id: string;
6056
+
6057
+ model_type: 'grouped_tiered_package';
6058
+
6059
+ /**
6060
+ * The name of the price.
6061
+ */
6062
+ name: string;
6063
+
6064
+ /**
6065
+ * The id of the billable metric for the price. Only needed if the price is
6066
+ * usage-based.
6067
+ */
6068
+ billable_metric_id?: string | null;
6069
+
6070
+ /**
6071
+ * If the Price represents a fixed cost, the price will be billed in-advance if
6072
+ * this is true, and in-arrears if this is false.
6073
+ */
6074
+ billed_in_advance?: boolean | null;
6075
+
6076
+ /**
6077
+ * For custom cadence: specifies the duration of the billing period in days or
6078
+ * months.
6079
+ */
6080
+ billing_cycle_configuration?: PriceCreateParams.NewFloatingGroupedTieredPackagePrice.BillingCycleConfiguration | null;
6081
+
6082
+ /**
6083
+ * The per unit conversion rate of the price currency to the invoicing currency.
6084
+ */
6085
+ conversion_rate?: number | null;
6086
+
6087
+ /**
6088
+ * An alias for the price.
6089
+ */
6090
+ external_price_id?: string | null;
6091
+
6092
+ /**
6093
+ * If the Price represents a fixed cost, this represents the quantity of units
6094
+ * applied.
6095
+ */
6096
+ fixed_price_quantity?: number | null;
6097
+
6098
+ /**
6099
+ * The property used to group this price on an invoice
6100
+ */
6101
+ invoice_grouping_key?: string | null;
6102
+
6103
+ /**
6104
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6105
+ * If unspecified, a single invoice is produced per billing cycle.
6106
+ */
6107
+ invoicing_cycle_configuration?: PriceCreateParams.NewFloatingGroupedTieredPackagePrice.InvoicingCycleConfiguration | null;
6108
+
6109
+ /**
6110
+ * User-specified key/value pairs for the resource. Individual keys can be removed
6111
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
6112
+ * by setting `metadata` to `null`.
6113
+ */
6114
+ metadata?: Record<string, string | null> | null;
6115
+ }
6116
+
6117
+ export namespace NewFloatingGroupedTieredPackagePrice {
6118
+ /**
6119
+ * For custom cadence: specifies the duration of the billing period in days or
6120
+ * months.
6121
+ */
6122
+ export interface BillingCycleConfiguration {
6123
+ /**
6124
+ * The duration of the billing period.
6125
+ */
6126
+ duration: number;
6127
+
6128
+ /**
6129
+ * The unit of billing period duration.
6130
+ */
6131
+ duration_unit: 'day' | 'month';
6132
+ }
6133
+
6134
+ /**
6135
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6136
+ * If unspecified, a single invoice is produced per billing cycle.
6137
+ */
6138
+ export interface InvoicingCycleConfiguration {
6139
+ /**
6140
+ * The duration of the billing period.
6141
+ */
6142
+ duration: number;
6143
+
6144
+ /**
6145
+ * The unit of billing period duration.
6146
+ */
6147
+ duration_unit: 'day' | 'month';
6148
+ }
6149
+ }
5702
6150
  }
5703
6151
 
5704
6152
  export interface PriceUpdateParams {
@@ -5748,15 +6196,23 @@ export interface PriceEvaluateParams {
5748
6196
  grouping_keys?: Array<string>;
5749
6197
  }
5750
6198
 
5751
- export namespace Prices {
5752
- export import EvaluatePriceGroup = PricesAPI.EvaluatePriceGroup;
5753
- export import Price = PricesAPI.Price;
5754
- export import PriceEvaluateResponse = PricesAPI.PriceEvaluateResponse;
5755
- export import PricesPage = PricesAPI.PricesPage;
5756
- export import PriceCreateParams = PricesAPI.PriceCreateParams;
5757
- export import PriceUpdateParams = PricesAPI.PriceUpdateParams;
5758
- export import PriceListParams = PricesAPI.PriceListParams;
5759
- export import PriceEvaluateParams = PricesAPI.PriceEvaluateParams;
5760
- export import ExternalPriceID = ExternalPriceIDAPI.ExternalPriceID;
5761
- export import ExternalPriceIDUpdateParams = ExternalPriceIDAPI.ExternalPriceIDUpdateParams;
6199
+ Prices.PricesPage = PricesPage;
6200
+ Prices.ExternalPriceID = ExternalPriceID;
6201
+
6202
+ export declare namespace Prices {
6203
+ export {
6204
+ type EvaluatePriceGroup as EvaluatePriceGroup,
6205
+ type Price as Price,
6206
+ type PriceEvaluateResponse as PriceEvaluateResponse,
6207
+ PricesPage as PricesPage,
6208
+ type PriceCreateParams as PriceCreateParams,
6209
+ type PriceUpdateParams as PriceUpdateParams,
6210
+ type PriceListParams as PriceListParams,
6211
+ type PriceEvaluateParams as PriceEvaluateParams,
6212
+ };
6213
+
6214
+ export {
6215
+ ExternalPriceID as ExternalPriceID,
6216
+ type ExternalPriceIDUpdateParams as ExternalPriceIDUpdateParams,
6217
+ };
5762
6218
  }
@@ -19,26 +19,24 @@ export interface AmountDiscount {
19
19
 
20
20
  export type BillingCycleRelativeDate = 'start_of_term' | 'end_of_term';
21
21
 
22
- export type Discount = PercentageDiscount | TrialDiscount | Discount.UsageDiscount | AmountDiscount;
23
-
24
- export namespace Discount {
25
- export interface UsageDiscount {
26
- /**
27
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
28
- * this can be a subset of prices.
29
- */
30
- applies_to_price_ids: Array<string>;
31
-
32
- discount_type: 'usage';
33
-
34
- /**
35
- * Only available if discount_type is `usage`. Number of usage units that this
36
- * discount is for
37
- */
38
- usage_discount: number;
39
-
40
- reason?: string | null;
41
- }
22
+ export type Discount = PercentageDiscount | TrialDiscount | UsageDiscount | AmountDiscount;
23
+
24
+ export interface UsageDiscount {
25
+ /**
26
+ * List of price_ids that this discount applies to. For plan/plan phase discounts,
27
+ * this can be a subset of prices.
28
+ */
29
+ applies_to_price_ids: Array<string>;
30
+
31
+ discount_type: 'usage';
32
+
33
+ /**
34
+ * Only available if discount_type is `usage`. Number of usage units that this
35
+ * discount is for
36
+ */
37
+ usage_discount: number;
38
+
39
+ reason?: string | null;
42
40
  }
43
41
 
44
42
  export type InvoiceLevelDiscount = PercentageDiscount | AmountDiscount | TrialDiscount;