lib/twilio-ruby/rest/monitor/v1/event.rb in twilio-ruby-5.38.0 vs lib/twilio-ruby/rest/monitor/v1/event.rb in twilio-ruby-5.39.0

- old
+ new

@@ -150,15 +150,13 @@ 'EndDate' => Twilio.serialize_iso8601_datetime(end_date), 'PageToken' => page_token, 'Page' => page_number, 'PageSize' => page_size, }) - response = @version.page( - 'GET', - @uri, - params - ) + + response = @version.page('GET', @uri, params) + EventPage.new(@version, response, @solution) end ## # Retrieve a single page of EventInstance records from the API. @@ -222,21 +220,15 @@ @solution = {sid: sid, } @uri = "/Events/#{@solution[:sid]}" end ## - # Fetch a EventInstance + # Fetch the EventInstance # @return [EventInstance] Fetched EventInstance def fetch - params = Twilio::Values.of({}) + payload = @version.fetch('GET', @uri) - payload = @version.fetch( - 'GET', - @uri, - params, - ) - EventInstance.new(@version, payload, sid: @solution[:sid], ) end ## # Provide a user friendly representation @@ -380,10 +372,10 @@ def links @properties['links'] end ## - # Fetch a EventInstance + # Fetch the EventInstance # @return [EventInstance] Fetched EventInstance def fetch context.fetch end \ No newline at end of file