lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb in twilio-ruby-7.1.1 vs lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb in twilio-ruby-7.2.0

- old
+ new

@@ -61,12 +61,13 @@ 'FriendlyName' => friendly_name, 'Recurring' => recurring, 'TriggerBy' => trigger_by, }) + 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) TriggerInstance.new( @version, payload, account_sid: @solution[:account_sid], ) @@ -203,21 +204,23 @@ ## # Delete the TriggerInstance # @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 TriggerInstance # @return [TriggerInstance] Fetched TriggerInstance 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) TriggerInstance.new( @version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid], @@ -240,11 +243,12 @@ 'CallbackMethod' => callback_method, 'CallbackUrl' => callback_url, 'FriendlyName' => friendly_name, }) + 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) TriggerInstance.new( @version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],