Class: SmstoolsApi::Messages
- Inherits:
-
Object
- Object
- SmstoolsApi::Messages
- Defined in:
- lib/smstools_api/messages.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #create(message:, to:, sender:, date: nil, reference: nil, test: false, subid: nil) ⇒ Object
-
#initialize(client) ⇒ Messages
constructor
A new instance of Messages.
Constructor Details
#initialize(client) ⇒ Messages
Returns a new instance of Messages.
5 6 7 |
# File 'lib/smstools_api/messages.rb', line 5 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
3 4 5 |
# File 'lib/smstools_api/messages.rb', line 3 def client @client end |
Instance Method Details
#create(message:, to:, sender:, date: nil, reference: nil, test: false, subid: nil) ⇒ Object
9 10 11 |
# File 'lib/smstools_api/messages.rb', line 9 def create(message:, to:, sender:, date: nil, reference: nil, test: false, subid: nil) @client.post('message/send', to: to, message: , sender: sender) end |