Class: MerlinGateway::Client
- Inherits:
-
Object
- Object
- MerlinGateway::Client
- Defined in:
- lib/merlin_gateway/client.rb
Instance Attribute Summary collapse
-
#access_number ⇒ Object
Returns the value of attribute access_number.
-
#country ⇒ Object
Returns the value of attribute country.
-
#password ⇒ Object
Returns the value of attribute password.
-
#sender_number ⇒ Object
Returns the value of attribute sender_number.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #new_message(target_number, message, options = {}) ⇒ Object
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
6 7 8 9 10 11 12 |
# File 'lib/merlin_gateway/client.rb', line 6 def initialize() @username = [:username] @password = [:password] @access_number = [:access_number] || '2210' @sender_number = [:sender_number] || @access_number @country = [:country] || 'NO' end |
Instance Attribute Details
#access_number ⇒ Object
Returns the value of attribute access_number.
4 5 6 |
# File 'lib/merlin_gateway/client.rb', line 4 def access_number @access_number end |
#country ⇒ Object
Returns the value of attribute country.
4 5 6 |
# File 'lib/merlin_gateway/client.rb', line 4 def country @country end |
#password ⇒ Object
Returns the value of attribute password.
4 5 6 |
# File 'lib/merlin_gateway/client.rb', line 4 def password @password end |
#sender_number ⇒ Object
Returns the value of attribute sender_number.
4 5 6 |
# File 'lib/merlin_gateway/client.rb', line 4 def sender_number @sender_number end |
#username ⇒ Object
Returns the value of attribute username.
4 5 6 |
# File 'lib/merlin_gateway/client.rb', line 4 def username @username end |
Instance Method Details
#new_message(target_number, message, options = {}) ⇒ Object
14 15 16 |
# File 'lib/merlin_gateway/client.rb', line 14 def (target_number, , ={}) ::MerlinGateway::SmsMessage.new(target_number, , .merge({:client => self})) end |