Class: Telnyx::Resources::NotificationEvents

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/notification_events.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ NotificationEvents

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of NotificationEvents.

Parameters:



32
33
34
# File 'lib/telnyx/resources/notification_events.rb', line 32

def initialize(client:)
  @client = client
end

Instance Method Details

#list(page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::NotificationEventListResponse>

Returns a list of your notifications events.

Parameters:

  • page_number (Integer)
  • page_size (Integer)
  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



17
18
19
20
21
22
23
24
25
26
27
# File 'lib/telnyx/resources/notification_events.rb', line 17

def list(params = {})
  parsed, options = Telnyx::NotificationEventListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "notification_events",
    query: parsed.transform_keys(page_number: "page[number]", page_size: "page[size]"),
    page: Telnyx::Internal::DefaultFlatPagination,
    model: Telnyx::Models::NotificationEventListResponse,
    options: options
  )
end