Skip to content

Commit

Permalink
Clean up Event types
Browse files Browse the repository at this point in the history
  • Loading branch information
joshsmith committed Nov 18, 2017
1 parent ff16f7b commit c93d8d5
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions lib/stripe/core_resources/event.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,33 @@ defmodule Stripe.Event do
Work with Stripe event objects.
You can:
- Retrieve an event
Does not yet render the `data` object.
Stripe API reference: https://stripe.com/docs/api#event
"""
use Stripe.Entity

@type event_data :: %{
object: map,
previous_attributes: map
}

@type event_request :: %{
id: String.t | nil,
idempotency_key: String.t | nil
}

@type t :: %__MODULE__{
id: Stripe.id,
object: String.t,
api_version: String.t,
created: Stripe.timestamp,
data: %{
object: map,
previous_attributes: map
},
livemode: boolean,
pending_webhooks: non_neg_integer,
request: %{
id: String.t,
idempotency_key: String.t
},
type: String.t
}
id: Stripe.id,
object: String.t,
api_version: String.t | nil,
created: Stripe.timestamp,
data: event_data,
livemode: boolean,
pending_webhooks: non_neg_integer,
request: event_request | nil,
type: String.t
}

defstruct [
:id,
Expand Down

0 comments on commit c93d8d5

Please sign in to comment.