Class: Bulksms::Configuration
- Inherits:
-
Object
- Object
- Bulksms::Configuration
- Defined in:
- lib/bulksms/configuration.rb
Instance Attribute Summary collapse
-
#country ⇒ Object
Set the country code when no host has been provided.
-
#credits_path ⇒ Object
Path added to host to request credits.
-
#host ⇒ Object
Overide the default host config so that a short name will be converted into a full hostname.
-
#message_class ⇒ Object
Message Class, 0 (Flash SMS), 1, 2 (default, normal SMS, stored to SIM card), 3.
-
#message_path ⇒ Object
Path added to host to send a message Known as send_sms method in BulkSMS API.
-
#password ⇒ Object
Returns the value of attribute password.
-
#port ⇒ Object
Returns the value of attribute port.
-
#routing_group ⇒ Object
Routing group, possible values are 1, 2, 3.
-
#username ⇒ Object
Standard connection details.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
29 30 31 32 33 34 35 36 37 |
# File 'lib/bulksms/configuration.rb', line 29 def initialize # Prepare default options self.country = :international self.port = 5567 self. = "/eapi/submission/send_sms/2/2.0" self.credits_path = "/eapi/user/get_credits/1/1.1" self. = 2 self.routing_group = 2 end |
Instance Attribute Details
#country ⇒ Object
Set the country code when no host has been provided. Should be one of:
:uk, :usa, :safrica, :spain, :international (default)
14 15 16 |
# File 'lib/bulksms/configuration.rb', line 14 def country @country end |
#credits_path ⇒ Object
Path added to host to request credits
21 22 23 |
# File 'lib/bulksms/configuration.rb', line 21 def credits_path @credits_path end |
#host ⇒ Object
Overide the default host config so that a short name will be converted into a full hostname.
41 42 43 |
# File 'lib/bulksms/configuration.rb', line 41 def host @host end |
#message_class ⇒ Object
Message Class, 0 (Flash SMS), 1, 2 (default, normal SMS, stored to SIM card), 3.
24 25 26 |
# File 'lib/bulksms/configuration.rb', line 24 def @message_class end |
#message_path ⇒ Object
Path added to host to send a message Known as send_sms method in BulkSMS API.
18 19 20 |
# File 'lib/bulksms/configuration.rb', line 18 def @message_path end |
#password ⇒ Object
Returns the value of attribute password.
7 8 9 |
# File 'lib/bulksms/configuration.rb', line 7 def password @password end |
#port ⇒ Object
Returns the value of attribute port.
9 10 11 |
# File 'lib/bulksms/configuration.rb', line 9 def port @port end |
#routing_group ⇒ Object
Routing group, possible values are 1, 2, 3
27 28 29 |
# File 'lib/bulksms/configuration.rb', line 27 def routing_group @routing_group end |
#username ⇒ Object
Standard connection details
6 7 8 |
# File 'lib/bulksms/configuration.rb', line 6 def username @username end |