Class: Telnyx::Resources::NotificationEvents

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

Overview

Notification settings operations

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:



34
35
36
# File 'lib/telnyx/resources/notification_events.rb', line 34

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:



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

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