Skip to content

ThinEvent reason and livemode#1516

Merged
jar-stripe merged 7 commits intomasterfrom
jar/push-event-livemode-and-reason
Jan 13, 2025
Merged

ThinEvent reason and livemode#1516
jar-stripe merged 7 commits intomasterfrom
jar/push-event-livemode-and-reason

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
13 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