Class: SmstoolsApi::Messages

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#clientObject (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: message, sender: sender)
end