@drawbridge/drawbridge-stripe 0.1.9 → 0.1.10
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 +28 -14
- package/dist/index.mjs +28 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -438,13 +438,20 @@ var require_subscription = __commonJS({
|
|
|
438
438
|
const schedule = await stripe2.subscriptionSchedules.create({
|
|
439
439
|
from_subscription: stripeSubscriptionId
|
|
440
440
|
});
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
441
|
+
try {
|
|
442
|
+
await stripe2.subscriptionSchedules.update(
|
|
443
|
+
schedule.id,
|
|
444
|
+
{
|
|
445
|
+
end_behavior: "release",
|
|
446
|
+
phases
|
|
447
|
+
}
|
|
448
|
+
);
|
|
449
|
+
} catch (error) {
|
|
450
|
+
await stripe2.subscriptionSchedules.release(schedule.id).catch(() => {
|
|
451
|
+
});
|
|
452
|
+
throw error;
|
|
453
|
+
}
|
|
454
|
+
;
|
|
448
455
|
return {
|
|
449
456
|
items,
|
|
450
457
|
pending: {
|
|
@@ -652,13 +659,20 @@ var require_subscription = __commonJS({
|
|
|
652
659
|
const schedule = await stripe2.subscriptionSchedules.create({
|
|
653
660
|
from_subscription: stripeSubscriptionId
|
|
654
661
|
});
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
+
try {
|
|
663
|
+
await stripe2.subscriptionSchedules.update(
|
|
664
|
+
schedule.id,
|
|
665
|
+
{
|
|
666
|
+
end_behavior: "release",
|
|
667
|
+
phases
|
|
668
|
+
}
|
|
669
|
+
);
|
|
670
|
+
} catch (error) {
|
|
671
|
+
await stripe2.subscriptionSchedules.release(schedule.id).catch(() => {
|
|
672
|
+
});
|
|
673
|
+
throw error;
|
|
674
|
+
}
|
|
675
|
+
;
|
|
662
676
|
return {
|
|
663
677
|
items: {
|
|
664
678
|
plan: {
|
package/dist/index.mjs
CHANGED
|
@@ -444,13 +444,20 @@ var require_subscription = __commonJS({
|
|
|
444
444
|
const schedule = await stripe.subscriptionSchedules.create({
|
|
445
445
|
from_subscription: stripeSubscriptionId
|
|
446
446
|
});
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
447
|
+
try {
|
|
448
|
+
await stripe.subscriptionSchedules.update(
|
|
449
|
+
schedule.id,
|
|
450
|
+
{
|
|
451
|
+
end_behavior: "release",
|
|
452
|
+
phases
|
|
453
|
+
}
|
|
454
|
+
);
|
|
455
|
+
} catch (error) {
|
|
456
|
+
await stripe.subscriptionSchedules.release(schedule.id).catch(() => {
|
|
457
|
+
});
|
|
458
|
+
throw error;
|
|
459
|
+
}
|
|
460
|
+
;
|
|
454
461
|
return {
|
|
455
462
|
items,
|
|
456
463
|
pending: {
|
|
@@ -658,13 +665,20 @@ var require_subscription = __commonJS({
|
|
|
658
665
|
const schedule = await stripe.subscriptionSchedules.create({
|
|
659
666
|
from_subscription: stripeSubscriptionId
|
|
660
667
|
});
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
+
try {
|
|
669
|
+
await stripe.subscriptionSchedules.update(
|
|
670
|
+
schedule.id,
|
|
671
|
+
{
|
|
672
|
+
end_behavior: "release",
|
|
673
|
+
phases
|
|
674
|
+
}
|
|
675
|
+
);
|
|
676
|
+
} catch (error) {
|
|
677
|
+
await stripe.subscriptionSchedules.release(schedule.id).catch(() => {
|
|
678
|
+
});
|
|
679
|
+
throw error;
|
|
680
|
+
}
|
|
681
|
+
;
|
|
668
682
|
return {
|
|
669
683
|
items: {
|
|
670
684
|
plan: {
|
package/package.json
CHANGED