class Lithic::Resources::Events

def initialize(client:)

Parameters:
  • client (Lithic::Client) --

Other tags:
    Api: - private
def initialize(client:)
  @client = client
  @subscriptions = Lithic::Resources::Events::Subscriptions.new(client: client)
  @event_subscriptions = Lithic::Resources::Events::EventSubscriptions.new(client: client)
end

def list(params = {})

Other tags:
    See: Lithic::Models::EventListParams -

Returns:
  • (Lithic::Internal::CursorPage) -

Parameters:
  • 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 begin
  • 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 w
  • begin_ (Time) -- Date string in RFC 3339 format. Only entries created after the specified time wi

Overloads:
  • list(begin_: nil, end_: nil, ending_before: nil, event_types: nil, page_size: nil, starting_after: nil, with_content: nil, request_options: {})
def list(params = {})
  parsed, options = Lithic::EventListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "v1/events",
    query: parsed.transform_keys(begin_: "begin", end_: "end"),
    page: Lithic::Internal::CursorPage,
    model: Lithic::Event,
    options: options
  )
end

def list_attempts(event_token, params = {})

Other tags:
    See: Lithic::Models::EventListAttemptsParams -

Returns:
  • (Lithic::Internal::CursorPage) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • status (Symbol, Lithic::EventListAttemptsParams::Status) --
  • starting_after (String) -- A cursor representing an item's token after which a page of results should begin
  • 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 w
  • begin_ (Time) -- Date string in RFC 3339 format. Only entries created after the specified time wi
  • event_token (String) --

Overloads:
  • list_attempts(event_token, begin_: nil, end_: nil, ending_before: nil, page_size: nil, starting_after: nil, status: nil, request_options: {})
def list_attempts(event_token, params = {})
  parsed, options = Lithic::EventListAttemptsParams.dump_request(params)
  @client.request(
    method: :get,
    path: ["v1/events/%1$s/attempts", event_token],
    query: parsed.transform_keys(begin_: "begin", end_: "end"),
    page: Lithic::Internal::CursorPage,
    model: Lithic::MessageAttempt,
    options: options
  )
end

def retrieve(event_token, params = {})

Other tags:
    See: Lithic::Models::EventRetrieveParams -

Returns:
  • (Lithic::Event) -

Parameters:
  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil) --
  • event_token (String) --

Overloads:
  • retrieve(event_token, request_options: {})
def retrieve(event_token, params = {})
  @client.request(
    method: :get,
    path: ["v1/events/%1$s", event_token],
    model: Lithic::Event,
    options: params[:request_options]
  )
end