Skip to content

Support EventNotifications with singleton related objects - #1964

Open
xavdid wants to merge 1 commit into
masterfrom
RUN_DEVSDK-2825
Open

Support EventNotifications with singleton related objects#1964
xavdid wants to merge 1 commit 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 kidus-stripe and removed request for a team September 10, 2026 21:42
@xavdid
xavdid enabled auto-merge (squash) September 10, 2026 21:42
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.

1 participant