Skip to content

Update event.cr to make request.id nilable.#41

Merged
confact merged 1 commit intoconfact:masterfrom
vectorselector:patch-1
Aug 11, 2021
Merged

Update event.cr to make request.id nilable.#41
confact merged 1 commit intoconfact:masterfrom
vectorselector:patch-1

Conversation

@vectorselector
Copy link
Contributor

Stripe events are not always the same. "invoice.payment_succeeded" has an event.request.id of nil when it occurs at the end of a "invoice.payment_action_required" workflow. When it occurs otherwise it has an id.

Here's an example of an event.request sub-object:

"request" =>
{"id" => nil,
"idempotency_key" =>
"pi_3JLU8MIShNssj1NZ0IGhw32s-src_1JLQ8NIShMssj1YZhNZBDpLE"},

Stripe events are not always the same. "invoice.payment_succeeded" has an `event.request.id` of `nil` when it occurs at the end of a "invoice.payment_action_required" workflow. When it occurs otherwise it has an id.
@rmarronnier
Copy link
Contributor

Thanks for this @vectorselector !

Also, could you keep the corresponding issue (#39) open as long this PR is waiting to be merged ? (makes things easier for reviewers ;-) )

@confact
Copy link
Owner

confact commented Aug 11, 2021

LGTM, some attributes seems to need to be nil, even if the documentation doesn't mention it. Got same issue myself on some of the objects.

Merging.

@confact confact merged commit 45eec9b into confact:master Aug 11, 2021
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.

3 participants