Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure getRawJsonObject returns data for constructed webhooks #1946

Merged
merged 2 commits into from
Feb 5, 2025

Conversation

xavdid-stripe
Copy link
Member

Why?

StripeObjects make their raw JSON available via getRawJsonObject(). But, that data is sourced from the lastResponse (the API call that created that object). Constructed webhooks don't have a last response, so that raw object was unavailable. This fixes that.

What?

  • construct fake response during webhook parsing
  • add test

See Also

@xavdid-stripe xavdid-stripe requested review from a team and jar-stripe and removed request for a team February 5, 2025 00:49
@xavdid-stripe xavdid-stripe changed the title Make getRawJsonObject return data for constructed webhooks Ensure getRawJsonObject returns data for constructed webhooks Feb 5, 2025
@xavdid-stripe xavdid-stripe merged commit 7c99196 into master Feb 5, 2025
12 checks passed
@xavdid-stripe xavdid-stripe deleted the RUN_DEVSDK-1470 branch February 5, 2025 19:49
xavdid-stripe added a commit that referenced this pull request Feb 7, 2025
* Update generated code for v1461

* Update generated code for v1462

* Update generated code for v1463

* Updated upload artifact ci action (#1941)

* Update generated code (#1936)

* Update generated code for v1441

* Update generated code for v1455

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: helenye-stripe <[email protected]>

* Bump version to 28.3.0

* Update generated code for v1464

* Update generated code for v1466

* Update generated code for v1467

* Ensure `getRawJsonObject` returns data for constructed webhooks (#1946)

* construct fake response during webhook parsing

* formatting

* Update generated code for v1472

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: prathmesh-stripe <[email protected]>
Co-authored-by: helenye-stripe <[email protected]>
Co-authored-by: Helen Ye <[email protected]>
Co-authored-by: David Brownman <[email protected]>
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