Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While working on a project utilizing the new metered/usage based billing, I noticed the library didn't support UsageRecords yet, despite the docs having Java examples (probably due to auto-generated docs based on the template):
https://stripe.com/docs/api/java#usage_record_create
This is not really what I would consider a 'final' or mergeable copy of work, but I wanted to throw it out there for anyone utilizing the new feature.
I had to add
subscriptionItem
ID as a parameter passed tocreate
because Stripe API will throw a 400 if you are using a sub-object endpoint such assubscription_items/<subscription_item_id>/usage_records
and you pass the subscription item ID in both the URL and the body params. I think this problem needs to be solved in a more generic way, but for the intent of moving forward in my current project I am leaving as is and am open for suggestions :)