-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Feature summary
Add a parser that returns a typed contract for NotificationRequestItem
Problem statement
Currently, the NotificationRequestItem
is a *map[string]interface{}
. This makes it difficult to consume the webhook events that send this payload.
It would be great to have a parser that gives us a typed contract for NotificationRequestItem
that we use in our webhook event handler.
Proposed solution
A library or package that parses the map of arbitrary fields and exposes a typed contract for additionalDetails
(The NotificationRequestItem
)
Alternatives considered
Update the types directly in the go sdk but that will probably be a big breaking change for a bunch of clients, so a parser would make more sense?
Additional context
We surface things like the last 4-digits and a card icon on our payment confirmation page, which we get from the AUTHORISED
webhook event. We'd prefer to use a typed contract to understand and use these values.