lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb in twilio-ruby-7.1.1 vs lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb in twilio-ruby-7.2.0
- old
+ new
@@ -49,12 +49,13 @@
'FriendlyName' => friendly_name,
'ActivitySid' => activity_sid,
'Attributes' => attributes,
})
+ 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)
WorkerInstance.new(
@version,
payload,
workspace_sid: @solution[:workspace_sid],
)
@@ -235,22 +236,23 @@
# @return [Boolean] True if delete succeeds, false otherwise
def delete(
if_match: :unset
)
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'If-Match' => if_match, })
- headers = Twilio::Values.of({ 'If-Match' => if_match, })
@version.delete('DELETE', @uri, headers: headers)
end
##
# Fetch the WorkerInstance
# @return [WorkerInstance] Fetched WorkerInstance
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)
WorkerInstance.new(
@version,
payload,
workspace_sid: @solution[:workspace_sid],
sid: @solution[:sid],
@@ -278,11 +280,11 @@
'Attributes' => attributes,
'FriendlyName' => friendly_name,
'RejectPendingReservations' => reject_pending_reservations,
})
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'If-Match' => if_match, })
- headers = Twilio::Values.of({ 'If-Match' => if_match, })
payload = @version.update('POST', @uri, data: data, headers: headers)
WorkerInstance.new(
@version,
payload,
workspace_sid: @solution[:workspace_sid],