Class: SevenApi::Resources::Voice

Inherits:
SevenApi::Resource show all
Defined in:
lib/seven_api/resources/voice.rb

Constant Summary

Constants inherited from SevenApi::Resource

SevenApi::Resource::BASE_PATH

Instance Attribute Summary

Attributes inherited from SevenApi::Resource

#api_key, #builder, #conn, #endpoint, #http_methods, #request_methods, #sent_with

Instance Method Summary collapse

Methods inherited from SevenApi::Resource

get_endpoint, get_http_methods, #initialize

Constructor Details

This class inherits a constructor from SevenApi::Resource

Instance Method Details

#hangup(call_id) ⇒ Object

This endpoint ends an active call. Only calls with the status in-progress can be ended. read more: docs.seven.io/en/rest-api/endpoints/voice#hangup-a-call

Parameters:

  • call_id (String)

Returns:

  • Hash



18
19
20
# File 'lib/seven_api/resources/voice.rb', line 18

def hangup(call_id)
  request(:post, {}, {}, "/#{call_id}/hangup")
end

#send(params) ⇒ String, Hash

Convert text to speech, call number and read voice message out loud. read more: docs.seven.io/en/rest-api/endpoints/voice#send-voice-call

Parameters:

  • params (Hash)

Returns:

  • (String, Hash)


26
27
28
# File 'lib/seven_api/resources/voice.rb', line 26

def send(params)
  request(:post, params)
end