lib/twilio-ruby/rest/api/v2010/account/notification.rb in twilio-ruby-5.38.0 vs lib/twilio-ruby/rest/api/v2010/account/notification.rb in twilio-ruby-5.39.0
- old
+ new
@@ -121,15 +121,13 @@
'MessageDate>' => Twilio.serialize_iso8601_date(message_date_after),
'PageToken' => page_token,
'Page' => page_number,
'PageSize' => page_size,
})
- response = @version.page(
- 'GET',
- @uri,
- params
- )
+
+ response = @version.page('GET', @uri, params)
+
NotificationPage.new(@version, response, @solution)
end
##
# Retrieve a single page of NotificationInstance records from the API.
@@ -197,21 +195,15 @@
@solution = {account_sid: account_sid, sid: sid, }
@uri = "/Accounts/#{@solution[:account_sid]}/Notifications/#{@solution[:sid]}.json"
end
##
- # Fetch a NotificationInstance
+ # Fetch the NotificationInstance
# @return [NotificationInstance] Fetched NotificationInstance
def fetch
- params = Twilio::Values.of({})
+ payload = @version.fetch('GET', @uri)
- payload = @version.fetch(
- 'GET',
- @uri,
- params,
- )
-
NotificationInstance.new(
@version,
payload,
account_sid: @solution[:account_sid],
sid: @solution[:sid],
@@ -385,10 +377,10 @@
def uri
@properties['uri']
end
##
- # Fetch a NotificationInstance
+ # Fetch the NotificationInstance
# @return [NotificationInstance] Fetched NotificationInstance
def fetch
context.fetch
end
\ No newline at end of file