lib/twilio-ruby/rest/api/v2010/account/message/media.rb in twilio-ruby-5.38.0 vs lib/twilio-ruby/rest/api/v2010/account/message/media.rb in twilio-ruby-5.39.0

- old
+ new

@@ -112,15 +112,13 @@ 'DateCreated>' => Twilio.serialize_iso8601_datetime(date_created_after), 'PageToken' => page_token, 'Page' => page_number, 'PageSize' => page_size, }) - response = @version.page( - 'GET', - @uri, - params - ) + + response = @version.page('GET', @uri, params) + MediaPage.new(@version, response, @solution) end ## # Retrieve a single page of MediaInstance records from the API. @@ -195,28 +193,22 @@ @solution = {account_sid: account_sid, message_sid: message_sid, sid: sid, } @uri = "/Accounts/#{@solution[:account_sid]}/Messages/#{@solution[:message_sid]}/Media/#{@solution[:sid]}.json" end ## - # Deletes the MediaInstance + # Delete the MediaInstance # @return [Boolean] true if delete succeeds, false otherwise def delete - @version.delete('delete', @uri) + @version.delete('DELETE', @uri) end ## - # Fetch a MediaInstance + # Fetch the MediaInstance # @return [MediaInstance] Fetched MediaInstance def fetch - params = Twilio::Values.of({}) + payload = @version.fetch('GET', @uri) - payload = @version.fetch( - 'GET', - @uri, - params, - ) - MediaInstance.new( @version, payload, account_sid: @solution[:account_sid], message_sid: @solution[:message_sid], @@ -332,17 +324,17 @@ def uri @properties['uri'] end ## - # Deletes the MediaInstance + # Delete the MediaInstance # @return [Boolean] true if delete succeeds, false otherwise def delete context.delete end ## - # Fetch a MediaInstance + # Fetch the MediaInstance # @return [MediaInstance] Fetched MediaInstance def fetch context.fetch end \ No newline at end of file