lmsqueezy/lemonsqueezy.js

Add support for `invoice_immediately` in `subscription-items`

Closed this issue · 5 comments

This was recently added to the API but isn't available via this package yet:
https://docs.lemonsqueezy.com/api/subscription-items#update-a-subscription-item

HI, @elie222.

I'll submit a PR once the official API fixes this issue. #57

The updateSubscriptionItem function will have a break change, which I have to admit is a design error on my part. Sorry for the inconvenience!

Before:

updateSubscriptionItem(123, 10);

After:

updateSubscriptionItem(123, {
  quantity: 20,
  invoiceImmediately: true,
});

The updateSubscriptionItem function will have a break change, which I have to admit is a design error on my part. Sorry for the inconvenience!

Before:

updateSubscriptionItem(123, 10);

After:

updateSubscriptionItem(123, {
  quantity: 20,
  invoiceImmediately: true,
});

We'll probably have to support both the old and the new signature (deprecate the old one), at least until the next major version is released.

The updateSubscriptionItem function will have a break change, which I have to admit is a design error on my part. Sorry for the inconvenience!

Before:

updateSubscriptionItem(123, 10);

After:

updateSubscriptionItem(123, {

quantity: 20,

invoiceImmediately: true,

});

We'll probably have to support both the old and the new signature (deprecate the old one), at least until the next major version is released.

Yes, that's how it's being done currently.

PR. #61