Closed ni3t closed 3 years ago
I am happy to make a contribution to sidestep the lowerCamelCase step if the argument is target_task
.
Hello @ni3t,
Thank you for the detailed report and associated PR! We have your PR on our backlog for review.
This is not a change that can be made in the library. An internal ticket has been filed against the relevant product team (reference ID UN-2070).
Issue Summary
When connecting a call to Autopilot, using this example code to call a customer, make an introduction, then redirect to an autopilot action to handle customer input, I get an error in the twilio console.
the error in the console is this:
Msg | "XML Validation warning" line | "4" parserMessage | " Attribute 'targetTask' is not allowed to appear in element 'Autopilot'." ErrorCode | "12200" cols | "78" url | "" LogLevel | "WARN"
My guess is this is due to the code here: https://github.com/twilio/twilio-ruby/blob/7e218c44288b8a0954e141dfc5c8e99b5f63ffa6/lib/twilio-ruby/twiml/twiml.rb#L44
it looks like the keyword args are automatically lowerCamelCased, which is causing the keyword arg
target_task
to be passed along astargetTask
, instead of the expectedTargetTask
.If I construct the relevant TwiML by hand and pass the attr in as
TargetTask
i get the expected behavior.Technical details: