orb-billing 2.11.1 → 3.0.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.
- package/CHANGELOG.md +57 -0
- package/README.md +7 -15
- package/core.d.ts +4 -2
- package/core.d.ts.map +1 -1
- package/core.js +17 -4
- package/core.js.map +1 -1
- package/core.mjs +18 -5
- package/core.mjs.map +1 -1
- package/index.d.mts +7 -3
- package/index.d.ts +7 -3
- package/index.d.ts.map +1 -1
- package/index.js +4 -2
- package/index.js.map +1 -1
- package/index.mjs +4 -2
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/alerts.d.ts +1 -1
- package/resources/alerts.d.ts.map +1 -1
- package/resources/alerts.js.map +1 -1
- package/resources/alerts.mjs.map +1 -1
- package/resources/coupons/coupons.d.ts +25 -8
- package/resources/coupons/coupons.d.ts.map +1 -1
- package/resources/coupons/coupons.js.map +1 -1
- package/resources/coupons/coupons.mjs.map +1 -1
- package/resources/coupons/subscriptions.d.ts +1 -1
- package/resources/coupons/subscriptions.d.ts.map +1 -1
- package/resources/coupons/subscriptions.js.map +1 -1
- package/resources/coupons/subscriptions.mjs.map +1 -1
- package/resources/credit-notes.d.ts +1 -1
- package/resources/credit-notes.d.ts.map +1 -1
- package/resources/credit-notes.js.map +1 -1
- package/resources/credit-notes.mjs.map +1 -1
- package/resources/customers/balance-transactions.d.ts +1 -1
- package/resources/customers/balance-transactions.d.ts.map +1 -1
- package/resources/customers/balance-transactions.js.map +1 -1
- package/resources/customers/balance-transactions.mjs.map +1 -1
- package/resources/customers/costs.d.ts +1 -1
- package/resources/customers/costs.d.ts.map +1 -1
- package/resources/customers/costs.js.map +1 -1
- package/resources/customers/costs.mjs.map +1 -1
- package/resources/customers/credits/credits.d.ts +11 -1
- package/resources/customers/credits/credits.d.ts.map +1 -1
- package/resources/customers/credits/credits.js.map +1 -1
- package/resources/customers/credits/credits.mjs.map +1 -1
- package/resources/customers/credits/ledger.d.ts +1 -1
- package/resources/customers/credits/ledger.d.ts.map +1 -1
- package/resources/customers/credits/ledger.js.map +1 -1
- package/resources/customers/credits/ledger.mjs.map +1 -1
- package/resources/customers/credits/top-ups.d.ts +1 -1
- package/resources/customers/credits/top-ups.d.ts.map +1 -1
- package/resources/customers/credits/top-ups.js.map +1 -1
- package/resources/customers/credits/top-ups.mjs.map +1 -1
- package/resources/customers/customers.d.ts +1 -1
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/usage.d.ts +1 -1
- package/resources/customers/usage.d.ts.map +1 -1
- package/resources/customers/usage.js.map +1 -1
- package/resources/customers/usage.mjs.map +1 -1
- package/resources/events/backfills.d.ts +1 -1
- package/resources/events/backfills.d.ts.map +1 -1
- package/resources/events/backfills.js.map +1 -1
- package/resources/events/backfills.mjs.map +1 -1
- package/resources/events/events.d.ts +1 -1
- package/resources/events/events.d.ts.map +1 -1
- package/resources/events/events.js.map +1 -1
- package/resources/events/events.mjs.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invoice-line-items.d.ts +1 -1
- package/resources/invoice-line-items.d.ts.map +1 -1
- package/resources/invoice-line-items.js.map +1 -1
- package/resources/invoice-line-items.mjs.map +1 -1
- package/resources/invoices.d.ts +31 -1
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +6 -0
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +6 -0
- package/resources/invoices.mjs.map +1 -1
- package/resources/items.d.ts +6 -10
- package/resources/items.d.ts.map +1 -1
- package/resources/items.js +4 -4
- package/resources/items.js.map +1 -1
- package/resources/items.mjs +4 -4
- package/resources/items.mjs.map +1 -1
- package/resources/metrics.d.ts +1 -1
- package/resources/metrics.d.ts.map +1 -1
- package/resources/metrics.js.map +1 -1
- package/resources/metrics.mjs.map +1 -1
- package/resources/plans/external-plan-id.d.ts +8 -12
- package/resources/plans/external-plan-id.d.ts.map +1 -1
- package/resources/plans/external-plan-id.js +4 -0
- package/resources/plans/external-plan-id.js.map +1 -1
- package/resources/plans/external-plan-id.mjs +4 -0
- package/resources/plans/external-plan-id.mjs.map +1 -1
- package/resources/plans/plans.d.ts +112 -17
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/external-price-id.d.ts +20 -1
- package/resources/prices/external-price-id.d.ts.map +1 -1
- package/resources/prices/external-price-id.js +9 -0
- package/resources/prices/external-price-id.js.map +1 -1
- package/resources/prices/external-price-id.mjs +9 -0
- 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.map +1 -1
- package/resources/prices/index.mjs.map +1 -1
- package/resources/prices/prices.d.ts +288 -37
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js +6 -0
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs +6 -0
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/subscriptions.d.ts +247 -19
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs.map +1 -1
- package/resources/top-level.d.ts +1 -1
- package/resources/top-level.d.ts.map +1 -1
- package/resources/top-level.js.map +1 -1
- package/resources/top-level.mjs.map +1 -1
- package/resources/webhooks.js +2 -2
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/src/core.ts +27 -8
- package/src/index.ts +8 -3
- package/src/resources/alerts.ts +1 -1
- package/src/resources/coupons/coupons.ts +25 -8
- package/src/resources/coupons/subscriptions.ts +1 -1
- package/src/resources/credit-notes.ts +1 -1
- package/src/resources/customers/balance-transactions.ts +1 -1
- package/src/resources/customers/costs.ts +1 -1
- package/src/resources/customers/credits/credits.ts +15 -1
- package/src/resources/customers/credits/ledger.ts +1 -1
- package/src/resources/customers/credits/top-ups.ts +1 -1
- package/src/resources/customers/customers.ts +1 -1
- package/src/resources/customers/usage.ts +1 -1
- package/src/resources/events/backfills.ts +1 -1
- package/src/resources/events/events.ts +1 -1
- package/src/resources/index.ts +2 -0
- package/src/resources/invoice-line-items.ts +1 -1
- package/src/resources/invoices.ts +50 -1
- package/src/resources/items.ts +14 -10
- package/src/resources/metrics.ts +1 -1
- package/src/resources/plans/external-plan-id.ts +8 -12
- package/src/resources/plans/plans.ts +128 -17
- package/src/resources/prices/external-price-id.ts +38 -1
- package/src/resources/prices/index.ts +2 -1
- package/src/resources/prices/prices.ts +336 -37
- package/src/resources/subscriptions.ts +295 -19
- package/src/resources/top-level.ts +1 -1
- package/src/resources/webhooks.ts +2 -2
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../core';
|
|
4
3
|
import { APIResource } from '../../resource';
|
|
5
4
|
import { isRequestOptions } from '../../core';
|
|
5
|
+
import * as Core from '../../core';
|
|
6
6
|
import * as PlansAPI from './plans';
|
|
7
7
|
import * as Shared from '../shared';
|
|
8
8
|
import * as ExternalPlanIDAPI from './external-plan-id';
|
|
@@ -228,7 +228,7 @@ export namespace Plan {
|
|
|
228
228
|
*/
|
|
229
229
|
duration: number | null;
|
|
230
230
|
|
|
231
|
-
duration_unit: 'daily' | 'monthly' | 'quarterly' | 'annual' | null;
|
|
231
|
+
duration_unit: 'daily' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | null;
|
|
232
232
|
|
|
233
233
|
maximum: PlanPhase.Maximum | null;
|
|
234
234
|
|
|
@@ -340,6 +340,12 @@ export interface PlanCreateParams {
|
|
|
340
340
|
* to 0.
|
|
341
341
|
*/
|
|
342
342
|
net_terms?: number | null;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* The status of the plan to create (either active or draft). If not specified,
|
|
346
|
+
* this defaults to active.
|
|
347
|
+
*/
|
|
348
|
+
status?: 'active' | 'draft';
|
|
343
349
|
}
|
|
344
350
|
|
|
345
351
|
export namespace PlanCreateParams {
|
|
@@ -347,7 +353,7 @@ export namespace PlanCreateParams {
|
|
|
347
353
|
/**
|
|
348
354
|
* The cadence to bill for this price on.
|
|
349
355
|
*/
|
|
350
|
-
cadence: 'annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
356
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
351
357
|
|
|
352
358
|
/**
|
|
353
359
|
* The id of the item the plan will be associated with.
|
|
@@ -401,6 +407,13 @@ export namespace PlanCreateParams {
|
|
|
401
407
|
* The property used to group this price on an invoice
|
|
402
408
|
*/
|
|
403
409
|
invoice_grouping_key?: string | null;
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
413
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
414
|
+
* by setting `metadata` to `null`.
|
|
415
|
+
*/
|
|
416
|
+
metadata?: Record<string, string | null> | null;
|
|
404
417
|
}
|
|
405
418
|
|
|
406
419
|
export namespace NewPlanUnitPrice {
|
|
@@ -416,7 +429,7 @@ export namespace PlanCreateParams {
|
|
|
416
429
|
/**
|
|
417
430
|
* The cadence to bill for this price on.
|
|
418
431
|
*/
|
|
419
|
-
cadence: 'annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
432
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
420
433
|
|
|
421
434
|
/**
|
|
422
435
|
* The id of the item the plan will be associated with.
|
|
@@ -470,6 +483,13 @@ export namespace PlanCreateParams {
|
|
|
470
483
|
* The property used to group this price on an invoice
|
|
471
484
|
*/
|
|
472
485
|
invoice_grouping_key?: string | null;
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
489
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
490
|
+
* by setting `metadata` to `null`.
|
|
491
|
+
*/
|
|
492
|
+
metadata?: Record<string, string | null> | null;
|
|
473
493
|
}
|
|
474
494
|
|
|
475
495
|
export namespace NewPlanPackagePrice {
|
|
@@ -491,7 +511,7 @@ export namespace PlanCreateParams {
|
|
|
491
511
|
/**
|
|
492
512
|
* The cadence to bill for this price on.
|
|
493
513
|
*/
|
|
494
|
-
cadence: 'annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
514
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
495
515
|
|
|
496
516
|
/**
|
|
497
517
|
* The id of the item the plan will be associated with.
|
|
@@ -545,6 +565,13 @@ export namespace PlanCreateParams {
|
|
|
545
565
|
* The property used to group this price on an invoice
|
|
546
566
|
*/
|
|
547
567
|
invoice_grouping_key?: string | null;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
571
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
572
|
+
* by setting `metadata` to `null`.
|
|
573
|
+
*/
|
|
574
|
+
metadata?: Record<string, string | null> | null;
|
|
548
575
|
}
|
|
549
576
|
|
|
550
577
|
export namespace NewPlanMatrixPrice {
|
|
@@ -586,7 +613,7 @@ export namespace PlanCreateParams {
|
|
|
586
613
|
/**
|
|
587
614
|
* The cadence to bill for this price on.
|
|
588
615
|
*/
|
|
589
|
-
cadence: 'annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
616
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
590
617
|
|
|
591
618
|
/**
|
|
592
619
|
* The id of the item the plan will be associated with.
|
|
@@ -640,6 +667,13 @@ export namespace PlanCreateParams {
|
|
|
640
667
|
* The property used to group this price on an invoice
|
|
641
668
|
*/
|
|
642
669
|
invoice_grouping_key?: string | null;
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
673
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
674
|
+
* by setting `metadata` to `null`.
|
|
675
|
+
*/
|
|
676
|
+
metadata?: Record<string, string | null> | null;
|
|
643
677
|
}
|
|
644
678
|
|
|
645
679
|
export namespace NewPlanTieredPrice {
|
|
@@ -674,7 +708,7 @@ export namespace PlanCreateParams {
|
|
|
674
708
|
/**
|
|
675
709
|
* The cadence to bill for this price on.
|
|
676
710
|
*/
|
|
677
|
-
cadence: 'annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
711
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
678
712
|
|
|
679
713
|
/**
|
|
680
714
|
* The id of the item the plan will be associated with.
|
|
@@ -728,6 +762,13 @@ export namespace PlanCreateParams {
|
|
|
728
762
|
* The property used to group this price on an invoice
|
|
729
763
|
*/
|
|
730
764
|
invoice_grouping_key?: string | null;
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
768
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
769
|
+
* by setting `metadata` to `null`.
|
|
770
|
+
*/
|
|
771
|
+
metadata?: Record<string, string | null> | null;
|
|
731
772
|
}
|
|
732
773
|
|
|
733
774
|
export namespace NewPlanTieredBpsPrice {
|
|
@@ -770,7 +811,7 @@ export namespace PlanCreateParams {
|
|
|
770
811
|
/**
|
|
771
812
|
* The cadence to bill for this price on.
|
|
772
813
|
*/
|
|
773
|
-
cadence: 'annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
814
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
774
815
|
|
|
775
816
|
/**
|
|
776
817
|
* The id of the item the plan will be associated with.
|
|
@@ -822,6 +863,13 @@ export namespace PlanCreateParams {
|
|
|
822
863
|
* The property used to group this price on an invoice
|
|
823
864
|
*/
|
|
824
865
|
invoice_grouping_key?: string | null;
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
869
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
870
|
+
* by setting `metadata` to `null`.
|
|
871
|
+
*/
|
|
872
|
+
metadata?: Record<string, string | null> | null;
|
|
825
873
|
}
|
|
826
874
|
|
|
827
875
|
export namespace NewPlanBpsPrice {
|
|
@@ -844,7 +892,7 @@ export namespace PlanCreateParams {
|
|
|
844
892
|
/**
|
|
845
893
|
* The cadence to bill for this price on.
|
|
846
894
|
*/
|
|
847
|
-
cadence: 'annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
895
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
848
896
|
|
|
849
897
|
/**
|
|
850
898
|
* The id of the item the plan will be associated with.
|
|
@@ -896,6 +944,13 @@ export namespace PlanCreateParams {
|
|
|
896
944
|
* The property used to group this price on an invoice
|
|
897
945
|
*/
|
|
898
946
|
invoice_grouping_key?: string | null;
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
950
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
951
|
+
* by setting `metadata` to `null`.
|
|
952
|
+
*/
|
|
953
|
+
metadata?: Record<string, string | null> | null;
|
|
899
954
|
}
|
|
900
955
|
|
|
901
956
|
export namespace NewPlanBulkBpsPrice {
|
|
@@ -933,7 +988,7 @@ export namespace PlanCreateParams {
|
|
|
933
988
|
/**
|
|
934
989
|
* The cadence to bill for this price on.
|
|
935
990
|
*/
|
|
936
|
-
cadence: 'annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
991
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
937
992
|
|
|
938
993
|
/**
|
|
939
994
|
* The id of the item the plan will be associated with.
|
|
@@ -985,6 +1040,13 @@ export namespace PlanCreateParams {
|
|
|
985
1040
|
* The property used to group this price on an invoice
|
|
986
1041
|
*/
|
|
987
1042
|
invoice_grouping_key?: string | null;
|
|
1043
|
+
|
|
1044
|
+
/**
|
|
1045
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1046
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1047
|
+
* by setting `metadata` to `null`.
|
|
1048
|
+
*/
|
|
1049
|
+
metadata?: Record<string, string | null> | null;
|
|
988
1050
|
}
|
|
989
1051
|
|
|
990
1052
|
export namespace NewPlanBulkPrice {
|
|
@@ -1014,7 +1076,7 @@ export namespace PlanCreateParams {
|
|
|
1014
1076
|
/**
|
|
1015
1077
|
* The cadence to bill for this price on.
|
|
1016
1078
|
*/
|
|
1017
|
-
cadence: 'annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
1079
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
1018
1080
|
|
|
1019
1081
|
/**
|
|
1020
1082
|
* The id of the item the plan will be associated with.
|
|
@@ -1068,13 +1130,20 @@ export namespace PlanCreateParams {
|
|
|
1068
1130
|
* The property used to group this price on an invoice
|
|
1069
1131
|
*/
|
|
1070
1132
|
invoice_grouping_key?: string | null;
|
|
1133
|
+
|
|
1134
|
+
/**
|
|
1135
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1136
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1137
|
+
* by setting `metadata` to `null`.
|
|
1138
|
+
*/
|
|
1139
|
+
metadata?: Record<string, string | null> | null;
|
|
1071
1140
|
}
|
|
1072
1141
|
|
|
1073
1142
|
export interface NewPlanTieredPackagePrice {
|
|
1074
1143
|
/**
|
|
1075
1144
|
* The cadence to bill for this price on.
|
|
1076
1145
|
*/
|
|
1077
|
-
cadence: 'annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
1146
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
1078
1147
|
|
|
1079
1148
|
/**
|
|
1080
1149
|
* The id of the item the plan will be associated with.
|
|
@@ -1128,13 +1197,20 @@ export namespace PlanCreateParams {
|
|
|
1128
1197
|
* The property used to group this price on an invoice
|
|
1129
1198
|
*/
|
|
1130
1199
|
invoice_grouping_key?: string | null;
|
|
1200
|
+
|
|
1201
|
+
/**
|
|
1202
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1203
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1204
|
+
* by setting `metadata` to `null`.
|
|
1205
|
+
*/
|
|
1206
|
+
metadata?: Record<string, string | null> | null;
|
|
1131
1207
|
}
|
|
1132
1208
|
|
|
1133
1209
|
export interface NewPlanTieredWithMinimumPrice {
|
|
1134
1210
|
/**
|
|
1135
1211
|
* The cadence to bill for this price on.
|
|
1136
1212
|
*/
|
|
1137
|
-
cadence: 'annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
1213
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
1138
1214
|
|
|
1139
1215
|
/**
|
|
1140
1216
|
* The id of the item the plan will be associated with.
|
|
@@ -1188,13 +1264,20 @@ export namespace PlanCreateParams {
|
|
|
1188
1264
|
* The property used to group this price on an invoice
|
|
1189
1265
|
*/
|
|
1190
1266
|
invoice_grouping_key?: string | null;
|
|
1267
|
+
|
|
1268
|
+
/**
|
|
1269
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1270
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1271
|
+
* by setting `metadata` to `null`.
|
|
1272
|
+
*/
|
|
1273
|
+
metadata?: Record<string, string | null> | null;
|
|
1191
1274
|
}
|
|
1192
1275
|
|
|
1193
1276
|
export interface NewPlanUnitWithPercentPrice {
|
|
1194
1277
|
/**
|
|
1195
1278
|
* The cadence to bill for this price on.
|
|
1196
1279
|
*/
|
|
1197
|
-
cadence: 'annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
1280
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
1198
1281
|
|
|
1199
1282
|
/**
|
|
1200
1283
|
* The id of the item the plan will be associated with.
|
|
@@ -1248,13 +1331,20 @@ export namespace PlanCreateParams {
|
|
|
1248
1331
|
* The property used to group this price on an invoice
|
|
1249
1332
|
*/
|
|
1250
1333
|
invoice_grouping_key?: string | null;
|
|
1334
|
+
|
|
1335
|
+
/**
|
|
1336
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1337
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1338
|
+
* by setting `metadata` to `null`.
|
|
1339
|
+
*/
|
|
1340
|
+
metadata?: Record<string, string | null> | null;
|
|
1251
1341
|
}
|
|
1252
1342
|
|
|
1253
1343
|
export interface NewPlanPackageWithAllocationPrice {
|
|
1254
1344
|
/**
|
|
1255
1345
|
* The cadence to bill for this price on.
|
|
1256
1346
|
*/
|
|
1257
|
-
cadence: 'annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
1347
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
1258
1348
|
|
|
1259
1349
|
/**
|
|
1260
1350
|
* The id of the item the plan will be associated with.
|
|
@@ -1308,13 +1398,20 @@ export namespace PlanCreateParams {
|
|
|
1308
1398
|
* The property used to group this price on an invoice
|
|
1309
1399
|
*/
|
|
1310
1400
|
invoice_grouping_key?: string | null;
|
|
1401
|
+
|
|
1402
|
+
/**
|
|
1403
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1404
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1405
|
+
* by setting `metadata` to `null`.
|
|
1406
|
+
*/
|
|
1407
|
+
metadata?: Record<string, string | null> | null;
|
|
1311
1408
|
}
|
|
1312
1409
|
|
|
1313
1410
|
export interface NewPlanTierWithProrationPrice {
|
|
1314
1411
|
/**
|
|
1315
1412
|
* The cadence to bill for this price on.
|
|
1316
1413
|
*/
|
|
1317
|
-
cadence: 'annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
1414
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
1318
1415
|
|
|
1319
1416
|
/**
|
|
1320
1417
|
* The id of the item the plan will be associated with.
|
|
@@ -1368,13 +1465,20 @@ export namespace PlanCreateParams {
|
|
|
1368
1465
|
* The property used to group this price on an invoice
|
|
1369
1466
|
*/
|
|
1370
1467
|
invoice_grouping_key?: string | null;
|
|
1468
|
+
|
|
1469
|
+
/**
|
|
1470
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1471
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1472
|
+
* by setting `metadata` to `null`.
|
|
1473
|
+
*/
|
|
1474
|
+
metadata?: Record<string, string | null> | null;
|
|
1371
1475
|
}
|
|
1372
1476
|
|
|
1373
1477
|
export interface NewPlanUnitWithProrationPrice {
|
|
1374
1478
|
/**
|
|
1375
1479
|
* The cadence to bill for this price on.
|
|
1376
1480
|
*/
|
|
1377
|
-
cadence: 'annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
1481
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time';
|
|
1378
1482
|
|
|
1379
1483
|
/**
|
|
1380
1484
|
* The id of the item the plan will be associated with.
|
|
@@ -1428,6 +1532,13 @@ export namespace PlanCreateParams {
|
|
|
1428
1532
|
* The property used to group this price on an invoice
|
|
1429
1533
|
*/
|
|
1430
1534
|
invoice_grouping_key?: string | null;
|
|
1535
|
+
|
|
1536
|
+
/**
|
|
1537
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1538
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1539
|
+
* by setting `metadata` to `null`.
|
|
1540
|
+
*/
|
|
1541
|
+
metadata?: Record<string, string | null> | null;
|
|
1431
1542
|
}
|
|
1432
1543
|
}
|
|
1433
1544
|
|
|
@@ -1,10 +1,34 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../core';
|
|
4
3
|
import { APIResource } from '../../resource';
|
|
4
|
+
import { isRequestOptions } from '../../core';
|
|
5
|
+
import * as Core from '../../core';
|
|
6
|
+
import * as ExternalPriceIDAPI from './external-price-id';
|
|
5
7
|
import * as PricesAPI from './prices';
|
|
6
8
|
|
|
7
9
|
export class ExternalPriceID extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* This endpoint allows you to update the `metadata` property on a price. If you
|
|
12
|
+
* pass null for the metadata value, it will clear any existing metadata for that
|
|
13
|
+
* price.
|
|
14
|
+
*/
|
|
15
|
+
update(
|
|
16
|
+
externalPriceId: string,
|
|
17
|
+
body?: ExternalPriceIDUpdateParams,
|
|
18
|
+
options?: Core.RequestOptions,
|
|
19
|
+
): Core.APIPromise<PricesAPI.Price>;
|
|
20
|
+
update(externalPriceId: string, options?: Core.RequestOptions): Core.APIPromise<PricesAPI.Price>;
|
|
21
|
+
update(
|
|
22
|
+
externalPriceId: string,
|
|
23
|
+
body: ExternalPriceIDUpdateParams | Core.RequestOptions = {},
|
|
24
|
+
options?: Core.RequestOptions,
|
|
25
|
+
): Core.APIPromise<PricesAPI.Price> {
|
|
26
|
+
if (isRequestOptions(body)) {
|
|
27
|
+
return this.update(externalPriceId, {}, body);
|
|
28
|
+
}
|
|
29
|
+
return this._client.put(`/prices/external_price_id/${externalPriceId}`, { body, ...options });
|
|
30
|
+
}
|
|
31
|
+
|
|
8
32
|
/**
|
|
9
33
|
* This endpoint returns a price given an external price id. See the
|
|
10
34
|
* [price creation API](../reference/create-price) for more information about
|
|
@@ -14,3 +38,16 @@ export class ExternalPriceID extends APIResource {
|
|
|
14
38
|
return this._client.get(`/prices/external_price_id/${externalPriceId}`, options);
|
|
15
39
|
}
|
|
16
40
|
}
|
|
41
|
+
|
|
42
|
+
export interface ExternalPriceIDUpdateParams {
|
|
43
|
+
/**
|
|
44
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
45
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
46
|
+
* by setting `metadata` to `null`.
|
|
47
|
+
*/
|
|
48
|
+
metadata?: Record<string, string | null> | null;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export namespace ExternalPriceID {
|
|
52
|
+
export import ExternalPriceIDUpdateParams = ExternalPriceIDAPI.ExternalPriceIDUpdateParams;
|
|
53
|
+
}
|
|
@@ -5,9 +5,10 @@ export {
|
|
|
5
5
|
Price,
|
|
6
6
|
PriceEvaluateResponse,
|
|
7
7
|
PriceCreateParams,
|
|
8
|
+
PriceUpdateParams,
|
|
8
9
|
PriceListParams,
|
|
9
10
|
PriceEvaluateParams,
|
|
10
11
|
PricesPage,
|
|
11
12
|
Prices,
|
|
12
13
|
} from './prices';
|
|
13
|
-
export { ExternalPriceID } from './external-price-id';
|
|
14
|
+
export { ExternalPriceIDUpdateParams, ExternalPriceID } from './external-price-id';
|