@progus/connector 0.6.3 → 0.6.4
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.cjs +2 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -407,7 +407,8 @@ async function fetchActiveSubscriptionEventData(admin, logger = console) {
|
|
|
407
407
|
const subscriptionId = parseSubscriptionId(active?.id);
|
|
408
408
|
if (!subscriptionId) return null;
|
|
409
409
|
const pricingDetails = active?.lineItems?.[0]?.plan?.pricingDetails;
|
|
410
|
-
const
|
|
410
|
+
const rawPrice = pricingDetails?.price?.amount ?? pricingDetails?.cappedAmount?.amount;
|
|
411
|
+
const subscriptionPrice = parsePrice(rawPrice);
|
|
411
412
|
const subscriptionPeriod = normalizeInterval(pricingDetails?.interval, active?.name);
|
|
412
413
|
if (!subscriptionPeriod || subscriptionPrice === null) return null;
|
|
413
414
|
return {
|
package/dist/index.js
CHANGED
|
@@ -265,7 +265,8 @@ async function fetchActiveSubscriptionEventData(admin, logger = console) {
|
|
|
265
265
|
const subscriptionId = parseSubscriptionId(active?.id);
|
|
266
266
|
if (!subscriptionId) return null;
|
|
267
267
|
const pricingDetails = active?.lineItems?.[0]?.plan?.pricingDetails;
|
|
268
|
-
const
|
|
268
|
+
const rawPrice = pricingDetails?.price?.amount ?? pricingDetails?.cappedAmount?.amount;
|
|
269
|
+
const subscriptionPrice = parsePrice(rawPrice);
|
|
269
270
|
const subscriptionPeriod = normalizeInterval(pricingDetails?.interval, active?.name);
|
|
270
271
|
if (!subscriptionPeriod || subscriptionPrice === null) return null;
|
|
271
272
|
return {
|