Skip to content

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 <111009531+helenye-stripe@users.noreply.github.com> * 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 <165320323+prathmesh-stripe@users.noreply.github.com> Co-authored-by: helenye-stripe <111009531+helenye-stripe@users.noreply.github.com> Co-authored-by: Helen Ye <helenye@stripe.com> Co-authored-by: David Brownman <109395161+xavdid-stripe@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants