Getting Hands On With Adhearsion
https://github.com/mojolingo/EuRuKo2011
- Ben Langfeld
- Adhearsion Core Team
- ben@langfeld.me
- Twitter/Github: @benlangfeld
space, → | next slide |
← | previous slide |
d | debug mode |
## <ret> | go to slide # |
c | table of contents (vi) |
f | toggle footer |
r | reload slides |
z | toggle help (this) |
collection {
play "welcome"
pin = input 6, :play => "please-enter-your-pin"
this_customer = Customer.find_by_pin(pin)
if this_customer
if this_customer.delinquent?
play "sorry", "you-have-outstanding-debts"
menu "would-you-like-to-make-a-payment", :tries => 3 do |option|
option.add_credit 1
option.delinquent 2
option.on_failure do
play "you-did-not-make-a-valid-selection"
+customer_service
end
end
else
+account_admin
end
else
play "we-could-not-find-that-customer-record"
hangup
end
}