orb-billing 4.33.0 → 4.47.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +175 -0
- package/LICENSE +1 -1
- package/README.md +10 -1
- package/core.d.ts +4 -5
- package/core.d.ts.map +1 -1
- package/core.js +16 -11
- package/core.js.map +1 -1
- package/core.mjs +16 -11
- package/core.mjs.map +1 -1
- package/error.d.ts +30 -36
- package/error.d.ts.map +1 -1
- package/error.js +24 -43
- package/error.js.map +1 -1
- package/error.mjs +24 -43
- package/error.mjs.map +1 -1
- package/index.d.mts +43 -109
- package/index.d.ts +43 -109
- package/index.d.ts.map +1 -1
- package/index.js +71 -33
- package/index.js.map +1 -1
- package/index.mjs +43 -32
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/alerts.d.ts +58 -19
- package/resources/alerts.d.ts.map +1 -1
- package/resources/alerts.js +19 -37
- package/resources/alerts.js.map +1 -1
- package/resources/alerts.mjs +19 -14
- package/resources/alerts.mjs.map +1 -1
- package/resources/coupons/coupons.d.ts +3 -7
- package/resources/coupons/coupons.d.ts.map +1 -1
- package/resources/coupons/coupons.js +3 -5
- package/resources/coupons/coupons.js.map +1 -1
- package/resources/coupons/coupons.mjs +3 -5
- package/resources/coupons/coupons.mjs.map +1 -1
- package/resources/coupons/index.d.ts +2 -2
- package/resources/coupons/index.d.ts.map +1 -1
- package/resources/coupons/index.js.map +1 -1
- package/resources/coupons/index.mjs.map +1 -1
- package/resources/coupons/subscriptions.d.ts +1 -2
- package/resources/coupons/subscriptions.d.ts.map +1 -1
- package/resources/coupons/subscriptions.js +0 -2
- package/resources/coupons/subscriptions.js.map +1 -1
- package/resources/coupons/subscriptions.mjs +0 -2
- package/resources/coupons/subscriptions.mjs.map +1 -1
- package/resources/credit-notes.d.ts +29 -4
- package/resources/credit-notes.d.ts.map +1 -1
- package/resources/credit-notes.js +8 -27
- package/resources/credit-notes.js.map +1 -1
- package/resources/credit-notes.mjs +8 -4
- package/resources/credit-notes.mjs.map +1 -1
- package/resources/customers/balance-transactions.d.ts +1 -6
- package/resources/customers/balance-transactions.d.ts.map +1 -1
- package/resources/customers/balance-transactions.js +1 -27
- package/resources/customers/balance-transactions.js.map +1 -1
- package/resources/customers/balance-transactions.mjs +1 -4
- package/resources/customers/balance-transactions.mjs.map +1 -1
- package/resources/customers/costs.d.ts +1 -5
- package/resources/customers/costs.d.ts.map +1 -1
- package/resources/customers/costs.js +0 -2
- package/resources/customers/costs.js.map +1 -1
- package/resources/customers/costs.mjs +0 -2
- package/resources/customers/costs.mjs.map +1 -1
- package/resources/customers/credits/credits.d.ts +15 -31
- package/resources/customers/credits/credits.d.ts.map +1 -1
- package/resources/customers/credits/credits.js +10 -11
- package/resources/customers/credits/credits.js.map +1 -1
- package/resources/customers/credits/credits.mjs +10 -11
- package/resources/customers/credits/credits.mjs.map +1 -1
- package/resources/customers/credits/index.d.ts +3 -3
- package/resources/customers/credits/index.d.ts.map +1 -1
- package/resources/customers/credits/index.js.map +1 -1
- package/resources/customers/credits/index.mjs.map +1 -1
- package/resources/customers/credits/ledger.d.ts +15 -23
- package/resources/customers/credits/ledger.d.ts.map +1 -1
- package/resources/customers/credits/ledger.js +12 -36
- package/resources/customers/credits/ledger.js.map +1 -1
- package/resources/customers/credits/ledger.mjs +12 -13
- package/resources/customers/credits/ledger.mjs.map +1 -1
- package/resources/customers/credits/top-ups.d.ts +1 -11
- package/resources/customers/credits/top-ups.d.ts.map +1 -1
- package/resources/customers/credits/top-ups.js +2 -28
- package/resources/customers/credits/top-ups.js.map +1 -1
- package/resources/customers/credits/top-ups.mjs +2 -5
- package/resources/customers/credits/top-ups.mjs.map +1 -1
- package/resources/customers/customers.d.ts +7 -25
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js +10 -10
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs +10 -10
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/index.d.ts +4 -4
- package/resources/customers/index.d.ts.map +1 -1
- package/resources/customers/index.js.map +1 -1
- package/resources/customers/index.mjs.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +90 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts.map +1 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.js +73 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.js.map +1 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs +45 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs.map +1 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts +10 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts.map +1 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.js +15 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.js.map +1 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs +11 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs.map +1 -0
- package/resources/dimensional-price-groups/index.d.ts +3 -0
- package/resources/dimensional-price-groups/index.d.ts.map +1 -0
- package/resources/dimensional-price-groups/index.js +9 -0
- package/resources/dimensional-price-groups/index.js.map +1 -0
- package/resources/dimensional-price-groups/index.mjs +4 -0
- package/resources/dimensional-price-groups/index.mjs.map +1 -0
- package/resources/events/backfills.d.ts +5 -11
- package/resources/events/backfills.d.ts.map +1 -1
- package/resources/events/backfills.js +5 -29
- package/resources/events/backfills.js.map +1 -1
- package/resources/events/backfills.mjs +5 -6
- package/resources/events/backfills.mjs.map +1 -1
- package/resources/events/events.d.ts +7 -22
- package/resources/events/events.d.ts.map +1 -1
- package/resources/events/events.js +7 -7
- package/resources/events/events.js.map +1 -1
- package/resources/events/events.mjs +7 -7
- package/resources/events/events.mjs.map +1 -1
- package/resources/events/index.d.ts +3 -3
- package/resources/events/index.d.ts.map +1 -1
- package/resources/events/index.js.map +1 -1
- package/resources/events/index.mjs.map +1 -1
- package/resources/events/volume.d.ts +1 -3
- package/resources/events/volume.d.ts.map +1 -1
- package/resources/events/volume.js +0 -2
- package/resources/events/volume.js.map +1 -1
- package/resources/events/volume.mjs +0 -2
- package/resources/events/volume.mjs.map +1 -1
- package/resources/index.d.ts +14 -13
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +10 -7
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +8 -7
- package/resources/index.mjs.map +1 -1
- package/resources/invoice-line-items.d.ts +1 -3
- package/resources/invoice-line-items.d.ts.map +1 -1
- package/resources/invoice-line-items.js +0 -2
- package/resources/invoice-line-items.js.map +1 -1
- package/resources/invoice-line-items.mjs +0 -2
- package/resources/invoice-line-items.mjs.map +1 -1
- package/resources/invoices.d.ts +78 -13
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +8 -27
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +8 -4
- package/resources/invoices.mjs.map +1 -1
- package/resources/items.d.ts +1 -6
- package/resources/items.d.ts.map +1 -1
- package/resources/items.js +1 -27
- package/resources/items.js.map +1 -1
- package/resources/items.mjs +1 -4
- package/resources/items.mjs.map +1 -1
- package/resources/metrics.d.ts +1 -6
- package/resources/metrics.d.ts.map +1 -1
- package/resources/metrics.js +1 -27
- package/resources/metrics.js.map +1 -1
- package/resources/metrics.mjs +1 -4
- package/resources/metrics.mjs.map +1 -1
- package/resources/plans/external-plan-id.d.ts +1 -2
- package/resources/plans/external-plan-id.d.ts.map +1 -1
- package/resources/plans/external-plan-id.js +0 -2
- package/resources/plans/external-plan-id.js.map +1 -1
- package/resources/plans/external-plan-id.mjs +0 -2
- package/resources/plans/external-plan-id.mjs.map +1 -1
- package/resources/plans/index.d.ts +2 -2
- package/resources/plans/index.d.ts.map +1 -1
- package/resources/plans/index.js.map +1 -1
- package/resources/plans/index.mjs +1 -1
- package/resources/plans/index.mjs.map +1 -1
- package/resources/plans/plans.d.ts +331 -9
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js +3 -5
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs +3 -5
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/external-price-id.d.ts +1 -2
- package/resources/prices/external-price-id.d.ts.map +1 -1
- package/resources/prices/external-price-id.js +0 -2
- package/resources/prices/external-price-id.js.map +1 -1
- package/resources/prices/external-price-id.mjs +0 -2
- package/resources/prices/external-price-id.mjs.map +1 -1
- package/resources/prices/index.d.ts +2 -2
- package/resources/prices/index.d.ts.map +1 -1
- package/resources/prices/index.js +3 -3
- package/resources/prices/index.js.map +1 -1
- package/resources/prices/index.mjs +1 -1
- package/resources/prices/index.mjs.map +1 -1
- package/resources/prices/prices.d.ts +339 -13
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js +3 -5
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs +3 -5
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/subscriptions.d.ts +7629 -191
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +2 -29
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +2 -6
- package/resources/subscriptions.mjs.map +1 -1
- package/resources/top-level.d.ts +1 -2
- package/resources/top-level.d.ts.map +1 -1
- package/resources/top-level.js +0 -2
- package/resources/top-level.js.map +1 -1
- package/resources/top-level.mjs +0 -2
- package/resources/top-level.mjs.map +1 -1
- package/src/core.ts +23 -19
- package/src/error.ts +82 -125
- package/src/index.ts +334 -130
- package/src/resources/alerts.ts +117 -24
- package/src/resources/coupons/coupons.ts +13 -8
- package/src/resources/coupons/index.ts +2 -2
- package/src/resources/coupons/subscriptions.ts +2 -3
- package/src/resources/credit-notes.ts +45 -5
- package/src/resources/customers/balance-transactions.ts +10 -7
- package/src/resources/customers/costs.ts +7 -6
- package/src/resources/customers/credits/credits.ts +82 -32
- package/src/resources/customers/credits/index.ts +20 -20
- package/src/resources/customers/credits/ledger.ts +30 -24
- package/src/resources/customers/credits/top-ups.ts +16 -12
- package/src/resources/customers/customers.ts +68 -26
- package/src/resources/customers/index.ts +17 -17
- package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +146 -0
- package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +20 -0
- package/src/resources/dimensional-price-groups/index.ts +10 -0
- package/src/resources/events/backfills.ts +17 -12
- package/src/resources/events/events.ts +42 -23
- package/src/resources/events/index.ts +15 -15
- package/src/resources/events/volume.ts +2 -4
- package/src/resources/index.ts +113 -67
- package/src/resources/invoice-line-items.ts +5 -4
- package/src/resources/invoices.ts +108 -14
- package/src/resources/items.ts +10 -7
- package/src/resources/metrics.ts +10 -7
- package/src/resources/plans/external-plan-id.ts +2 -3
- package/src/resources/plans/index.ts +9 -2
- package/src/resources/plans/plans.ts +424 -9
- package/src/resources/prices/external-price-id.ts +2 -3
- package/src/resources/prices/index.ts +8 -8
- package/src/resources/prices/prices.ts +470 -14
- package/src/resources/subscriptions.ts +9231 -400
- package/src/resources/top-level.ts +2 -3
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- 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.
|
|
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,7 +3246,9 @@ export type PriceCreateParams =
|
|
|
3024
3246
|
| PriceCreateParams.NewFloatingGroupedAllocationPrice
|
|
3025
3247
|
| PriceCreateParams.NewFloatingGroupedWithProratedMinimumPrice
|
|
3026
3248
|
| PriceCreateParams.NewFloatingGroupedWithMeteredMinimumPrice
|
|
3027
|
-
| PriceCreateParams.
|
|
3249
|
+
| PriceCreateParams.NewFloatingMatrixWithDisplayNamePrice
|
|
3250
|
+
| PriceCreateParams.NewFloatingBulkWithProrationPrice
|
|
3251
|
+
| PriceCreateParams.NewFloatingGroupedTieredPackagePrice;
|
|
3028
3252
|
|
|
3029
3253
|
export namespace PriceCreateParams {
|
|
3030
3254
|
export interface NewFloatingUnitPrice {
|
|
@@ -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
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
export
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
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
|
}
|