lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb in twilio-ruby-7.1.1 vs lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb in twilio-ruby-7.2.0

- old
+ new

@@ -45,12 +45,13 @@ data = Twilio::Values.of({ 'FriendlyName' => friendly_name, 'Available' => available, }) + headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) - payload = @version.create('POST', @uri, data: data) + payload = @version.create('POST', @uri, data: data, headers: headers) ActivityInstance.new( @version, payload, workspace_sid: @solution[:workspace_sid], ) @@ -181,21 +182,23 @@ ## # Delete the ActivityInstance # @return [Boolean] True if delete succeeds, false otherwise def delete + headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) - @version.delete('DELETE', @uri) + @version.delete('DELETE', @uri, headers: headers) end ## # Fetch the ActivityInstance # @return [ActivityInstance] Fetched ActivityInstance def fetch + headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) - payload = @version.fetch('GET', @uri) + payload = @version.fetch('GET', @uri, headers: headers) ActivityInstance.new( @version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid], @@ -212,11 +215,12 @@ data = Twilio::Values.of({ 'FriendlyName' => friendly_name, }) + headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) - payload = @version.update('POST', @uri, data: data) + payload = @version.update('POST', @uri, data: data, headers: headers) ActivityInstance.new( @version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid],