Omise.Event (omise v0.10.0)

Provides Event API interfaces.

https://www.omise.co/events-api

Summary

Types

@type t() :: %Omise.Event{
  created: String.t(),
  data:
    Omise.Charge.t()
    | Omise.Customer.t()
    | Omise.Card.t()
    | Omise.Dispute.t()
    | Omise.Recipient.t()
    | Omise.Refund.t()
    | Omise.Transfer.t(),
  id: String.t(),
  key: String.t(),
  livemode: boolean(),
  location: String.t(),
  object: String.t()
}

Functions

Link to this function

list(params \\ [], opts \\ [])

@spec list(Keyword.t(), Keyword.t()) ::
  {:ok, Omise.List.t()} | {:error, Omise.Error.t()}

List all events.

Returns {:ok, events} if the request is successful, {:error, error} otherwise.

Query Parameters:

  • offset - (optional, default: 0) The offset of the first record returned.
  • limit - (optional, default: 20, maximum: 100) The maximum amount of records returned.
  • from - (optional, default: 1970-01-01T00:00:00Z, format: ISO 8601) The UTC date and time limiting the beginning of returned records.
  • to - (optional, default: current UTC Datetime, format: ISO 8601) The UTC date and time limiting the end of returned records.

Examples

Omise.Event.list

Omise.Event.list(limit: 10)
Link to this function

retrieve(id, opts \\ [])

@spec retrieve(String.t(), Keyword.t()) :: {:ok, t()} | {:error, Omise.Error.t()}

Retrieve an event.

Returns {:ok, event} if the request is successful, {:error, error} otherwise.

Examples

Omise.Event.retrieve("evnt_test_5285sfiqfo8t32x6h5h")