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

ThinEvent reason and livemode #1516

Merged
merged 7 commits into from
Jan 13, 2025
Merged

Conversation

jar-stripe
Copy link
Contributor

Why?

V2 ThinEvent payloads contain a livemode boolean and optionally a reason object that contains metadata about the event and object that triggered it. This PR ensures these fields are exposed in ThinEvent, and adds tests to verify they are parsed correctly.

What?

  • added EventReason and EventReasonRequest types to thin_event.rb
  • added attr_reader entries for livemode and reason to ThinEvent
  • added test for parsing v2 thin events with livemode and reason, and test for reason == nil in existing parse v2 event test

Changelog

  • Add livemode and optional reason fields to ThinEvent

@jar-stripe jar-stripe merged commit 36b1c7c into master Jan 13, 2025
14 checks passed
@jar-stripe jar-stripe deleted the jar/push-event-livemode-and-reason branch January 13, 2025 22:04
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