lib/twilio-ruby/rest/trunking/v1/trunk.rb in twilio-ruby-7.1.1 vs lib/twilio-ruby/rest/trunking/v1/trunk.rb in twilio-ruby-7.2.0
- old
+ new
@@ -61,12 +61,13 @@
'Secure' => secure,
'CnamLookupEnabled' => cnam_lookup_enabled,
'TransferCallerId' => transfer_caller_id,
})
+ 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)
TrunkInstance.new(
@version,
payload,
)
end
@@ -188,21 +189,23 @@
##
# Delete the TrunkInstance
# @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 TrunkInstance
# @return [TrunkInstance] Fetched TrunkInstance
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)
TrunkInstance.new(
@version,
payload,
sid: @solution[:sid],
)
@@ -239,11 +242,12 @@
'Secure' => secure,
'CnamLookupEnabled' => cnam_lookup_enabled,
'TransferCallerId' => transfer_caller_id,
})
+ 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)
TrunkInstance.new(
@version,
payload,
sid: @solution[:sid],
)