novuhq / go-novu

GO SDK for Novu - The open-source notification infrastructure for engineers. 🚀
MIT License
57 stars 45 forks source link

Fixed SubscriberApi.UpdatePreferences #91

Open Catzilla opened 3 weeks ago

Catzilla commented 3 weeks ago

This PR changes UpdateSubscriberPreferencesOptions struct to valid request body format Field types in that struct changed to pointers, to avoid bug with omitempty tag, as described in issue #90

Added new struct UpdateSubscriberPreferencesResponse, because API endpoint returns single object in data field instead of array, which results in unmarshalling error

Added all notification channel types and made them optional, as API may return only some of them

Fixes #90