@drawbridge/drawbridge-stripe 0.1.4 → 0.1.5
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.js +8 -1
- package/dist/index.mjs +8 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -159,6 +159,12 @@ var require_billing = __commonJS({
|
|
|
159
159
|
throw new Error("Stripe billing intent did not return a pricing plan subscription ID for customer: " + customer);
|
|
160
160
|
}
|
|
161
161
|
;
|
|
162
|
+
let stripePricingPlanSubscriptionNextBillingDate;
|
|
163
|
+
if (!default_payment_method) {
|
|
164
|
+
const { billing_cadence: billingCadenceId } = await stripe2.v2.billing.pricingPlanSubscriptions.retrieve(stripePricingPlanSubscriptionId);
|
|
165
|
+
({ next_billing_date: stripePricingPlanSubscriptionNextBillingDate } = await stripe2.v2.billing.cadences.retrieve(billingCadenceId));
|
|
166
|
+
}
|
|
167
|
+
;
|
|
162
168
|
return {
|
|
163
169
|
stripeAlerts: {
|
|
164
170
|
ai: {
|
|
@@ -166,7 +172,8 @@ var require_billing = __commonJS({
|
|
|
166
172
|
replenish: replenish == null ? void 0 : replenish.id
|
|
167
173
|
}
|
|
168
174
|
},
|
|
169
|
-
stripePricingPlanSubscriptionId
|
|
175
|
+
stripePricingPlanSubscriptionId,
|
|
176
|
+
stripePricingPlanSubscriptionNextBillingDate
|
|
170
177
|
};
|
|
171
178
|
} catch (error) {
|
|
172
179
|
throw error;
|
package/dist/index.mjs
CHANGED
|
@@ -165,6 +165,12 @@ var require_billing = __commonJS({
|
|
|
165
165
|
throw new Error("Stripe billing intent did not return a pricing plan subscription ID for customer: " + customer);
|
|
166
166
|
}
|
|
167
167
|
;
|
|
168
|
+
let stripePricingPlanSubscriptionNextBillingDate;
|
|
169
|
+
if (!default_payment_method) {
|
|
170
|
+
const { billing_cadence: billingCadenceId } = await stripe.v2.billing.pricingPlanSubscriptions.retrieve(stripePricingPlanSubscriptionId);
|
|
171
|
+
({ next_billing_date: stripePricingPlanSubscriptionNextBillingDate } = await stripe.v2.billing.cadences.retrieve(billingCadenceId));
|
|
172
|
+
}
|
|
173
|
+
;
|
|
168
174
|
return {
|
|
169
175
|
stripeAlerts: {
|
|
170
176
|
ai: {
|
|
@@ -172,7 +178,8 @@ var require_billing = __commonJS({
|
|
|
172
178
|
replenish: replenish == null ? void 0 : replenish.id
|
|
173
179
|
}
|
|
174
180
|
},
|
|
175
|
-
stripePricingPlanSubscriptionId
|
|
181
|
+
stripePricingPlanSubscriptionId,
|
|
182
|
+
stripePricingPlanSubscriptionNextBillingDate
|
|
176
183
|
};
|
|
177
184
|
} catch (error) {
|
|
178
185
|
throw error;
|
package/package.json
CHANGED