lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb in twilio-ruby-7.1.1 vs lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb in twilio-ruby-7.2.0
- old
+ new
@@ -67,12 +67,13 @@
'CnamLookupEnabled' => cnam_lookup_enabled,
'ConnectionPolicySid' => connection_policy_sid,
'FromDomainSid' => from_domain_sid,
})
+ 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)
ByocTrunkInstance.new(
@version,
payload,
)
end
@@ -189,21 +190,23 @@
##
# Delete the ByocTrunkInstance
# @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 ByocTrunkInstance
# @return [ByocTrunkInstance] Fetched ByocTrunkInstance
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)
ByocTrunkInstance.new(
@version,
payload,
sid: @solution[:sid],
)
@@ -246,11 +249,12 @@
'CnamLookupEnabled' => cnam_lookup_enabled,
'ConnectionPolicySid' => connection_policy_sid,
'FromDomainSid' => from_domain_sid,
})
+ 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)
ByocTrunkInstance.new(
@version,
payload,
sid: @solution[:sid],
)