Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature to add Discount in SubscriptionCreateParams #1809

Closed
pranaytripathi opened this issue May 19, 2024 · 3 comments
Closed

Add feature to add Discount in SubscriptionCreateParams #1809

pranaytripathi opened this issue May 19, 2024 · 3 comments
Assignees

Comments

@pranaytripathi
Copy link

Is your feature request related to a problem? Please describe.

I am have service based on Spring boot and I am using Stripe library version 24.13.0.

I am trying to add Discounts to the Subscription while trying to create a subscription. The library doesn't seem to support this feature to add the Discount to the SubscriptionCreateParams although it is mentioned as an example in documents.

Documentation:
Screenshot from 2024-05-19 20-00-16

Fields in the SubscriptionCreateParams:
Screenshot from 2024-05-19 20-03-34

Describe the solution you'd like

I would like to have this ability to add Discount to the SubscriptionCreateParams as mentioned in the documentation.

Describe alternatives you've considered

One of the alternative that we have is to create a Map for this and populate all the values there. I would like to avoid as its not easily type checked and more prone to errors.

Additional context

I am open to contribute towards this feature. The feature request is quite essential for our recent service changes as we are trying to move discounts towards Stripe.

@remi-stripe
Copy link
Contributor

@pranaytripathi You are likely on an old version of stripe-java at the moment. You can see in the code right here that the addDiscount() method has been added already. Looking at the changelog, it was added in 24.23.0.

@remi-stripe remi-stripe self-assigned this May 19, 2024
@pranaytripathi
Copy link
Author

Thanks it seems it was recently added.

@remi-stripe
Copy link
Contributor

Yes this feature only shipped publicly last month which is why it's on a recent version of stripe-java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants