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

Prevents Object from being serialized on the Event resource #798

Merged
merged 1 commit into from
Mar 4, 2019

Conversation

remi-stripe
Copy link
Contributor

Fixes #797

r? @brandur-stripe
cc @stripe/api-libraries

Copy link
Contributor

@brandur-stripe brandur-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about the delay Remi!

One note for clarity, but otherwise LGTM.

ptal @remi-stripe

@@ -33,7 +33,7 @@ type EventRequest struct {

// EventData is the unmarshalled object as a map.
type EventData struct {
Object map[string]interface{}
Object map[string]interface{} `json:"-"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think that we could add a comment here that explains that despite the json:"-", this property will be populated independently? Maybe something like:

Object is a raw mapping of the API resource contained in the event.

Although marked with json:"-", it's still populated independently by a custom UnmarshalJSON implementation.

@remi-stripe remi-stripe force-pushed the remi-fix-event-serialization branch from c9a0e11 to 10eefd7 Compare March 4, 2019 19:38
@remi-stripe remi-stripe force-pushed the remi-fix-event-serialization branch from 10eefd7 to 15bb861 Compare March 4, 2019 19:43
@remi-stripe
Copy link
Contributor Author

@brandur thanks for the recommendation. Added your proposal. PTAL

@remi-stripe remi-stripe merged commit c3ad722 into master Mar 4, 2019
@remi-stripe remi-stripe deleted the remi-fix-event-serialization branch March 4, 2019 19:52
nadaismail-stripe pushed a commit that referenced this pull request Oct 18, 2024
Bumps [mocha](https://github.com/freerange/mocha) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/freerange/mocha/releases)
- [Changelog](https://github.com/freerange/mocha/blob/main/RELEASE.md)
- [Commits](freerange/mocha@v1.14.0...v1.15.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants