Class: SmstoolsApi::VoiceMessages

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ VoiceMessages

Returns a new instance of VoiceMessages.



5
6
7
# File 'lib/smstools_api/voice_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/voice_messages.rb', line 3

def client
  @client
end

Instance Method Details

#create(message:, to:, sender:, date: nil, reference: nil, language: nil, gender: nil, test: false) ⇒ Object



9
10
11
# File 'lib/smstools_api/voice_messages.rb', line 9

def create(message:, to:, sender:, date: nil, reference: nil, language: nil, gender: nil, test: false)
  @client.post('voice/send', to: to, message: message, sender: sender)
end