Class: Revox::Resources::Call
- Inherits:
-
Object
- Object
- Revox::Resources::Call
- Defined in:
- lib/revox/resources/call.rb,
sig/revox/resources/call.rbs
Instance Method Summary collapse
-
#create(phone_number:, assistant: nil, assistant_id: nil, concurrency: nil, force_now: nil, from_phone_number: nil, metadata: nil, prompt_variables: nil, scheduled_at: nil, request_options: {}) ⇒ Revox::Models::CallCreateResponse
Some parameter documentations has been truncated, see Models::CallCreateParams for more details.
-
#initialize(client:) ⇒ Call
constructor
private
A new instance of Call.
-
#retrieve(id, request_options: {}) ⇒ Revox::Models::CallRetrieveResponse
Retrieve the full details of a call order by its unique ID.
Constructor Details
#initialize(client:) ⇒ Call
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Call.
78 79 80 |
# File 'lib/revox/resources/call.rb', line 78 def initialize(client:) @client = client end |
Instance Method Details
#create(phone_number:, assistant: nil, assistant_id: nil, concurrency: nil, force_now: nil, from_phone_number: nil, metadata: nil, prompt_variables: nil, scheduled_at: nil, request_options: {}) ⇒ Revox::Models::CallCreateResponse
Some parameter documentations has been truncated, see Models::CallCreateParams for more details.
Place a new outbound call order. Provide either an existing assistant ID or a custom assistant configuration. The call can be scheduled for a specific time or started immediately. A single call order may be resolved over multiple call attempts spanning up to a few days, with automatic retries when voicemail is detected. You can also set concurrency limits and pass prompt variables for dynamic personalization.
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/revox/resources/call.rb', line 41 def create(params) parsed, = Revox::CallCreateParams.dump_request(params) @client.request( method: :post, path: "call", body: parsed, model: Revox::Models::CallCreateResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ Revox::Models::CallRetrieveResponse
Retrieve the full details of a call order by its unique ID. The response includes the call status, call attempts, transcript, recording URL, timestamps, and metadata. Use this endpoint to poll for call completion or inspect results after a call has finished.
66 67 68 69 70 71 72 73 |
# File 'lib/revox/resources/call.rb', line 66 def retrieve(id, params = {}) @client.request( method: :get, path: ["call/%1$s", id], model: Revox::Models::CallRetrieveResponse, options: params[:request_options] ) end |