use of com.amazon.speech.slu.Slot in project amos-ss17-alexa by c-i-ber.
the class SavingsPlanService method saveMonthlyPaymentAndContinue.
private SpeechletResponse saveMonthlyPaymentAndContinue(Intent intent, Session session) {
// Amount may either be basic amount or monthly payment amount, so we
// have to check first, if basic amount has already been set in the session.
// (Whole process must be sequential)
Map<String, Slot> slots = intent.getSlots();
Slot amountSlot = slots.get(NUMBER_SLOT_KEY);
// In this case amount slot contains monthly payment amount
String monthlyPayment = amountSlot.getValue();
LOGGER.info("MonthlyPayment: " + monthlyPayment);
session.setAttribute(MONTHLY_PAYMENT_KEY, monthlyPayment);
return getCalculatedSavingsPlanInfo(session);
}
use of com.amazon.speech.slu.Slot in project amos-ss17-alexa by c-i-ber.
the class SavingsPlanService method saveBasicAmountAndContinue.
private SpeechletResponse saveBasicAmountAndContinue(Intent intent, Session session) {
// Amount may either be basic amount or monthly payment amount, so we
// have to check first, if basic amount has already been set in the session.
// (Whole process must be sequential)
Map<String, Slot> slots = intent.getSlots();
Slot amountSlot = slots.get(NUMBER_SLOT_KEY);
// In this case amount slot contains basic amount
String basicAmount = amountSlot.getValue();
LOGGER.info("BasicAmount: " + basicAmount);
session.setAttribute(BASIC_AMOUNT_KEY, basicAmount);
if (session.getAttribute(DURATION_KEY) != null) {
return getCalculatedSavingsPlanInfo(session);
} else {
return askForDuration(session);
}
}
Aggregations