@balena/balena-pricing 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.js +2 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export declare class CreditPricing {
|
|
|
37
37
|
* @returns total price of credits for purchase
|
|
38
38
|
*
|
|
39
39
|
* @example
|
|
40
|
-
* const price = getCreditTotalPrice('device:microservices', 0, 25000
|
|
40
|
+
* const price = getCreditTotalPrice('device:microservices', 0, 25000);
|
|
41
41
|
*/
|
|
42
42
|
getCreditTotalPrice(featureSlug: string, availableCredits: number, creditsToPurchase: number): number;
|
|
43
43
|
/**
|
|
@@ -61,7 +61,7 @@ export declare class CreditPricing {
|
|
|
61
61
|
* @returns total savings of credits for purchase
|
|
62
62
|
*
|
|
63
63
|
* @example
|
|
64
|
-
* const savings = getTotalSavings('device:microservices', 0, 25000,
|
|
64
|
+
* const savings = getTotalSavings('device:microservices', 0, 25000, 100);
|
|
65
65
|
*/
|
|
66
66
|
getTotalSavings(featureSlug: string, availableCredits: number, creditsToPurchase: number, dynamicPriceCents: number): number;
|
|
67
67
|
}
|
package/dist/index.js
CHANGED
|
@@ -79,7 +79,7 @@ class CreditPricing {
|
|
|
79
79
|
* @returns total price of credits for purchase
|
|
80
80
|
*
|
|
81
81
|
* @example
|
|
82
|
-
* const price = getCreditTotalPrice('device:microservices', 0, 25000
|
|
82
|
+
* const price = getCreditTotalPrice('device:microservices', 0, 25000);
|
|
83
83
|
*/
|
|
84
84
|
getCreditTotalPrice(featureSlug, availableCredits, creditsToPurchase) {
|
|
85
85
|
return Math.round(this.getCreditPrice(featureSlug, availableCredits, creditsToPurchase) *
|
|
@@ -111,7 +111,7 @@ class CreditPricing {
|
|
|
111
111
|
* @returns total savings of credits for purchase
|
|
112
112
|
*
|
|
113
113
|
* @example
|
|
114
|
-
* const savings = getTotalSavings('device:microservices', 0, 25000,
|
|
114
|
+
* const savings = getTotalSavings('device:microservices', 0, 25000, 100);
|
|
115
115
|
*/
|
|
116
116
|
getTotalSavings(featureSlug, availableCredits, creditsToPurchase, dynamicPriceCents) {
|
|
117
117
|
return Math.round(creditsToPurchase *
|
package/dist/src/index.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export declare class CreditPricing {
|
|
|
37
37
|
* @returns total price of credits for purchase
|
|
38
38
|
*
|
|
39
39
|
* @example
|
|
40
|
-
* const price = getCreditTotalPrice('device:microservices', 0, 25000
|
|
40
|
+
* const price = getCreditTotalPrice('device:microservices', 0, 25000);
|
|
41
41
|
*/
|
|
42
42
|
getCreditTotalPrice(featureSlug: string, availableCredits: number, creditsToPurchase: number): number;
|
|
43
43
|
/**
|
|
@@ -61,7 +61,7 @@ export declare class CreditPricing {
|
|
|
61
61
|
* @returns total savings of credits for purchase
|
|
62
62
|
*
|
|
63
63
|
* @example
|
|
64
|
-
* const savings = getTotalSavings('device:microservices', 0, 25000,
|
|
64
|
+
* const savings = getTotalSavings('device:microservices', 0, 25000, 100);
|
|
65
65
|
*/
|
|
66
66
|
getTotalSavings(featureSlug: string, availableCredits: number, creditsToPurchase: number, dynamicPriceCents: number): number;
|
|
67
67
|
}
|
package/dist/src/index.js
CHANGED
|
@@ -79,7 +79,7 @@ class CreditPricing {
|
|
|
79
79
|
* @returns total price of credits for purchase
|
|
80
80
|
*
|
|
81
81
|
* @example
|
|
82
|
-
* const price = getCreditTotalPrice('device:microservices', 0, 25000
|
|
82
|
+
* const price = getCreditTotalPrice('device:microservices', 0, 25000);
|
|
83
83
|
*/
|
|
84
84
|
getCreditTotalPrice(featureSlug, availableCredits, creditsToPurchase) {
|
|
85
85
|
return Math.round(this.getCreditPrice(featureSlug, availableCredits, creditsToPurchase) *
|
|
@@ -111,7 +111,7 @@ class CreditPricing {
|
|
|
111
111
|
* @returns total savings of credits for purchase
|
|
112
112
|
*
|
|
113
113
|
* @example
|
|
114
|
-
* const savings = getTotalSavings('device:microservices', 0, 25000,
|
|
114
|
+
* const savings = getTotalSavings('device:microservices', 0, 25000, 100);
|
|
115
115
|
*/
|
|
116
116
|
getTotalSavings(featureSlug, availableCredits, creditsToPurchase, dynamicPriceCents) {
|
|
117
117
|
return Math.round(creditsToPurchase *
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@balena/balena-pricing",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Balena pricing/savings calculators",
|
|
5
5
|
"homepage": "https://github.com/balena-io-modules/balena-pricing#readme",
|
|
6
6
|
"main": "dist",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"_": "test/*.spec.ts"
|
|
60
60
|
},
|
|
61
61
|
"versionist": {
|
|
62
|
-
"publishedAt": "2023-01-
|
|
62
|
+
"publishedAt": "2023-01-23T14:04:28.044Z"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"typed-error": "^3.2.1"
|