lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb in twilio-ruby-7.1.1 vs lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb in twilio-ruby-7.2.0
- old
+ new
@@ -54,12 +54,13 @@
'Enabled' => enabled,
'FriendlyName' => friendly_name,
'SipUrl' => sip_url,
})
+ 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)
OriginationUrlInstance.new(
@version,
payload,
trunk_sid: @solution[:trunk_sid],
)
@@ -178,21 +179,23 @@
##
# Delete the OriginationUrlInstance
# @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 OriginationUrlInstance
# @return [OriginationUrlInstance] Fetched OriginationUrlInstance
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)
OriginationUrlInstance.new(
@version,
payload,
trunk_sid: @solution[:trunk_sid],
sid: @solution[:sid],
@@ -221,11 +224,12 @@
'Enabled' => enabled,
'FriendlyName' => friendly_name,
'SipUrl' => sip_url,
})
+ 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)
OriginationUrlInstance.new(
@version,
payload,
trunk_sid: @solution[:trunk_sid],
sid: @solution[:sid],