Class: VoiceML::NotificationsResource

Inherits:
BaseResource show all
Defined in:
lib/voiceml/resources/notifications.rb

Overview

Account-scoped ‘/Notifications` compat stubs (always empty list; fetch returns 404).

Constant Summary collapse

LIST_FIELDS =
{
  'Page'          => :page,
  'PageSize'      => :page_size,
  'PageToken'     => :page_token,
  'Log'           => :log,
  'MessageDate'   => :message_date,
  'MessageDate<'  => :message_date_lt,
  'MessageDate>'  => :message_date_gt
}.freeze

Instance Method Summary collapse

Methods inherited from BaseResource

#initialize

Constructor Details

This class inherits a constructor from VoiceML::BaseResource

Instance Method Details

#get(notification_sid) ⇒ Hash

Returns:

  • (Hash)


28
29
30
# File 'lib/voiceml/resources/notifications.rb', line 28

def get(notification_sid)
  @transport.request(:get, path('Notifications', notification_sid))
end

#list(**kwargs) ⇒ VoiceML::NotificationsList



20
21
22
23
24
25
# File 'lib/voiceml/resources/notifications.rb', line 20

def list(**kwargs)
  NotificationsList.from_hash(
    @transport.request(:get, path('Notifications'),
                       params: form_params(LIST_FIELDS, kwargs))
  )
end