orb-billing 1.37.4 → 1.38.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 +13 -0
- package/core.d.ts +5 -0
- package/core.d.ts.map +1 -1
- package/core.js +10 -1
- package/core.js.map +1 -1
- package/core.mjs +8 -0
- package/core.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/customers/costs.d.ts +548 -12
- 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 +13 -0
- package/resources/customers/credits/credits.d.ts.map +1 -1
- package/resources/customers/credits/credits.js +5 -0
- package/resources/customers/credits/credits.js.map +1 -1
- package/resources/customers/credits/credits.mjs +5 -0
- package/resources/customers/credits/credits.mjs.map +1 -1
- package/resources/customers/credits/index.d.ts +1 -0
- package/resources/customers/credits/index.d.ts.map +1 -1
- package/resources/customers/credits/index.js +5 -1
- package/resources/customers/credits/index.js.map +1 -1
- package/resources/customers/credits/index.mjs +1 -0
- package/resources/customers/credits/index.mjs.map +1 -1
- package/resources/customers/credits/top-ups.d.ts +399 -0
- package/resources/customers/credits/top-ups.d.ts.map +1 -0
- package/resources/customers/credits/top-ups.js +102 -0
- package/resources/customers/credits/top-ups.js.map +1 -0
- package/resources/customers/credits/top-ups.mjs +73 -0
- package/resources/customers/credits/top-ups.mjs.map +1 -0
- package/resources/subscriptions.d.ts +273 -5
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs.map +1 -1
- package/src/core.ts +11 -0
- package/src/resources/customers/costs.ts +586 -32
- package/src/resources/customers/credits/credits.ts +13 -0
- package/src/resources/customers/credits/index.ts +13 -0
- package/src/resources/customers/credits/top-ups.ts +542 -0
- package/src/resources/subscriptions.ts +283 -6
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -285,7 +285,7 @@ export interface CostListResponse {
|
|
|
285
285
|
}
|
|
286
286
|
export declare namespace CostListResponse {
|
|
287
287
|
interface Data {
|
|
288
|
-
per_price_costs: Array<Data.PerPriceCost>;
|
|
288
|
+
per_price_costs: Array<Data.PerPriceCost | Data.PerPriceCostV2>;
|
|
289
289
|
/**
|
|
290
290
|
* Total costs for the timeframe, excluding any minimums and discounts.
|
|
291
291
|
*/
|
|
@@ -570,6 +570,278 @@ export declare namespace CostListResponse {
|
|
|
570
570
|
total: string;
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
+
interface PerPriceCostV2 {
|
|
574
|
+
/**
|
|
575
|
+
* The Price resource represents a price that can be billed on a subscription,
|
|
576
|
+
* resulting in a charge on an invoice in the form of an invoice line item. Prices
|
|
577
|
+
* take a quantity and determine an amount to bill.
|
|
578
|
+
*
|
|
579
|
+
* Orb supports a few different pricing models out of the box. Each of these models
|
|
580
|
+
* is serialized differently in a given Price object. The model_type field
|
|
581
|
+
* determines the key for the configuration object that is present.
|
|
582
|
+
*
|
|
583
|
+
* ## Unit pricing
|
|
584
|
+
*
|
|
585
|
+
* With unit pricing, each unit costs a fixed amount.
|
|
586
|
+
*
|
|
587
|
+
* ```json
|
|
588
|
+
* {
|
|
589
|
+
* ...
|
|
590
|
+
* "model_type": "unit",
|
|
591
|
+
* "unit_config": {
|
|
592
|
+
* "unit_amount": "0.50"
|
|
593
|
+
* }
|
|
594
|
+
* ...
|
|
595
|
+
* }
|
|
596
|
+
* ```
|
|
597
|
+
*
|
|
598
|
+
* ## Tiered pricing
|
|
599
|
+
*
|
|
600
|
+
* In tiered pricing, the cost of a given unit depends on the tier range that it
|
|
601
|
+
* falls into, where each tier range is defined by an upper and lower bound. For
|
|
602
|
+
* example, the first ten units may cost $0.50 each and all units thereafter may
|
|
603
|
+
* cost $0.10 each.
|
|
604
|
+
*
|
|
605
|
+
* ```json
|
|
606
|
+
* {
|
|
607
|
+
* ...
|
|
608
|
+
* "model_type": "tiered",
|
|
609
|
+
* "tiered_config": {
|
|
610
|
+
* "tiers": [
|
|
611
|
+
* {
|
|
612
|
+
* "first_unit": 1,
|
|
613
|
+
* "last_unit": 10,
|
|
614
|
+
* "unit_amount": "0.50"
|
|
615
|
+
* },
|
|
616
|
+
* {
|
|
617
|
+
* "first_unit": 11,
|
|
618
|
+
* "last_unit": null,
|
|
619
|
+
* "unit_amount": "0.10"
|
|
620
|
+
* }
|
|
621
|
+
* ]
|
|
622
|
+
* }
|
|
623
|
+
* ...
|
|
624
|
+
* ```
|
|
625
|
+
*
|
|
626
|
+
* ## Bulk pricing
|
|
627
|
+
*
|
|
628
|
+
* Bulk pricing applies when the number of units determine the cost of all units.
|
|
629
|
+
* For example, if you've bought less than 10 units, they may each be $0.50 for a
|
|
630
|
+
* total of $5.00. Once you've bought more than 10 units, all units may now be
|
|
631
|
+
* priced at $0.40 (i.e. 101 units total would be $40.40).
|
|
632
|
+
*
|
|
633
|
+
* ```json
|
|
634
|
+
* {
|
|
635
|
+
* ...
|
|
636
|
+
* "model_type": "bulk",
|
|
637
|
+
* "bulk_config": {
|
|
638
|
+
* "tiers": [
|
|
639
|
+
* {
|
|
640
|
+
* "maximum_units": 10,
|
|
641
|
+
* "unit_amount": "0.50"
|
|
642
|
+
* },
|
|
643
|
+
* {
|
|
644
|
+
* "maximum_units": 1000,
|
|
645
|
+
* "unit_amount": "0.40"
|
|
646
|
+
* }
|
|
647
|
+
* ]
|
|
648
|
+
* }
|
|
649
|
+
* ...
|
|
650
|
+
* }
|
|
651
|
+
* ```
|
|
652
|
+
*
|
|
653
|
+
* ## Package pricing
|
|
654
|
+
*
|
|
655
|
+
* Package pricing defines the size or granularity of a unit for billing purposes.
|
|
656
|
+
* For example, if the package size is set to 5, then 4 units will be billed as 5
|
|
657
|
+
* and 6 units will be billed at 10.
|
|
658
|
+
*
|
|
659
|
+
* ```json
|
|
660
|
+
* {
|
|
661
|
+
* ...
|
|
662
|
+
* "model_type": "package",
|
|
663
|
+
* "package_config": {
|
|
664
|
+
* "package_amount": "0.80",
|
|
665
|
+
* "package_size": 10
|
|
666
|
+
* }
|
|
667
|
+
* ...
|
|
668
|
+
* }
|
|
669
|
+
* ```
|
|
670
|
+
*
|
|
671
|
+
* ## BPS pricing
|
|
672
|
+
*
|
|
673
|
+
* BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a
|
|
674
|
+
* percent (the number of basis points to charge), as well as a cap per event to
|
|
675
|
+
* assess. For example, this would allow you to assess a fee of 0.25% on every
|
|
676
|
+
* payment you process, with a maximum charge of $25 per payment.
|
|
677
|
+
*
|
|
678
|
+
* ```json
|
|
679
|
+
* {
|
|
680
|
+
* ...
|
|
681
|
+
* "model_type": "bps",
|
|
682
|
+
* "bps_config": {
|
|
683
|
+
* "bps": 125,
|
|
684
|
+
* "per_unit_maximum": "11.00"
|
|
685
|
+
* }
|
|
686
|
+
* ...
|
|
687
|
+
* }
|
|
688
|
+
* ```
|
|
689
|
+
*
|
|
690
|
+
* ## Bulk BPS pricing
|
|
691
|
+
*
|
|
692
|
+
* Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the
|
|
693
|
+
* total quantity across all events. Similar to bulk pricing, the BPS parameters of
|
|
694
|
+
* a given event depends on the tier range that the billing period falls into. Each
|
|
695
|
+
* tier range is defined by an upper bound. For example, after $1.5M of payment
|
|
696
|
+
* volume is reached, each individual payment may have a lower cap or a smaller
|
|
697
|
+
* take-rate.
|
|
698
|
+
*
|
|
699
|
+
* ```json
|
|
700
|
+
* ...
|
|
701
|
+
* "model_type": "bulk_bps",
|
|
702
|
+
* "bulk_bps_config": {
|
|
703
|
+
* "tiers": [
|
|
704
|
+
* {
|
|
705
|
+
* "maximum_amount": "1000000.00",
|
|
706
|
+
* "bps": 125,
|
|
707
|
+
* "per_unit_maximum": "19.00"
|
|
708
|
+
* },
|
|
709
|
+
* {
|
|
710
|
+
* "maximum_amount": null,
|
|
711
|
+
* "bps": 115,
|
|
712
|
+
* "per_unit_maximum": "4.00"
|
|
713
|
+
* }
|
|
714
|
+
* ]
|
|
715
|
+
* }
|
|
716
|
+
* ...
|
|
717
|
+
* }
|
|
718
|
+
* ```
|
|
719
|
+
*
|
|
720
|
+
* ## Tiered BPS pricing
|
|
721
|
+
*
|
|
722
|
+
* Tiered BPS pricing specifies BPS parameters in a graduated manner, where an
|
|
723
|
+
* event's applicable parameter is a function of its marginal addition to the
|
|
724
|
+
* period total. Similar to tiered pricing, the BPS parameters of a given event
|
|
725
|
+
* depends on the tier range that it falls into, where each tier range is defined
|
|
726
|
+
* by an upper and lower bound. For example, the first few payments may have a 0.8
|
|
727
|
+
* BPS take-rate and all payments after a specific volume may incur a take-rate of
|
|
728
|
+
* 0.5 BPS each.
|
|
729
|
+
*
|
|
730
|
+
* ```json
|
|
731
|
+
* ...
|
|
732
|
+
* "model_type": "tiered_bps",
|
|
733
|
+
* "tiered_bps_config": {
|
|
734
|
+
* "tiers": [
|
|
735
|
+
* {
|
|
736
|
+
* "minimum_amount": "0",
|
|
737
|
+
* "maximum_amount": "1000000.00",
|
|
738
|
+
* "bps": 125,
|
|
739
|
+
* "per_unit_maximum": "19.00"
|
|
740
|
+
* },
|
|
741
|
+
* {
|
|
742
|
+
* "minimum_amount": "1000000.00",
|
|
743
|
+
* "maximum_amount": null,
|
|
744
|
+
* "bps": 115,
|
|
745
|
+
* "per_unit_maximum": "4.00"
|
|
746
|
+
* }
|
|
747
|
+
* ]
|
|
748
|
+
* }
|
|
749
|
+
* ...
|
|
750
|
+
* }
|
|
751
|
+
* ```
|
|
752
|
+
*
|
|
753
|
+
* ## Matrix pricing
|
|
754
|
+
*
|
|
755
|
+
* Matrix pricing defines a set of unit prices in a one or two-dimensional matrix.
|
|
756
|
+
* `dimensions` defines the two event property values evaluated in this pricing
|
|
757
|
+
* model. In a one-dimensional matrix, the second value is `null`. Every
|
|
758
|
+
* configuration has a list of `matrix_values` which give the unit prices for
|
|
759
|
+
* specified property values. In a one-dimensional matrix, the matrix values will
|
|
760
|
+
* have `dimension_values` where the second value of the pair is null. If an event
|
|
761
|
+
* does not match any of the dimension values in the matrix, it will resort to the
|
|
762
|
+
* `default_unit_amount`.
|
|
763
|
+
*
|
|
764
|
+
* ```json
|
|
765
|
+
* {
|
|
766
|
+
* "model_type": "matrix"
|
|
767
|
+
* "matrix_config": {
|
|
768
|
+
* "default_unit_amount": "3.00",
|
|
769
|
+
* "dimensions": [
|
|
770
|
+
* "cluster_name",
|
|
771
|
+
* "region"
|
|
772
|
+
* ],
|
|
773
|
+
* "matrix_values": [
|
|
774
|
+
* {
|
|
775
|
+
* "dimension_values": [
|
|
776
|
+
* "alpha",
|
|
777
|
+
* "west"
|
|
778
|
+
* ],
|
|
779
|
+
* "unit_amount": "2.00"
|
|
780
|
+
* },
|
|
781
|
+
* ...
|
|
782
|
+
* ]
|
|
783
|
+
* }
|
|
784
|
+
* }
|
|
785
|
+
* ```
|
|
786
|
+
*
|
|
787
|
+
* ### Fixed fees
|
|
788
|
+
*
|
|
789
|
+
* Fixed fees are prices that are applied independent of usage quantities, and
|
|
790
|
+
* follow unit pricing. They also have an additional parameter
|
|
791
|
+
* `fixed_price_quantity`. If the Price represents a fixed cost, this represents
|
|
792
|
+
* the quantity of units applied.
|
|
793
|
+
*
|
|
794
|
+
* ```json
|
|
795
|
+
* {
|
|
796
|
+
* ...
|
|
797
|
+
* "id": "price_id",
|
|
798
|
+
* "model_type": "unit",
|
|
799
|
+
* "unit_config": {
|
|
800
|
+
* "unit_amount": "2.00"
|
|
801
|
+
* },
|
|
802
|
+
* "fixed_price_quantity": 3.0
|
|
803
|
+
* ...
|
|
804
|
+
* }
|
|
805
|
+
* ```
|
|
806
|
+
*/
|
|
807
|
+
price: PricesAPI.Price;
|
|
808
|
+
/**
|
|
809
|
+
* Price's contributions for the timeframe, excluding any minimums and discounts.
|
|
810
|
+
*/
|
|
811
|
+
subtotal: string;
|
|
812
|
+
/**
|
|
813
|
+
* Price's contributions for the timeframe, including minimums and discounts.
|
|
814
|
+
*/
|
|
815
|
+
total: string;
|
|
816
|
+
/**
|
|
817
|
+
* If a `group_by` attribute is passed in, array of costs per `grouping_key`,
|
|
818
|
+
* `grouping_value` or `secondary_grouping_key`, `secondary_grouping_value`.
|
|
819
|
+
*/
|
|
820
|
+
price_groups?: Array<PerPriceCostV2.PriceGroup> | null;
|
|
821
|
+
/**
|
|
822
|
+
* The price's quantity for the timeframe
|
|
823
|
+
*/
|
|
824
|
+
quantity?: number | null;
|
|
825
|
+
}
|
|
826
|
+
namespace PerPriceCostV2 {
|
|
827
|
+
interface PriceGroup {
|
|
828
|
+
/**
|
|
829
|
+
* Grouping key to break down a single price's costs
|
|
830
|
+
*/
|
|
831
|
+
grouping_key: string;
|
|
832
|
+
grouping_value: string | null;
|
|
833
|
+
/**
|
|
834
|
+
* If the price is a matrix price, this is the second dimension key
|
|
835
|
+
*/
|
|
836
|
+
secondary_grouping_key: string | null;
|
|
837
|
+
secondary_grouping_value: string | null;
|
|
838
|
+
/**
|
|
839
|
+
* Total costs for this group for the timeframe. Note that this does not account
|
|
840
|
+
* for any minimums or discounts.
|
|
841
|
+
*/
|
|
842
|
+
total: string;
|
|
843
|
+
}
|
|
844
|
+
}
|
|
573
845
|
}
|
|
574
846
|
}
|
|
575
847
|
export interface CostListByExternalIDResponse {
|
|
@@ -577,7 +849,7 @@ export interface CostListByExternalIDResponse {
|
|
|
577
849
|
}
|
|
578
850
|
export declare namespace CostListByExternalIDResponse {
|
|
579
851
|
interface Data {
|
|
580
|
-
per_price_costs: Array<Data.PerPriceCost>;
|
|
852
|
+
per_price_costs: Array<Data.PerPriceCost | Data.PerPriceCostV2>;
|
|
581
853
|
/**
|
|
582
854
|
* Total costs for the timeframe, excluding any minimums and discounts.
|
|
583
855
|
*/
|
|
@@ -837,13 +1109,285 @@ export declare namespace CostListByExternalIDResponse {
|
|
|
837
1109
|
* If a `group_by` attribute is passed in, array of costs per `grouping_key`,
|
|
838
1110
|
* `grouping_value` or `secondary_grouping_key`, `secondary_grouping_value`.
|
|
839
1111
|
*/
|
|
840
|
-
price_groups?: Array<PerPriceCost.PriceGroup> | null;
|
|
1112
|
+
price_groups?: Array<PerPriceCost.PriceGroup> | null;
|
|
1113
|
+
/**
|
|
1114
|
+
* The price's quantity for the timeframe
|
|
1115
|
+
*/
|
|
1116
|
+
quantity?: number | null;
|
|
1117
|
+
}
|
|
1118
|
+
namespace PerPriceCost {
|
|
1119
|
+
interface PriceGroup {
|
|
1120
|
+
/**
|
|
1121
|
+
* Grouping key to break down a single price's costs
|
|
1122
|
+
*/
|
|
1123
|
+
grouping_key: string;
|
|
1124
|
+
grouping_value: string | null;
|
|
1125
|
+
/**
|
|
1126
|
+
* If the price is a matrix price, this is the second dimension key
|
|
1127
|
+
*/
|
|
1128
|
+
secondary_grouping_key: string | null;
|
|
1129
|
+
secondary_grouping_value: string | null;
|
|
1130
|
+
/**
|
|
1131
|
+
* Total costs for this group for the timeframe. Note that this does not account
|
|
1132
|
+
* for any minimums or discounts.
|
|
1133
|
+
*/
|
|
1134
|
+
total: string;
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
interface PerPriceCostV2 {
|
|
1138
|
+
/**
|
|
1139
|
+
* The Price resource represents a price that can be billed on a subscription,
|
|
1140
|
+
* resulting in a charge on an invoice in the form of an invoice line item. Prices
|
|
1141
|
+
* take a quantity and determine an amount to bill.
|
|
1142
|
+
*
|
|
1143
|
+
* Orb supports a few different pricing models out of the box. Each of these models
|
|
1144
|
+
* is serialized differently in a given Price object. The model_type field
|
|
1145
|
+
* determines the key for the configuration object that is present.
|
|
1146
|
+
*
|
|
1147
|
+
* ## Unit pricing
|
|
1148
|
+
*
|
|
1149
|
+
* With unit pricing, each unit costs a fixed amount.
|
|
1150
|
+
*
|
|
1151
|
+
* ```json
|
|
1152
|
+
* {
|
|
1153
|
+
* ...
|
|
1154
|
+
* "model_type": "unit",
|
|
1155
|
+
* "unit_config": {
|
|
1156
|
+
* "unit_amount": "0.50"
|
|
1157
|
+
* }
|
|
1158
|
+
* ...
|
|
1159
|
+
* }
|
|
1160
|
+
* ```
|
|
1161
|
+
*
|
|
1162
|
+
* ## Tiered pricing
|
|
1163
|
+
*
|
|
1164
|
+
* In tiered pricing, the cost of a given unit depends on the tier range that it
|
|
1165
|
+
* falls into, where each tier range is defined by an upper and lower bound. For
|
|
1166
|
+
* example, the first ten units may cost $0.50 each and all units thereafter may
|
|
1167
|
+
* cost $0.10 each.
|
|
1168
|
+
*
|
|
1169
|
+
* ```json
|
|
1170
|
+
* {
|
|
1171
|
+
* ...
|
|
1172
|
+
* "model_type": "tiered",
|
|
1173
|
+
* "tiered_config": {
|
|
1174
|
+
* "tiers": [
|
|
1175
|
+
* {
|
|
1176
|
+
* "first_unit": 1,
|
|
1177
|
+
* "last_unit": 10,
|
|
1178
|
+
* "unit_amount": "0.50"
|
|
1179
|
+
* },
|
|
1180
|
+
* {
|
|
1181
|
+
* "first_unit": 11,
|
|
1182
|
+
* "last_unit": null,
|
|
1183
|
+
* "unit_amount": "0.10"
|
|
1184
|
+
* }
|
|
1185
|
+
* ]
|
|
1186
|
+
* }
|
|
1187
|
+
* ...
|
|
1188
|
+
* ```
|
|
1189
|
+
*
|
|
1190
|
+
* ## Bulk pricing
|
|
1191
|
+
*
|
|
1192
|
+
* Bulk pricing applies when the number of units determine the cost of all units.
|
|
1193
|
+
* For example, if you've bought less than 10 units, they may each be $0.50 for a
|
|
1194
|
+
* total of $5.00. Once you've bought more than 10 units, all units may now be
|
|
1195
|
+
* priced at $0.40 (i.e. 101 units total would be $40.40).
|
|
1196
|
+
*
|
|
1197
|
+
* ```json
|
|
1198
|
+
* {
|
|
1199
|
+
* ...
|
|
1200
|
+
* "model_type": "bulk",
|
|
1201
|
+
* "bulk_config": {
|
|
1202
|
+
* "tiers": [
|
|
1203
|
+
* {
|
|
1204
|
+
* "maximum_units": 10,
|
|
1205
|
+
* "unit_amount": "0.50"
|
|
1206
|
+
* },
|
|
1207
|
+
* {
|
|
1208
|
+
* "maximum_units": 1000,
|
|
1209
|
+
* "unit_amount": "0.40"
|
|
1210
|
+
* }
|
|
1211
|
+
* ]
|
|
1212
|
+
* }
|
|
1213
|
+
* ...
|
|
1214
|
+
* }
|
|
1215
|
+
* ```
|
|
1216
|
+
*
|
|
1217
|
+
* ## Package pricing
|
|
1218
|
+
*
|
|
1219
|
+
* Package pricing defines the size or granularity of a unit for billing purposes.
|
|
1220
|
+
* For example, if the package size is set to 5, then 4 units will be billed as 5
|
|
1221
|
+
* and 6 units will be billed at 10.
|
|
1222
|
+
*
|
|
1223
|
+
* ```json
|
|
1224
|
+
* {
|
|
1225
|
+
* ...
|
|
1226
|
+
* "model_type": "package",
|
|
1227
|
+
* "package_config": {
|
|
1228
|
+
* "package_amount": "0.80",
|
|
1229
|
+
* "package_size": 10
|
|
1230
|
+
* }
|
|
1231
|
+
* ...
|
|
1232
|
+
* }
|
|
1233
|
+
* ```
|
|
1234
|
+
*
|
|
1235
|
+
* ## BPS pricing
|
|
1236
|
+
*
|
|
1237
|
+
* BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a
|
|
1238
|
+
* percent (the number of basis points to charge), as well as a cap per event to
|
|
1239
|
+
* assess. For example, this would allow you to assess a fee of 0.25% on every
|
|
1240
|
+
* payment you process, with a maximum charge of $25 per payment.
|
|
1241
|
+
*
|
|
1242
|
+
* ```json
|
|
1243
|
+
* {
|
|
1244
|
+
* ...
|
|
1245
|
+
* "model_type": "bps",
|
|
1246
|
+
* "bps_config": {
|
|
1247
|
+
* "bps": 125,
|
|
1248
|
+
* "per_unit_maximum": "11.00"
|
|
1249
|
+
* }
|
|
1250
|
+
* ...
|
|
1251
|
+
* }
|
|
1252
|
+
* ```
|
|
1253
|
+
*
|
|
1254
|
+
* ## Bulk BPS pricing
|
|
1255
|
+
*
|
|
1256
|
+
* Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the
|
|
1257
|
+
* total quantity across all events. Similar to bulk pricing, the BPS parameters of
|
|
1258
|
+
* a given event depends on the tier range that the billing period falls into. Each
|
|
1259
|
+
* tier range is defined by an upper bound. For example, after $1.5M of payment
|
|
1260
|
+
* volume is reached, each individual payment may have a lower cap or a smaller
|
|
1261
|
+
* take-rate.
|
|
1262
|
+
*
|
|
1263
|
+
* ```json
|
|
1264
|
+
* ...
|
|
1265
|
+
* "model_type": "bulk_bps",
|
|
1266
|
+
* "bulk_bps_config": {
|
|
1267
|
+
* "tiers": [
|
|
1268
|
+
* {
|
|
1269
|
+
* "maximum_amount": "1000000.00",
|
|
1270
|
+
* "bps": 125,
|
|
1271
|
+
* "per_unit_maximum": "19.00"
|
|
1272
|
+
* },
|
|
1273
|
+
* {
|
|
1274
|
+
* "maximum_amount": null,
|
|
1275
|
+
* "bps": 115,
|
|
1276
|
+
* "per_unit_maximum": "4.00"
|
|
1277
|
+
* }
|
|
1278
|
+
* ]
|
|
1279
|
+
* }
|
|
1280
|
+
* ...
|
|
1281
|
+
* }
|
|
1282
|
+
* ```
|
|
1283
|
+
*
|
|
1284
|
+
* ## Tiered BPS pricing
|
|
1285
|
+
*
|
|
1286
|
+
* Tiered BPS pricing specifies BPS parameters in a graduated manner, where an
|
|
1287
|
+
* event's applicable parameter is a function of its marginal addition to the
|
|
1288
|
+
* period total. Similar to tiered pricing, the BPS parameters of a given event
|
|
1289
|
+
* depends on the tier range that it falls into, where each tier range is defined
|
|
1290
|
+
* by an upper and lower bound. For example, the first few payments may have a 0.8
|
|
1291
|
+
* BPS take-rate and all payments after a specific volume may incur a take-rate of
|
|
1292
|
+
* 0.5 BPS each.
|
|
1293
|
+
*
|
|
1294
|
+
* ```json
|
|
1295
|
+
* ...
|
|
1296
|
+
* "model_type": "tiered_bps",
|
|
1297
|
+
* "tiered_bps_config": {
|
|
1298
|
+
* "tiers": [
|
|
1299
|
+
* {
|
|
1300
|
+
* "minimum_amount": "0",
|
|
1301
|
+
* "maximum_amount": "1000000.00",
|
|
1302
|
+
* "bps": 125,
|
|
1303
|
+
* "per_unit_maximum": "19.00"
|
|
1304
|
+
* },
|
|
1305
|
+
* {
|
|
1306
|
+
* "minimum_amount": "1000000.00",
|
|
1307
|
+
* "maximum_amount": null,
|
|
1308
|
+
* "bps": 115,
|
|
1309
|
+
* "per_unit_maximum": "4.00"
|
|
1310
|
+
* }
|
|
1311
|
+
* ]
|
|
1312
|
+
* }
|
|
1313
|
+
* ...
|
|
1314
|
+
* }
|
|
1315
|
+
* ```
|
|
1316
|
+
*
|
|
1317
|
+
* ## Matrix pricing
|
|
1318
|
+
*
|
|
1319
|
+
* Matrix pricing defines a set of unit prices in a one or two-dimensional matrix.
|
|
1320
|
+
* `dimensions` defines the two event property values evaluated in this pricing
|
|
1321
|
+
* model. In a one-dimensional matrix, the second value is `null`. Every
|
|
1322
|
+
* configuration has a list of `matrix_values` which give the unit prices for
|
|
1323
|
+
* specified property values. In a one-dimensional matrix, the matrix values will
|
|
1324
|
+
* have `dimension_values` where the second value of the pair is null. If an event
|
|
1325
|
+
* does not match any of the dimension values in the matrix, it will resort to the
|
|
1326
|
+
* `default_unit_amount`.
|
|
1327
|
+
*
|
|
1328
|
+
* ```json
|
|
1329
|
+
* {
|
|
1330
|
+
* "model_type": "matrix"
|
|
1331
|
+
* "matrix_config": {
|
|
1332
|
+
* "default_unit_amount": "3.00",
|
|
1333
|
+
* "dimensions": [
|
|
1334
|
+
* "cluster_name",
|
|
1335
|
+
* "region"
|
|
1336
|
+
* ],
|
|
1337
|
+
* "matrix_values": [
|
|
1338
|
+
* {
|
|
1339
|
+
* "dimension_values": [
|
|
1340
|
+
* "alpha",
|
|
1341
|
+
* "west"
|
|
1342
|
+
* ],
|
|
1343
|
+
* "unit_amount": "2.00"
|
|
1344
|
+
* },
|
|
1345
|
+
* ...
|
|
1346
|
+
* ]
|
|
1347
|
+
* }
|
|
1348
|
+
* }
|
|
1349
|
+
* ```
|
|
1350
|
+
*
|
|
1351
|
+
* ### Fixed fees
|
|
1352
|
+
*
|
|
1353
|
+
* Fixed fees are prices that are applied independent of usage quantities, and
|
|
1354
|
+
* follow unit pricing. They also have an additional parameter
|
|
1355
|
+
* `fixed_price_quantity`. If the Price represents a fixed cost, this represents
|
|
1356
|
+
* the quantity of units applied.
|
|
1357
|
+
*
|
|
1358
|
+
* ```json
|
|
1359
|
+
* {
|
|
1360
|
+
* ...
|
|
1361
|
+
* "id": "price_id",
|
|
1362
|
+
* "model_type": "unit",
|
|
1363
|
+
* "unit_config": {
|
|
1364
|
+
* "unit_amount": "2.00"
|
|
1365
|
+
* },
|
|
1366
|
+
* "fixed_price_quantity": 3.0
|
|
1367
|
+
* ...
|
|
1368
|
+
* }
|
|
1369
|
+
* ```
|
|
1370
|
+
*/
|
|
1371
|
+
price: PricesAPI.Price;
|
|
1372
|
+
/**
|
|
1373
|
+
* Price's contributions for the timeframe, excluding any minimums and discounts.
|
|
1374
|
+
*/
|
|
1375
|
+
subtotal: string;
|
|
1376
|
+
/**
|
|
1377
|
+
* Price's contributions for the timeframe, including minimums and discounts.
|
|
1378
|
+
*/
|
|
1379
|
+
total: string;
|
|
1380
|
+
/**
|
|
1381
|
+
* If a `group_by` attribute is passed in, array of costs per `grouping_key`,
|
|
1382
|
+
* `grouping_value` or `secondary_grouping_key`, `secondary_grouping_value`.
|
|
1383
|
+
*/
|
|
1384
|
+
price_groups?: Array<PerPriceCostV2.PriceGroup> | null;
|
|
841
1385
|
/**
|
|
842
1386
|
* The price's quantity for the timeframe
|
|
843
1387
|
*/
|
|
844
1388
|
quantity?: number | null;
|
|
845
1389
|
}
|
|
846
|
-
namespace
|
|
1390
|
+
namespace PerPriceCostV2 {
|
|
847
1391
|
interface PriceGroup {
|
|
848
1392
|
/**
|
|
849
1393
|
* Grouping key to break down a single price's costs
|
|
@@ -865,10 +1409,6 @@ export declare namespace CostListByExternalIDResponse {
|
|
|
865
1409
|
}
|
|
866
1410
|
}
|
|
867
1411
|
export interface CostListParams {
|
|
868
|
-
/**
|
|
869
|
-
* Groups per-price costs by the key provided.
|
|
870
|
-
*/
|
|
871
|
-
group_by?: string | null;
|
|
872
1412
|
/**
|
|
873
1413
|
* Costs returned are exclusive of `timeframe_end`.
|
|
874
1414
|
*/
|
|
@@ -886,10 +1426,6 @@ export interface CostListParams {
|
|
|
886
1426
|
view_mode?: 'periodic' | 'cumulative' | null;
|
|
887
1427
|
}
|
|
888
1428
|
export interface CostListByExternalIDParams {
|
|
889
|
-
/**
|
|
890
|
-
* Groups per-price costs by the key provided.
|
|
891
|
-
*/
|
|
892
|
-
group_by?: string | null;
|
|
893
1429
|
/**
|
|
894
1430
|
* Costs returned are exclusive of `timeframe_end`.
|
|
895
1431
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"costs.d.ts","sourceRoot":"","sources":["../../src/resources/customers/costs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,QAAQ,MAAM,uCAAuC,CAAC;AAClE,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AAEjE,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuIG;IACH,IAAI,CACF,UAAU,EAAE,MAAM,GAAG,IAAI,EACzB,KAAK,CAAC,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC;IACpC,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC;IAYjG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AK,CAAC,CAAC;SAC7D;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mCAAmC,kBAAkB,QAAQ,EAAE;YACrF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAxTD,sBAwTC;AAssCD,WAAiB,KAAK;AAKtB,CAAC,EALgB,KAAK,GAAL,aAAK,KAAL,aAAK,QAKrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"costs.mjs","sourceRoot":"","sources":["../../src/resources/customers/costs.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,sBAAsB;OAC3C,EAAE,gBAAgB,EAAE,MAAM,kBAAkB;AAInD,MAAM,OAAO,KAAM,SAAQ,WAAW;IA+IpC,IAAI,CACF,UAAyB,EACzB,QAA8C,EAAE,EAChD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACzC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,UAAU,QAAQ,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IAmJD,gBAAgB,CACd,kBAAiC,EACjC,QAA0D,EAAE,EAC5D,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7D;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mCAAmC,kBAAkB,QAAQ,EAAE;YACrF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"costs.mjs","sourceRoot":"","sources":["../../src/resources/customers/costs.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,sBAAsB;OAC3C,EAAE,gBAAgB,EAAE,MAAM,kBAAkB;AAInD,MAAM,OAAO,KAAM,SAAQ,WAAW;IA+IpC,IAAI,CACF,UAAyB,EACzB,QAA8C,EAAE,EAChD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACzC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,UAAU,QAAQ,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IAmJD,gBAAgB,CACd,kBAAiC,EACjC,QAA0D,EAAE,EAC5D,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7D;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mCAAmC,kBAAkB,QAAQ,EAAE;YACrF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAssCD,WAAiB,KAAK;AAKtB,CAAC,EALgB,KAAK,KAAL,KAAK,QAKrB"}
|
|
@@ -2,9 +2,11 @@ import * as Core from 'orb-billing/core';
|
|
|
2
2
|
import { APIResource } from 'orb-billing/resource';
|
|
3
3
|
import * as CreditsAPI from 'orb-billing/resources/customers/credits/credits';
|
|
4
4
|
import * as LedgerAPI from 'orb-billing/resources/customers/credits/ledger';
|
|
5
|
+
import * as TopUpsAPI from 'orb-billing/resources/customers/credits/top-ups';
|
|
5
6
|
import { Page, type PageParams } from 'orb-billing/pagination';
|
|
6
7
|
export declare class Credits extends APIResource {
|
|
7
8
|
ledger: LedgerAPI.Ledger;
|
|
9
|
+
topUps: TopUpsAPI.TopUps;
|
|
8
10
|
/**
|
|
9
11
|
* Returns a paginated list of unexpired, non-zero credit blocks for a customer.
|
|
10
12
|
*/
|
|
@@ -62,5 +64,16 @@ export declare namespace Credits {
|
|
|
62
64
|
export import LedgerCreateEntryParams = LedgerAPI.LedgerCreateEntryParams;
|
|
63
65
|
export import LedgerCreateEntryByExternalIDParams = LedgerAPI.LedgerCreateEntryByExternalIDParams;
|
|
64
66
|
export import LedgerListByExternalIDParams = LedgerAPI.LedgerListByExternalIDParams;
|
|
67
|
+
export import TopUps = TopUpsAPI.TopUps;
|
|
68
|
+
export import TopUpCreateResponse = TopUpsAPI.TopUpCreateResponse;
|
|
69
|
+
export import TopUpListResponse = TopUpsAPI.TopUpListResponse;
|
|
70
|
+
export import TopUpCreateByExternalIDResponse = TopUpsAPI.TopUpCreateByExternalIDResponse;
|
|
71
|
+
export import TopUpListByExternalIDResponse = TopUpsAPI.TopUpListByExternalIDResponse;
|
|
72
|
+
export import TopUpListResponsesPage = TopUpsAPI.TopUpListResponsesPage;
|
|
73
|
+
export import TopUpListByExternalIDResponsesPage = TopUpsAPI.TopUpListByExternalIDResponsesPage;
|
|
74
|
+
export import TopUpCreateParams = TopUpsAPI.TopUpCreateParams;
|
|
75
|
+
export import TopUpListParams = TopUpsAPI.TopUpListParams;
|
|
76
|
+
export import TopUpCreateByExternalIDParams = TopUpsAPI.TopUpCreateByExternalIDParams;
|
|
77
|
+
export import TopUpListByExternalIDParams = TopUpsAPI.TopUpListByExternalIDParams;
|
|
65
78
|
}
|
|
66
79
|
//# sourceMappingURL=credits.d.ts.map
|