Class: AfricasTalking::Initialize

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(username, apikey) ⇒ Initialize

Returns a new instance of Initialize.



14
15
16
17
# File 'lib/AfricasTalking.rb', line 14

def initialize username, apikey
	@username    = username
	@apikey      = apikey 
end

Instance Attribute Details

#apikeyObject

Returns the value of attribute apikey.



13
14
15
# File 'lib/AfricasTalking.rb', line 13

def apikey
  @apikey
end

#usernameObject

Returns the value of attribute username.



13
14
15
# File 'lib/AfricasTalking.rb', line 13

def username
  @username
end

Instance Method Details

#airtimeObject



27
28
29
# File 'lib/AfricasTalking.rb', line 27

def airtime
	return Airtime.new @username, @apikey
end

#applicationObject



39
40
41
# File 'lib/AfricasTalking.rb', line 39

def application
	return Application.new @username, @apikey
end

#paymentsObject



23
24
25
# File 'lib/AfricasTalking.rb', line 23

def payments
	return Payments.new @username, @apikey
end

#smsObject



19
20
21
# File 'lib/AfricasTalking.rb', line 19

def sms
	return Sms.new @username, @apikey		
end

#tokenObject



35
36
37
# File 'lib/AfricasTalking.rb', line 35

def token
	return Token.new @username, @apikey
end

#voiceObject



31
32
33
# File 'lib/AfricasTalking.rb', line 31

def voice
	return Voice.new @username, @apikey
end