Back to Parent

def send_to_twilio input_responses
	# Build a twilio response object 

	response = Twilio::TwiML::MessagingResponse.new
	input_responses.each do |individual_response|
		response.message do |message|
			unless individual_response[0].nil?
				message.body(individual_response[0])
			end
			unless individual_response[1].nil?
				message.media(individual_response[1])
	  		end
		end
	end
	# send a response to twilio 

	content_type 'text/xml'
	response.to_s
end
Click to Expand

Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!

0