lib/twilio-ruby/rest/conversations/v1/service/role.rb in twilio-ruby-7.1.1 vs lib/twilio-ruby/rest/conversations/v1/service/role.rb in twilio-ruby-7.2.0
- old
+ new
@@ -48,12 +48,13 @@
'FriendlyName' => friendly_name,
'Type' => type,
'Permission' => Twilio.serialize_list(permission) { |e| e },
})
+ 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)
RoleInstance.new(
@version,
payload,
chat_service_sid: @solution[:chat_service_sid],
)
@@ -172,21 +173,23 @@
##
# Delete the RoleInstance
# @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 RoleInstance
# @return [RoleInstance] Fetched RoleInstance
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)
RoleInstance.new(
@version,
payload,
chat_service_sid: @solution[:chat_service_sid],
sid: @solution[:sid],
@@ -203,11 +206,12 @@
data = Twilio::Values.of({
'Permission' => Twilio.serialize_list(permission) { |e| e },
})
+ 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)
RoleInstance.new(
@version,
payload,
chat_service_sid: @solution[:chat_service_sid],
sid: @solution[:sid],