Class: PennyTel

Inherits:
Object
  • Object
show all
Defined in:
lib/pennytel.rb

Instance Method Summary collapse

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_entriesObject



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

#profileObject



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, message
  @penny_tel_api.sendSMS SendSMS.new(@username, @password, 1, number, message, Time.now)
end