Class: SmstoolsApi::VoiceMessages
- Inherits:
-
Object
- Object
- SmstoolsApi::VoiceMessages
- Defined in:
- lib/smstools_api/voice_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, language: nil, gender: nil, test: false) ⇒ Object
-
#initialize(client) ⇒ VoiceMessages
constructor
A new instance of VoiceMessages.
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
#client ⇒ Object (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: , sender: sender) end |