Skip to content

Store object ids with events#633

Merged
joshsmith merged 1 commit intodevelopfrom
617-track-event-object-ids
Jan 15, 2017
Merged

Store object ids with events#633
joshsmith merged 1 commit intodevelopfrom
617-track-event-object-ids

Conversation

@begedin
Copy link
Contributor

@begedin begedin commented Jan 15, 2017

What's in this PR?

Added everything needed to store object ids and types with an event record.

This means that when a webhook event is stored locally, we also store information about the id and type of the object contained in the event.

References

Fixes #617

@begedin begedin added this to the Launch Donations milestone Jan 15, 2017
Copy link
Contributor

@joshsmith joshsmith left a comment

Choose a reason for hiding this comment

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

Looks good, just some minor alpha ordering suggestions you can change when you rebase.

|> cast(params, [:endpoint, :id_from_stripe, :type, :user_id])
|> validate_required([:endpoint, :id_from_stripe, :type])
|> cast(params, [:endpoint, :id_from_stripe, :type, :user_id, :object_id, :object_type])
|> validate_required([:endpoint, :id_from_stripe, :type, :object_id, :object_type])
Copy link
Contributor

Choose a reason for hiding this comment

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

Alpha order.

type: "test.type"
type: "test.type",
object_id: "cus_123",
object_type: "customer"
Copy link
Contributor

Choose a reason for hiding this comment

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

Alpha order.

"id_from_stripe" => "evt_123",
"type" => "some.event",
"user_id" => "act_123",
"endpoint" => "connect"
Copy link
Contributor

Choose a reason for hiding this comment

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

Alpha order.

@begedin begedin force-pushed the 617-track-event-object-ids branch from aa11f2c to 9bbe954 Compare January 15, 2017 04:52
@joshsmith joshsmith merged commit 08dcf7d into develop Jan 15, 2017
@joshsmith joshsmith deleted the 617-track-event-object-ids branch January 15, 2017 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants