class Lithic::Resources::Events

def initialize(client:)

Parameters:
  • client (Lithic::Client) --
def initialize(client:)
  @client = client
  @subscriptions = Lithic::Resources::Events::Subscriptions.new(client: client)
end

def list(params = {})

Returns:
  • (Lithic::CursorPage) -

Options Hash: (**params)
  • :request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • :with_content (Boolean) -- Whether to include the event payload content in the response.
  • :starting_after (String) -- A cursor representing an item's token after which a page of results should
  • :page_size (Integer) -- Page size (for pagination).
  • :event_types (Array) -- Event types to filter events by.
  • :ending_before (String) -- A cursor representing an item's token before which a page of results should end.
  • :end_ (Time) -- Date string in RFC 3339 format. Only entries created before the specified time
  • :begin_ (Time) -- Date string in RFC 3339 format. Only entries created after the specified time

Parameters:
  • params (Lithic::Models::EventListParams, Hash{Symbol=>Object}) -- .
def list(params = {})
  parsed, options = Lithic::Models::EventListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "v1/events",
    query: parsed,
    page: Lithic::CursorPage,
    model: Lithic::Models::Event,
    options: options
  )
end

def list_attempts(event_token, params = {})

Returns:
  • (Lithic::CursorPage) -

Options Hash: (**params)
  • :request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • :status (Symbol, Lithic::Models::EventListAttemptsParams::Status) --
  • :starting_after (String) -- A cursor representing an item's token after which a page of results should
  • :page_size (Integer) -- Page size (for pagination).
  • :ending_before (String) -- A cursor representing an item's token before which a page of results should end.
  • :end_ (Time) -- Date string in RFC 3339 format. Only entries created before the specified time
  • :begin_ (Time) -- Date string in RFC 3339 format. Only entries created after the specified time

Parameters:
  • params (Lithic::Models::EventListAttemptsParams, Hash{Symbol=>Object}) -- .
  • event_token (String) --
def list_attempts(event_token, params = {})
  parsed, options = Lithic::Models::EventListAttemptsParams.dump_request(params)
  @client.request(
    method: :get,
    path: ["v1/events/%1$s/attempts", event_token],
    query: parsed,
    page: Lithic::CursorPage,
    model: Lithic::Models::MessageAttempt,
    options: options
  )
end

def retrieve(event_token, params = {})

Returns:
  • (Lithic::Models::Event) -

Options Hash: (**params)
  • :request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --

Parameters:
  • params (Lithic::Models::EventRetrieveParams, Hash{Symbol=>Object}) -- .
  • event_token (String) --
def retrieve(event_token, params = {})
  @client.request(
    method: :get,
    path: ["v1/events/%1$s", event_token],
    model: Lithic::Models::Event,
    options: params[:request_options]
  )
end