orb-billing 1.39.0 → 1.41.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 +21 -0
- package/package.json +1 -1
- package/resources/customers/costs.d.ts +2 -594
- 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/plans/plans.d.ts +1 -0
- 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/subscriptions.d.ts +1 -297
- 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/customers/costs.ts +23 -647
- package/src/resources/plans/plans.ts +2 -0
- package/src/resources/subscriptions.ts +1 -313
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1734,7 +1734,7 @@ export interface SubscriptionFetchCostsResponse {
|
|
|
1734
1734
|
|
|
1735
1735
|
export namespace SubscriptionFetchCostsResponse {
|
|
1736
1736
|
export interface Data {
|
|
1737
|
-
per_price_costs: Array<Data.PerPriceCost
|
|
1737
|
+
per_price_costs: Array<Data.PerPriceCost>;
|
|
1738
1738
|
|
|
1739
1739
|
/**
|
|
1740
1740
|
* Total costs for the timeframe, excluding any minimums and discounts.
|
|
@@ -1998,323 +1998,11 @@ export namespace SubscriptionFetchCostsResponse {
|
|
|
1998
1998
|
*/
|
|
1999
1999
|
total: string;
|
|
2000
2000
|
|
|
2001
|
-
/**
|
|
2002
|
-
* If a `group_by` attribute is passed in, array of costs per `grouping_key`,
|
|
2003
|
-
* `grouping_value` or `secondary_grouping_key`, `secondary_grouping_value`.
|
|
2004
|
-
*/
|
|
2005
|
-
price_groups?: Array<PerPriceCost.PriceGroup> | null;
|
|
2006
|
-
|
|
2007
2001
|
/**
|
|
2008
2002
|
* The price's quantity for the timeframe
|
|
2009
2003
|
*/
|
|
2010
2004
|
quantity?: number | null;
|
|
2011
2005
|
}
|
|
2012
|
-
|
|
2013
|
-
export namespace PerPriceCost {
|
|
2014
|
-
export interface PriceGroup {
|
|
2015
|
-
/**
|
|
2016
|
-
* Grouping key to break down a single price's costs
|
|
2017
|
-
*/
|
|
2018
|
-
grouping_key: string;
|
|
2019
|
-
|
|
2020
|
-
grouping_value: string | null;
|
|
2021
|
-
|
|
2022
|
-
/**
|
|
2023
|
-
* If the price is a matrix price, this is the second dimension key
|
|
2024
|
-
*/
|
|
2025
|
-
secondary_grouping_key: string | null;
|
|
2026
|
-
|
|
2027
|
-
secondary_grouping_value: string | null;
|
|
2028
|
-
|
|
2029
|
-
/**
|
|
2030
|
-
* Total costs for this group for the timeframe. Note that this does not account
|
|
2031
|
-
* for any minimums or discounts.
|
|
2032
|
-
*/
|
|
2033
|
-
total: string;
|
|
2034
|
-
}
|
|
2035
|
-
}
|
|
2036
|
-
|
|
2037
|
-
export interface PerPriceCostV2 {
|
|
2038
|
-
/**
|
|
2039
|
-
* The Price resource represents a price that can be billed on a subscription,
|
|
2040
|
-
* resulting in a charge on an invoice in the form of an invoice line item. Prices
|
|
2041
|
-
* take a quantity and determine an amount to bill.
|
|
2042
|
-
*
|
|
2043
|
-
* Orb supports a few different pricing models out of the box. Each of these models
|
|
2044
|
-
* is serialized differently in a given Price object. The model_type field
|
|
2045
|
-
* determines the key for the configuration object that is present.
|
|
2046
|
-
*
|
|
2047
|
-
* ## Unit pricing
|
|
2048
|
-
*
|
|
2049
|
-
* With unit pricing, each unit costs a fixed amount.
|
|
2050
|
-
*
|
|
2051
|
-
* ```json
|
|
2052
|
-
* {
|
|
2053
|
-
* ...
|
|
2054
|
-
* "model_type": "unit",
|
|
2055
|
-
* "unit_config": {
|
|
2056
|
-
* "unit_amount": "0.50"
|
|
2057
|
-
* }
|
|
2058
|
-
* ...
|
|
2059
|
-
* }
|
|
2060
|
-
* ```
|
|
2061
|
-
*
|
|
2062
|
-
* ## Tiered pricing
|
|
2063
|
-
*
|
|
2064
|
-
* In tiered pricing, the cost of a given unit depends on the tier range that it
|
|
2065
|
-
* falls into, where each tier range is defined by an upper and lower bound. For
|
|
2066
|
-
* example, the first ten units may cost $0.50 each and all units thereafter may
|
|
2067
|
-
* cost $0.10 each.
|
|
2068
|
-
*
|
|
2069
|
-
* ```json
|
|
2070
|
-
* {
|
|
2071
|
-
* ...
|
|
2072
|
-
* "model_type": "tiered",
|
|
2073
|
-
* "tiered_config": {
|
|
2074
|
-
* "tiers": [
|
|
2075
|
-
* {
|
|
2076
|
-
* "first_unit": 1,
|
|
2077
|
-
* "last_unit": 10,
|
|
2078
|
-
* "unit_amount": "0.50"
|
|
2079
|
-
* },
|
|
2080
|
-
* {
|
|
2081
|
-
* "first_unit": 11,
|
|
2082
|
-
* "last_unit": null,
|
|
2083
|
-
* "unit_amount": "0.10"
|
|
2084
|
-
* }
|
|
2085
|
-
* ]
|
|
2086
|
-
* }
|
|
2087
|
-
* ...
|
|
2088
|
-
* ```
|
|
2089
|
-
*
|
|
2090
|
-
* ## Bulk pricing
|
|
2091
|
-
*
|
|
2092
|
-
* Bulk pricing applies when the number of units determine the cost of all units.
|
|
2093
|
-
* For example, if you've bought less than 10 units, they may each be $0.50 for a
|
|
2094
|
-
* total of $5.00. Once you've bought more than 10 units, all units may now be
|
|
2095
|
-
* priced at $0.40 (i.e. 101 units total would be $40.40).
|
|
2096
|
-
*
|
|
2097
|
-
* ```json
|
|
2098
|
-
* {
|
|
2099
|
-
* ...
|
|
2100
|
-
* "model_type": "bulk",
|
|
2101
|
-
* "bulk_config": {
|
|
2102
|
-
* "tiers": [
|
|
2103
|
-
* {
|
|
2104
|
-
* "maximum_units": 10,
|
|
2105
|
-
* "unit_amount": "0.50"
|
|
2106
|
-
* },
|
|
2107
|
-
* {
|
|
2108
|
-
* "maximum_units": 1000,
|
|
2109
|
-
* "unit_amount": "0.40"
|
|
2110
|
-
* }
|
|
2111
|
-
* ]
|
|
2112
|
-
* }
|
|
2113
|
-
* ...
|
|
2114
|
-
* }
|
|
2115
|
-
* ```
|
|
2116
|
-
*
|
|
2117
|
-
* ## Package pricing
|
|
2118
|
-
*
|
|
2119
|
-
* Package pricing defines the size or granularity of a unit for billing purposes.
|
|
2120
|
-
* For example, if the package size is set to 5, then 4 units will be billed as 5
|
|
2121
|
-
* and 6 units will be billed at 10.
|
|
2122
|
-
*
|
|
2123
|
-
* ```json
|
|
2124
|
-
* {
|
|
2125
|
-
* ...
|
|
2126
|
-
* "model_type": "package",
|
|
2127
|
-
* "package_config": {
|
|
2128
|
-
* "package_amount": "0.80",
|
|
2129
|
-
* "package_size": 10
|
|
2130
|
-
* }
|
|
2131
|
-
* ...
|
|
2132
|
-
* }
|
|
2133
|
-
* ```
|
|
2134
|
-
*
|
|
2135
|
-
* ## BPS pricing
|
|
2136
|
-
*
|
|
2137
|
-
* BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a
|
|
2138
|
-
* percent (the number of basis points to charge), as well as a cap per event to
|
|
2139
|
-
* assess. For example, this would allow you to assess a fee of 0.25% on every
|
|
2140
|
-
* payment you process, with a maximum charge of $25 per payment.
|
|
2141
|
-
*
|
|
2142
|
-
* ```json
|
|
2143
|
-
* {
|
|
2144
|
-
* ...
|
|
2145
|
-
* "model_type": "bps",
|
|
2146
|
-
* "bps_config": {
|
|
2147
|
-
* "bps": 125,
|
|
2148
|
-
* "per_unit_maximum": "11.00"
|
|
2149
|
-
* }
|
|
2150
|
-
* ...
|
|
2151
|
-
* }
|
|
2152
|
-
* ```
|
|
2153
|
-
*
|
|
2154
|
-
* ## Bulk BPS pricing
|
|
2155
|
-
*
|
|
2156
|
-
* Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the
|
|
2157
|
-
* total quantity across all events. Similar to bulk pricing, the BPS parameters of
|
|
2158
|
-
* a given event depends on the tier range that the billing period falls into. Each
|
|
2159
|
-
* tier range is defined by an upper bound. For example, after $1.5M of payment
|
|
2160
|
-
* volume is reached, each individual payment may have a lower cap or a smaller
|
|
2161
|
-
* take-rate.
|
|
2162
|
-
*
|
|
2163
|
-
* ```json
|
|
2164
|
-
* ...
|
|
2165
|
-
* "model_type": "bulk_bps",
|
|
2166
|
-
* "bulk_bps_config": {
|
|
2167
|
-
* "tiers": [
|
|
2168
|
-
* {
|
|
2169
|
-
* "maximum_amount": "1000000.00",
|
|
2170
|
-
* "bps": 125,
|
|
2171
|
-
* "per_unit_maximum": "19.00"
|
|
2172
|
-
* },
|
|
2173
|
-
* {
|
|
2174
|
-
* "maximum_amount": null,
|
|
2175
|
-
* "bps": 115,
|
|
2176
|
-
* "per_unit_maximum": "4.00"
|
|
2177
|
-
* }
|
|
2178
|
-
* ]
|
|
2179
|
-
* }
|
|
2180
|
-
* ...
|
|
2181
|
-
* }
|
|
2182
|
-
* ```
|
|
2183
|
-
*
|
|
2184
|
-
* ## Tiered BPS pricing
|
|
2185
|
-
*
|
|
2186
|
-
* Tiered BPS pricing specifies BPS parameters in a graduated manner, where an
|
|
2187
|
-
* event's applicable parameter is a function of its marginal addition to the
|
|
2188
|
-
* period total. Similar to tiered pricing, the BPS parameters of a given event
|
|
2189
|
-
* depends on the tier range that it falls into, where each tier range is defined
|
|
2190
|
-
* by an upper and lower bound. For example, the first few payments may have a 0.8
|
|
2191
|
-
* BPS take-rate and all payments after a specific volume may incur a take-rate of
|
|
2192
|
-
* 0.5 BPS each.
|
|
2193
|
-
*
|
|
2194
|
-
* ```json
|
|
2195
|
-
* ...
|
|
2196
|
-
* "model_type": "tiered_bps",
|
|
2197
|
-
* "tiered_bps_config": {
|
|
2198
|
-
* "tiers": [
|
|
2199
|
-
* {
|
|
2200
|
-
* "minimum_amount": "0",
|
|
2201
|
-
* "maximum_amount": "1000000.00",
|
|
2202
|
-
* "bps": 125,
|
|
2203
|
-
* "per_unit_maximum": "19.00"
|
|
2204
|
-
* },
|
|
2205
|
-
* {
|
|
2206
|
-
* "minimum_amount": "1000000.00",
|
|
2207
|
-
* "maximum_amount": null,
|
|
2208
|
-
* "bps": 115,
|
|
2209
|
-
* "per_unit_maximum": "4.00"
|
|
2210
|
-
* }
|
|
2211
|
-
* ]
|
|
2212
|
-
* }
|
|
2213
|
-
* ...
|
|
2214
|
-
* }
|
|
2215
|
-
* ```
|
|
2216
|
-
*
|
|
2217
|
-
* ## Matrix pricing
|
|
2218
|
-
*
|
|
2219
|
-
* Matrix pricing defines a set of unit prices in a one or two-dimensional matrix.
|
|
2220
|
-
* `dimensions` defines the two event property values evaluated in this pricing
|
|
2221
|
-
* model. In a one-dimensional matrix, the second value is `null`. Every
|
|
2222
|
-
* configuration has a list of `matrix_values` which give the unit prices for
|
|
2223
|
-
* specified property values. In a one-dimensional matrix, the matrix values will
|
|
2224
|
-
* have `dimension_values` where the second value of the pair is null. If an event
|
|
2225
|
-
* does not match any of the dimension values in the matrix, it will resort to the
|
|
2226
|
-
* `default_unit_amount`.
|
|
2227
|
-
*
|
|
2228
|
-
* ```json
|
|
2229
|
-
* {
|
|
2230
|
-
* "model_type": "matrix"
|
|
2231
|
-
* "matrix_config": {
|
|
2232
|
-
* "default_unit_amount": "3.00",
|
|
2233
|
-
* "dimensions": [
|
|
2234
|
-
* "cluster_name",
|
|
2235
|
-
* "region"
|
|
2236
|
-
* ],
|
|
2237
|
-
* "matrix_values": [
|
|
2238
|
-
* {
|
|
2239
|
-
* "dimension_values": [
|
|
2240
|
-
* "alpha",
|
|
2241
|
-
* "west"
|
|
2242
|
-
* ],
|
|
2243
|
-
* "unit_amount": "2.00"
|
|
2244
|
-
* },
|
|
2245
|
-
* ...
|
|
2246
|
-
* ]
|
|
2247
|
-
* }
|
|
2248
|
-
* }
|
|
2249
|
-
* ```
|
|
2250
|
-
*
|
|
2251
|
-
* ### Fixed fees
|
|
2252
|
-
*
|
|
2253
|
-
* Fixed fees are prices that are applied independent of usage quantities, and
|
|
2254
|
-
* follow unit pricing. They also have an additional parameter
|
|
2255
|
-
* `fixed_price_quantity`. If the Price represents a fixed cost, this represents
|
|
2256
|
-
* the quantity of units applied.
|
|
2257
|
-
*
|
|
2258
|
-
* ```json
|
|
2259
|
-
* {
|
|
2260
|
-
* ...
|
|
2261
|
-
* "id": "price_id",
|
|
2262
|
-
* "model_type": "unit",
|
|
2263
|
-
* "unit_config": {
|
|
2264
|
-
* "unit_amount": "2.00"
|
|
2265
|
-
* },
|
|
2266
|
-
* "fixed_price_quantity": 3.0
|
|
2267
|
-
* ...
|
|
2268
|
-
* }
|
|
2269
|
-
* ```
|
|
2270
|
-
*/
|
|
2271
|
-
price: PricesAPI.Price;
|
|
2272
|
-
|
|
2273
|
-
/**
|
|
2274
|
-
* Price's contributions for the timeframe, excluding any minimums and discounts.
|
|
2275
|
-
*/
|
|
2276
|
-
subtotal: string;
|
|
2277
|
-
|
|
2278
|
-
/**
|
|
2279
|
-
* Price's contributions for the timeframe, including minimums and discounts.
|
|
2280
|
-
*/
|
|
2281
|
-
total: string;
|
|
2282
|
-
|
|
2283
|
-
/**
|
|
2284
|
-
* If a `group_by` attribute is passed in, array of costs per `grouping_key`,
|
|
2285
|
-
* `grouping_value` or `secondary_grouping_key`, `secondary_grouping_value`.
|
|
2286
|
-
*/
|
|
2287
|
-
price_groups?: Array<PerPriceCostV2.PriceGroup> | null;
|
|
2288
|
-
|
|
2289
|
-
/**
|
|
2290
|
-
* The price's quantity for the timeframe
|
|
2291
|
-
*/
|
|
2292
|
-
quantity?: number | null;
|
|
2293
|
-
}
|
|
2294
|
-
|
|
2295
|
-
export namespace PerPriceCostV2 {
|
|
2296
|
-
export interface PriceGroup {
|
|
2297
|
-
/**
|
|
2298
|
-
* Grouping key to break down a single price's costs
|
|
2299
|
-
*/
|
|
2300
|
-
grouping_key: string;
|
|
2301
|
-
|
|
2302
|
-
grouping_value: string | null;
|
|
2303
|
-
|
|
2304
|
-
/**
|
|
2305
|
-
* If the price is a matrix price, this is the second dimension key
|
|
2306
|
-
*/
|
|
2307
|
-
secondary_grouping_key: string | null;
|
|
2308
|
-
|
|
2309
|
-
secondary_grouping_value: string | null;
|
|
2310
|
-
|
|
2311
|
-
/**
|
|
2312
|
-
* Total costs for this group for the timeframe. Note that this does not account
|
|
2313
|
-
* for any minimums or discounts.
|
|
2314
|
-
*/
|
|
2315
|
-
total: string;
|
|
2316
|
-
}
|
|
2317
|
-
}
|
|
2318
2006
|
}
|
|
2319
2007
|
}
|
|
2320
2008
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.41.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.41.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.41.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|