New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

next-stripe-helper

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-stripe-helper - npm Package Compare versions

Comparing version 1.1.40 to 1.1.41

21

dist/subscriptions/index.js

@@ -337,8 +337,17 @@ "use strict";

newQuantity = Number(newQuantity);
// Update the quantity of the subscription item
const updatedSubscriptionItem = await stripe_1.stripe.subscriptionItems.update(subscriptionItem.id, {
quantity: newQuantity,
proration_behavior
});
return updatedSubscriptionItem;
if (newQuantity === 0) {
// Delete the subscription item if the new quantity is 0
await stripe_1.stripe.subscriptionItems.del(subscriptionItem.id, {
proration_behavior
});
return null;
}
else {
// Update the quantity of the subscription item
const updatedSubscriptionItem = await stripe_1.stripe.subscriptionItems.update(subscriptionItem.id, {
quantity: newQuantity,
proration_behavior
});
return updatedSubscriptionItem;
}
}

@@ -345,0 +354,0 @@ catch (error) {

{
"name": "next-stripe-helper",
"version": "1.1.40",
"version": "1.1.41",
"description": "Easily add Stripe boilerplate code to Nextjs, like webhook handling, and subscription updates. This package provides a thin wrapper around the Stripe API, and makes integrating Stripe and NextJS a lot faster!",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -259,2 +259,3 @@ # next-stripe-helper

updateItemQuantity,
updateItemQuantityByPriceId,
removeItemsFromSubscription,

@@ -261,0 +262,0 @@ removeItemsByPriceId,

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc