class Twilio::TwiML::MessagingResponse
<Response> TwiML
for Messages
Public Class Methods
new(**keyword_args) { |self| ... }
click to toggle source
Calls superclass method
# File lib/twilio-ruby/twiml/messaging_response.rb 14 def initialize(**keyword_args) 15 super(**keyword_args) 16 @name = 'Response' 17 18 yield(self) if block_given? 19 end
Public Instance Methods
message(body: nil, to: nil, from: nil, action: nil, method: nil, status_callback: nil, **keyword_args) { |message| ... }
click to toggle source
Create a new <Message> element
- body
- to
- from
- action
-
Action URL
- method
-
Action URL Method
- status_callback
-
Status callback URL. Deprecated in favor of action.
- keyword_args
-
additional attributes
# File lib/twilio-ruby/twiml/messaging_response.rb 30 def message(body: nil, to: nil, from: nil, action: nil, method: nil, status_callback: nil, **keyword_args) 31 message = Message.new(body: body, to: to, from: from, action: action, method: method, status_callback: status_callback, **keyword_args) 32 33 yield(message) if block_given? 34 append(message) 35 end
redirect(url, method: nil, **keyword_args)
click to toggle source