Closed ramya-stripe closed 1 month ago
@helenye-stripe I wanted to add tests that test the type for column C has the data
and related_object
fields. But there is a broader problem with types that I have described in https://jira.corp.stripe.com/browse/DEVSDK-2192 which @xavdid-stripe is helping to figure out.
Added https://github.com/stripe/stripe-node/pull/2190/commits/6f72bb2afffe29387783a683d5e6df646523e4f0 - but like I said earlier this test will pass even without the changes in this PR
Can we unblock this PR?
Why?
The fetchRelatedObject() method on the pulled event did not really work as it did not have access to the RequestSender. In the interest of time we will recommend users to use the info in the related_object field on the pulled event to determine which stripe method to call to get the related_object.
That related_object info was available on the pulled event but did not show up in types before. This PR adds that info.
What?
fetchRelatedObject()
method from the individual event typesrelated_object
on the individual event types. The type of this property will beStripe.Event.RelatedObject
Stripe.ThinEvent
. This got missed in the previous PR tonext-major-infra
where we copied over codeparseThinEvent()
andparseSnapshotEvent
. The docs content for the input params have been copied over fromWebhook.constructEvent()