Stripe.Event (stripity_stripe v2.17.3) View Source

Work with Stripe event objects.

You can:

  • Retrieve an event
  • List all events

Stripe API reference: https://stripe.com/docs/api/events

Link to this section Summary

Functions

List all events, going back up to 30 days.

Retrieve an event.

Link to this section Types

Specs

event_data() :: %{
  :object => event_data_object(),
  optional(:previous_attributes) => map()
}

Specs

Specs

event_request() :: %{id: String.t() | nil, idempotency_key: String.t() | nil}

Specs

t() :: %Stripe.Event{
  account: term(),
  api_version: String.t() | nil,
  created: Stripe.timestamp(),
  data: event_data(),
  id: Stripe.id(),
  livemode: boolean(),
  object: String.t(),
  pending_webhooks: non_neg_integer(),
  request: event_request() | nil,
  type: String.t()
}

Link to this section Functions

Link to this function

list(params \\ %{}, opts \\ [])

View Source

Specs

list(params, Stripe.options()) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.Error.t()}
when params:
       %{
         optional(:created) => Stripe.date_query(),
         optional(:ending_before) => t() | Stripe.id(),
         optional(:limit) => 1..100,
         optional(:starting_after) => t() | Stripe.id(),
         optional(:type) => String.t(),
         optional(:types) => list()
       }
       | %{}

List all events, going back up to 30 days.

Link to this function

retrieve(id, opts \\ [])

View Source

Specs

retrieve(Stripe.id() | t(), Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}

Retrieve an event.