orb-billing 5.14.0 → 5.16.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 +22 -0
- package/package.json +1 -1
- package/resources/beta/beta.d.ts +396 -2
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/external-plan-id.d.ts +396 -2
- package/resources/beta/external-plan-id.d.ts.map +1 -1
- package/resources/items.d.ts +37 -0
- package/resources/items.d.ts.map +1 -1
- package/resources/items.js.map +1 -1
- package/resources/items.mjs.map +1 -1
- package/resources/plans/plans.d.ts +198 -1
- 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/prices.d.ts +558 -3
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/shared.d.ts +284 -1
- package/resources/shared.d.ts.map +1 -1
- package/resources/shared.js.map +1 -1
- package/resources/shared.mjs.map +1 -1
- package/resources/subscriptions.d.ts +1104 -131
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs.map +1 -1
- package/src/resources/beta/beta.ts +468 -0
- package/src/resources/beta/external-plan-id.ts +468 -0
- package/src/resources/items.ts +38 -0
- package/src/resources/plans/plans.ts +234 -0
- package/src/resources/prices/prices.ts +688 -28
- package/src/resources/shared.ts +342 -1
- package/src/resources/subscriptions.ts +1250 -94
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -153,6 +153,8 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
|
|
|
153
153
|
| Shared.NewPlanScalableMatrixWithTieredPricingPrice
|
|
154
154
|
| Shared.NewPlanCumulativeGroupedBulkPrice
|
|
155
155
|
| Shared.NewPlanMinimumCompositePrice
|
|
156
|
+
| AddPrice.NewPlanPercentCompositePrice
|
|
157
|
+
| AddPrice.NewPlanEventOutputPrice
|
|
156
158
|
| null;
|
|
157
159
|
}
|
|
158
160
|
|
|
@@ -415,6 +417,238 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
|
|
|
415
417
|
per_unit_rate: string;
|
|
416
418
|
}
|
|
417
419
|
}
|
|
420
|
+
|
|
421
|
+
export interface NewPlanPercentCompositePrice {
|
|
422
|
+
/**
|
|
423
|
+
* The cadence to bill for this price on.
|
|
424
|
+
*/
|
|
425
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* The id of the item the price will be associated with.
|
|
429
|
+
*/
|
|
430
|
+
item_id: string;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* The pricing model type
|
|
434
|
+
*/
|
|
435
|
+
model_type: 'percent';
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* The name of the price.
|
|
439
|
+
*/
|
|
440
|
+
name: string;
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Configuration for percent pricing
|
|
444
|
+
*/
|
|
445
|
+
percent_config: NewPlanPercentCompositePrice.PercentConfig;
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
449
|
+
* usage-based.
|
|
450
|
+
*/
|
|
451
|
+
billable_metric_id?: string | null;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
455
|
+
* this is true, and in-arrears if this is false.
|
|
456
|
+
*/
|
|
457
|
+
billed_in_advance?: boolean | null;
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
461
|
+
* months.
|
|
462
|
+
*/
|
|
463
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
467
|
+
*/
|
|
468
|
+
conversion_rate?: number | null;
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
472
|
+
*/
|
|
473
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
477
|
+
* price is billed.
|
|
478
|
+
*/
|
|
479
|
+
currency?: string | null;
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* For dimensional price: specifies a price group and dimension values
|
|
483
|
+
*/
|
|
484
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* An alias for the price.
|
|
488
|
+
*/
|
|
489
|
+
external_price_id?: string | null;
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
493
|
+
* applied.
|
|
494
|
+
*/
|
|
495
|
+
fixed_price_quantity?: number | null;
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* The property used to group this price on an invoice
|
|
499
|
+
*/
|
|
500
|
+
invoice_grouping_key?: string | null;
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
504
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
505
|
+
*/
|
|
506
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
510
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
511
|
+
* by setting `metadata` to `null`.
|
|
512
|
+
*/
|
|
513
|
+
metadata?: { [key: string]: string | null } | null;
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
517
|
+
* in the same API call.
|
|
518
|
+
*/
|
|
519
|
+
reference_id?: string | null;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
export namespace NewPlanPercentCompositePrice {
|
|
523
|
+
/**
|
|
524
|
+
* Configuration for percent pricing
|
|
525
|
+
*/
|
|
526
|
+
export interface PercentConfig {
|
|
527
|
+
/**
|
|
528
|
+
* What percent of the component subtotals to charge
|
|
529
|
+
*/
|
|
530
|
+
percent: number;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
export interface NewPlanEventOutputPrice {
|
|
535
|
+
/**
|
|
536
|
+
* The cadence to bill for this price on.
|
|
537
|
+
*/
|
|
538
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* Configuration for event_output pricing
|
|
542
|
+
*/
|
|
543
|
+
event_output_config: NewPlanEventOutputPrice.EventOutputConfig;
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* The id of the item the price will be associated with.
|
|
547
|
+
*/
|
|
548
|
+
item_id: string;
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* The pricing model type
|
|
552
|
+
*/
|
|
553
|
+
model_type: 'event_output';
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* The name of the price.
|
|
557
|
+
*/
|
|
558
|
+
name: string;
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
562
|
+
* usage-based.
|
|
563
|
+
*/
|
|
564
|
+
billable_metric_id?: string | null;
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
568
|
+
* this is true, and in-arrears if this is false.
|
|
569
|
+
*/
|
|
570
|
+
billed_in_advance?: boolean | null;
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
574
|
+
* months.
|
|
575
|
+
*/
|
|
576
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
580
|
+
*/
|
|
581
|
+
conversion_rate?: number | null;
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
585
|
+
*/
|
|
586
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
590
|
+
* price is billed.
|
|
591
|
+
*/
|
|
592
|
+
currency?: string | null;
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* For dimensional price: specifies a price group and dimension values
|
|
596
|
+
*/
|
|
597
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* An alias for the price.
|
|
601
|
+
*/
|
|
602
|
+
external_price_id?: string | null;
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
606
|
+
* applied.
|
|
607
|
+
*/
|
|
608
|
+
fixed_price_quantity?: number | null;
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* The property used to group this price on an invoice
|
|
612
|
+
*/
|
|
613
|
+
invoice_grouping_key?: string | null;
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
617
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
618
|
+
*/
|
|
619
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
623
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
624
|
+
* by setting `metadata` to `null`.
|
|
625
|
+
*/
|
|
626
|
+
metadata?: { [key: string]: string | null } | null;
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
630
|
+
* in the same API call.
|
|
631
|
+
*/
|
|
632
|
+
reference_id?: string | null;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
export namespace NewPlanEventOutputPrice {
|
|
636
|
+
/**
|
|
637
|
+
* Configuration for event_output pricing
|
|
638
|
+
*/
|
|
639
|
+
export interface EventOutputConfig {
|
|
640
|
+
/**
|
|
641
|
+
* The key in the event data to extract the unit rate from.
|
|
642
|
+
*/
|
|
643
|
+
unit_rating_key: string;
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* An optional key in the event data to group by (e.g., event ID). All events will
|
|
647
|
+
* also be grouped by their unit rate.
|
|
648
|
+
*/
|
|
649
|
+
grouping_key?: string | null;
|
|
650
|
+
}
|
|
651
|
+
}
|
|
418
652
|
}
|
|
419
653
|
|
|
420
654
|
export interface RemoveAdjustment {
|
|
@@ -510,6 +744,8 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
|
|
|
510
744
|
| Shared.NewPlanScalableMatrixWithTieredPricingPrice
|
|
511
745
|
| Shared.NewPlanCumulativeGroupedBulkPrice
|
|
512
746
|
| Shared.NewPlanMinimumCompositePrice
|
|
747
|
+
| ReplacePrice.NewPlanPercentCompositePrice
|
|
748
|
+
| ReplacePrice.NewPlanEventOutputPrice
|
|
513
749
|
| null;
|
|
514
750
|
}
|
|
515
751
|
|
|
@@ -772,6 +1008,238 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
|
|
|
772
1008
|
per_unit_rate: string;
|
|
773
1009
|
}
|
|
774
1010
|
}
|
|
1011
|
+
|
|
1012
|
+
export interface NewPlanPercentCompositePrice {
|
|
1013
|
+
/**
|
|
1014
|
+
* The cadence to bill for this price on.
|
|
1015
|
+
*/
|
|
1016
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
1017
|
+
|
|
1018
|
+
/**
|
|
1019
|
+
* The id of the item the price will be associated with.
|
|
1020
|
+
*/
|
|
1021
|
+
item_id: string;
|
|
1022
|
+
|
|
1023
|
+
/**
|
|
1024
|
+
* The pricing model type
|
|
1025
|
+
*/
|
|
1026
|
+
model_type: 'percent';
|
|
1027
|
+
|
|
1028
|
+
/**
|
|
1029
|
+
* The name of the price.
|
|
1030
|
+
*/
|
|
1031
|
+
name: string;
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* Configuration for percent pricing
|
|
1035
|
+
*/
|
|
1036
|
+
percent_config: NewPlanPercentCompositePrice.PercentConfig;
|
|
1037
|
+
|
|
1038
|
+
/**
|
|
1039
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
1040
|
+
* usage-based.
|
|
1041
|
+
*/
|
|
1042
|
+
billable_metric_id?: string | null;
|
|
1043
|
+
|
|
1044
|
+
/**
|
|
1045
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1046
|
+
* this is true, and in-arrears if this is false.
|
|
1047
|
+
*/
|
|
1048
|
+
billed_in_advance?: boolean | null;
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
1052
|
+
* months.
|
|
1053
|
+
*/
|
|
1054
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
1055
|
+
|
|
1056
|
+
/**
|
|
1057
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
1058
|
+
*/
|
|
1059
|
+
conversion_rate?: number | null;
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
1063
|
+
*/
|
|
1064
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1068
|
+
* price is billed.
|
|
1069
|
+
*/
|
|
1070
|
+
currency?: string | null;
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* For dimensional price: specifies a price group and dimension values
|
|
1074
|
+
*/
|
|
1075
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* An alias for the price.
|
|
1079
|
+
*/
|
|
1080
|
+
external_price_id?: string | null;
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
1084
|
+
* applied.
|
|
1085
|
+
*/
|
|
1086
|
+
fixed_price_quantity?: number | null;
|
|
1087
|
+
|
|
1088
|
+
/**
|
|
1089
|
+
* The property used to group this price on an invoice
|
|
1090
|
+
*/
|
|
1091
|
+
invoice_grouping_key?: string | null;
|
|
1092
|
+
|
|
1093
|
+
/**
|
|
1094
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1095
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
1096
|
+
*/
|
|
1097
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
1098
|
+
|
|
1099
|
+
/**
|
|
1100
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1101
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1102
|
+
* by setting `metadata` to `null`.
|
|
1103
|
+
*/
|
|
1104
|
+
metadata?: { [key: string]: string | null } | null;
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
1108
|
+
* in the same API call.
|
|
1109
|
+
*/
|
|
1110
|
+
reference_id?: string | null;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
export namespace NewPlanPercentCompositePrice {
|
|
1114
|
+
/**
|
|
1115
|
+
* Configuration for percent pricing
|
|
1116
|
+
*/
|
|
1117
|
+
export interface PercentConfig {
|
|
1118
|
+
/**
|
|
1119
|
+
* What percent of the component subtotals to charge
|
|
1120
|
+
*/
|
|
1121
|
+
percent: number;
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
export interface NewPlanEventOutputPrice {
|
|
1126
|
+
/**
|
|
1127
|
+
* The cadence to bill for this price on.
|
|
1128
|
+
*/
|
|
1129
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
1130
|
+
|
|
1131
|
+
/**
|
|
1132
|
+
* Configuration for event_output pricing
|
|
1133
|
+
*/
|
|
1134
|
+
event_output_config: NewPlanEventOutputPrice.EventOutputConfig;
|
|
1135
|
+
|
|
1136
|
+
/**
|
|
1137
|
+
* The id of the item the price will be associated with.
|
|
1138
|
+
*/
|
|
1139
|
+
item_id: string;
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
* The pricing model type
|
|
1143
|
+
*/
|
|
1144
|
+
model_type: 'event_output';
|
|
1145
|
+
|
|
1146
|
+
/**
|
|
1147
|
+
* The name of the price.
|
|
1148
|
+
*/
|
|
1149
|
+
name: string;
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
1153
|
+
* usage-based.
|
|
1154
|
+
*/
|
|
1155
|
+
billable_metric_id?: string | null;
|
|
1156
|
+
|
|
1157
|
+
/**
|
|
1158
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1159
|
+
* this is true, and in-arrears if this is false.
|
|
1160
|
+
*/
|
|
1161
|
+
billed_in_advance?: boolean | null;
|
|
1162
|
+
|
|
1163
|
+
/**
|
|
1164
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
1165
|
+
* months.
|
|
1166
|
+
*/
|
|
1167
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
1168
|
+
|
|
1169
|
+
/**
|
|
1170
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
1171
|
+
*/
|
|
1172
|
+
conversion_rate?: number | null;
|
|
1173
|
+
|
|
1174
|
+
/**
|
|
1175
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
1176
|
+
*/
|
|
1177
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1181
|
+
* price is billed.
|
|
1182
|
+
*/
|
|
1183
|
+
currency?: string | null;
|
|
1184
|
+
|
|
1185
|
+
/**
|
|
1186
|
+
* For dimensional price: specifies a price group and dimension values
|
|
1187
|
+
*/
|
|
1188
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
1189
|
+
|
|
1190
|
+
/**
|
|
1191
|
+
* An alias for the price.
|
|
1192
|
+
*/
|
|
1193
|
+
external_price_id?: string | null;
|
|
1194
|
+
|
|
1195
|
+
/**
|
|
1196
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
1197
|
+
* applied.
|
|
1198
|
+
*/
|
|
1199
|
+
fixed_price_quantity?: number | null;
|
|
1200
|
+
|
|
1201
|
+
/**
|
|
1202
|
+
* The property used to group this price on an invoice
|
|
1203
|
+
*/
|
|
1204
|
+
invoice_grouping_key?: string | null;
|
|
1205
|
+
|
|
1206
|
+
/**
|
|
1207
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1208
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
1209
|
+
*/
|
|
1210
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1214
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1215
|
+
* by setting `metadata` to `null`.
|
|
1216
|
+
*/
|
|
1217
|
+
metadata?: { [key: string]: string | null } | null;
|
|
1218
|
+
|
|
1219
|
+
/**
|
|
1220
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
1221
|
+
* in the same API call.
|
|
1222
|
+
*/
|
|
1223
|
+
reference_id?: string | null;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
export namespace NewPlanEventOutputPrice {
|
|
1227
|
+
/**
|
|
1228
|
+
* Configuration for event_output pricing
|
|
1229
|
+
*/
|
|
1230
|
+
export interface EventOutputConfig {
|
|
1231
|
+
/**
|
|
1232
|
+
* The key in the event data to extract the unit rate from.
|
|
1233
|
+
*/
|
|
1234
|
+
unit_rating_key: string;
|
|
1235
|
+
|
|
1236
|
+
/**
|
|
1237
|
+
* An optional key in the event data to group by (e.g., event ID). All events will
|
|
1238
|
+
* also be grouped by their unit rate.
|
|
1239
|
+
*/
|
|
1240
|
+
grouping_key?: string | null;
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
775
1243
|
}
|
|
776
1244
|
}
|
|
777
1245
|
|
package/src/resources/items.ts
CHANGED
|
@@ -59,10 +59,20 @@ export class ItemsPage extends Page<Item> {}
|
|
|
59
59
|
* external sync behavior for invoices and tax calculation purposes.
|
|
60
60
|
*/
|
|
61
61
|
export interface Item {
|
|
62
|
+
/**
|
|
63
|
+
* The Orb-assigned unique identifier for the item.
|
|
64
|
+
*/
|
|
62
65
|
id: string;
|
|
63
66
|
|
|
67
|
+
/**
|
|
68
|
+
* The time at which the item was created.
|
|
69
|
+
*/
|
|
64
70
|
created_at: string;
|
|
65
71
|
|
|
72
|
+
/**
|
|
73
|
+
* A list of external connections for this item, used to sync with external
|
|
74
|
+
* invoicing and tax systems.
|
|
75
|
+
*/
|
|
66
76
|
external_connections: Array<Item.ExternalConnection>;
|
|
67
77
|
|
|
68
78
|
/**
|
|
@@ -73,11 +83,26 @@ export interface Item {
|
|
|
73
83
|
*/
|
|
74
84
|
metadata: { [key: string]: string };
|
|
75
85
|
|
|
86
|
+
/**
|
|
87
|
+
* The name of the item.
|
|
88
|
+
*/
|
|
76
89
|
name: string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The time at which the item was archived. If null, the item is not archived.
|
|
93
|
+
*/
|
|
94
|
+
archived_at?: string | null;
|
|
77
95
|
}
|
|
78
96
|
|
|
79
97
|
export namespace Item {
|
|
98
|
+
/**
|
|
99
|
+
* Represents a connection between an Item and an external system for invoicing or
|
|
100
|
+
* tax calculation purposes.
|
|
101
|
+
*/
|
|
80
102
|
export interface ExternalConnection {
|
|
103
|
+
/**
|
|
104
|
+
* The name of the external system this item is connected to.
|
|
105
|
+
*/
|
|
81
106
|
external_connection_name:
|
|
82
107
|
| 'stripe'
|
|
83
108
|
| 'quickbooks'
|
|
@@ -88,6 +113,9 @@ export namespace Item {
|
|
|
88
113
|
| 'anrok'
|
|
89
114
|
| 'numeral';
|
|
90
115
|
|
|
116
|
+
/**
|
|
117
|
+
* The identifier of this item in the external system.
|
|
118
|
+
*/
|
|
91
119
|
external_entity_id: string;
|
|
92
120
|
}
|
|
93
121
|
}
|
|
@@ -120,7 +148,14 @@ export interface ItemUpdateParams {
|
|
|
120
148
|
}
|
|
121
149
|
|
|
122
150
|
export namespace ItemUpdateParams {
|
|
151
|
+
/**
|
|
152
|
+
* Represents a connection between an Item and an external system for invoicing or
|
|
153
|
+
* tax calculation purposes.
|
|
154
|
+
*/
|
|
123
155
|
export interface ExternalConnection {
|
|
156
|
+
/**
|
|
157
|
+
* The name of the external system this item is connected to.
|
|
158
|
+
*/
|
|
124
159
|
external_connection_name:
|
|
125
160
|
| 'stripe'
|
|
126
161
|
| 'quickbooks'
|
|
@@ -131,6 +166,9 @@ export namespace ItemUpdateParams {
|
|
|
131
166
|
| 'anrok'
|
|
132
167
|
| 'numeral';
|
|
133
168
|
|
|
169
|
+
/**
|
|
170
|
+
* The identifier of this item in the external system.
|
|
171
|
+
*/
|
|
134
172
|
external_entity_id: string;
|
|
135
173
|
}
|
|
136
174
|
}
|