Support EventNotifications with singleton related objects - #1904
Merged
Merged
Conversation
jar-stripe
approved these changes
Sep 16, 2026
zacchua-stripe
added a commit
that referenced
this pull request
Sep 18, 2026
* rename changefiles that don't adhere to new naming rules * Support `EventNotification`s with singleton related objects (#1904) * support related singleton objects * add missing changefile * disabled reportUnnecessaryTypeIgnoreComment (#1912) * Add option to suppress Stripe notices (#1909) * Add option to suppress Stripe notices Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com> * Add changelog entry for notice suppression Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com> * Clarify Stripe notice suppression instructions Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com> --------- Co-authored-by: codex <noreply@openai.com> * Fix event handler account scoping (#1911) * Fix event handler account scoping Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com> * Add PR URL to changefile Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com> --------- Co-authored-by: codex <noreply@openai.com> * Remove deprecated StripeObject.request method Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com> * Add changelog entry for StripeObject.request removal Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com> * Remove changelog section metadata Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com> --------- Co-authored-by: David Brownman <xavdid@stripe.com> Co-authored-by: David Brownman <1231935+xavdid@users.noreply.github.com> Co-authored-by: jar-stripe <jar@stripe.com> Co-authored-by: codex <noreply@openai.com>
jar-stripe
added a commit
that referenced
this pull request
Sep 29, 2026
* rename changefiles that don't adhere to new naming rules * Support `EventNotification`s with singleton related objects (#1904) * support related singleton objects * add missing changefile * disabled reportUnnecessaryTypeIgnoreComment (#1912) * Add option to suppress Stripe notices (#1909) * Add option to suppress Stripe notices Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com> * Add changelog entry for notice suppression Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com> * Clarify Stripe notice suppression instructions Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com> --------- Co-authored-by: codex <noreply@openai.com> * Fix event handler account scoping (#1911) * Fix event handler account scoping Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com> * Add PR URL to changefile Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com> --------- Co-authored-by: codex <noreply@openai.com> * Remove deprecated StripeObject.request method Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com> * Add changelog entry for StripeObject.request removal Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com> * Remove changelog section metadata Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com> --------- Co-authored-by: David Brownman <xavdid@stripe.com> Co-authored-by: David Brownman <1231935+xavdid@users.noreply.github.com> Co-authored-by: jar-stripe <jar@stripe.com> Co-authored-by: codex <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why?
There are a few event notification types whose related object is a singleton. As a result, its
idfield will always benull. Rather than mark the rootRelatedObjectclass as having a nullable string for its id (causing every user to have to do null checks even when we know it'll be there), we're adding a second class and generating accordingly. There'll never be any ambiguity as ot whether a id field will be present in the response.What?
RelatedSingletonObjectclass, which is a copy ofRelatedObject, but without anid. I didn't do inheritance (when relevant) because it's such a tiny, colocated class. If the repetition bothers us, we can reassess.See Also