AutomatedSurvey.Web.Domain.Response.AddRecordOrGatherCommands C# (CSharp) Method

AddRecordOrGatherCommands() private method

private AddRecordOrGatherCommands ( Twilio.TwiML.TwilioResponse response ) : void
response Twilio.TwiML.TwilioResponse
return void
        private void AddRecordOrGatherCommands(TwilioResponse response)
        {
            var questionType = _question.Type;
            switch (questionType)
            {
                case QuestionType.Voice:
                    response.Record(new { action = GenerateUrl(_question) });
                    break;
                case QuestionType.Numeric:
                case QuestionType.YesNo:
                    response.Gather(new { action = GenerateUrl(_question) });
                    break;
            }
        }