Class: PennyTel
- Inherits:
-
Object
- Object
- PennyTel
- Defined in:
- lib/pennytel.rb
Instance Method Summary collapse
- #address_book_entries ⇒ Object
- #call(from, to) ⇒ Object
-
#initialize(username, password) ⇒ PennyTel
constructor
A new instance of PennyTel.
- #profile ⇒ Object
- #send_sms(number, message) ⇒ Object
Constructor Details
#initialize(username, password) ⇒ PennyTel
7 8 9 10 |
# File 'lib/pennytel.rb', line 7 def initialize username, password @username, @password = username, password @penny_tel_api = PennyTelAPI.new end |
Instance Method Details
#address_book_entries ⇒ Object
20 21 22 |
# File 'lib/pennytel.rb', line 20 def address_book_entries @penny_tel_api.getAddressBookEntries GetAddressBookEntries.new(@username, @password, '%') end |
#call(from, to) ⇒ Object
16 17 18 |
# File 'lib/pennytel.rb', line 16 def call from, to @penny_tel_api.triggerCallback TriggerCallback.new(@username, @password, from, to, Time.now) end |
#profile ⇒ Object
24 25 26 |
# File 'lib/pennytel.rb', line 24 def profile @penny_tel_api.getProfile GetProfile.new(@username, @password) end |
#send_sms(number, message) ⇒ Object
12 13 14 |
# File 'lib/pennytel.rb', line 12 def send_sms number, @penny_tel_api.sendSMS SendSMS.new(@username, @password, 1, number, , Time.now) end |