Skip to content

Support EventNotifications with singleton related objects - #1904

Merged
xavdid merged 4 commits into
masterfrom
RUN_DEVSDK-2825
Sep 16, 2026
Merged

xavdid merged 4 commits into
masterfrom
RUN_DEVSDK-2825

Conversation

@xavdid

@xavdid xavdid commented Sep 10, 2026

Copy link
Copy Markdown
Member

Why?

There are a few event notification types whose related object is a singleton. As a result, its id field will always be null. Rather than mark the root RelatedObject class 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?

  • add RelatedSingletonObject class, which is a copy of RelatedObject, but without an id. I didn't do inheritance (when relevant) because it's such a tiny, colocated class. If the repetition bothers us, we can reassess.
  • add related methods, as needed
  • tests

See Also

@xavdid
xavdid requested a review from a team as a code owner September 10, 2026 21:42
@xavdid
xavdid requested review from jar-stripe and removed request for a team September 10, 2026 21:42
@xavdid
xavdid enabled auto-merge (squash) September 10, 2026 21:42
@xavdid
xavdid merged commit fb045bd into master Sep 16, 2026
20 checks passed
@xavdid
xavdid deleted the RUN_DEVSDK-2825 branch September 16, 2026 20:33
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants