pub struct CallsResource {
pub reporting: ReportingResource,
/* private fields */
}Expand description
Call reporting and call control — /api/v2/calls, with a nested reporting sub-resource.
Fields§
§reporting: ReportingResourceCall reporting — /api/v2/calls/reporting.
Implementations§
Source§impl CallsResource
impl CallsResource
Sourcepub async fn get_raw(&self, id: &str) -> Result<Value, ManagerError>
pub async fn get_raw(&self, id: &str) -> Result<Value, ManagerError>
Get a single call by id as raw JSON (the full item-response envelope). The typed
Self::get can fail on real payloads — the generated models are stricter than the live
API (e.g. bridged.queueId is a required UUID in the model but null for agent-bridged calls).
Sourcepub async fn get(&self, id: &str) -> Result<CallItemResponse, ManagerError>
pub async fn get(&self, id: &str) -> Result<CallItemResponse, ManagerError>
Get a single call by id.
Sourcepub async fn hangup(&self, id: &str) -> Result<CallItemResponse, ManagerError>
pub async fn hangup(&self, id: &str) -> Result<CallItemResponse, ManagerError>
Hang up a live call; returns the updated call.
Sourcepub async fn hangup_raw(&self, id: &str) -> Result<Value, ManagerError>
pub async fn hangup_raw(&self, id: &str) -> Result<Value, ManagerError>
Hang up a live call; returns the updated call as raw JSON. The typed Self::hangup
decodes CallItemResponse, which breaks on live agent-bridged calls (bridged.queueId is
a required UUID in the model but null in production) — and a just-hung-up bridged call is
the common case for this endpoint.
Sourcepub async fn create_test_call(
&self,
body: CreateTestCallRequest,
) -> Result<CallItemResponse, ManagerError>
pub async fn create_test_call( &self, body: CreateTestCallRequest, ) -> Result<CallItemResponse, ManagerError>
Create an inbound test call.
Sourcepub async fn set_session_variables(
&self,
id: &str,
variables: SetCallSessionVariablesRequest,
) -> Result<SetCallSessionVariablesResponse, ManagerError>
pub async fn set_session_variables( &self, id: &str, variables: SetCallSessionVariablesRequest, ) -> Result<SetCallSessionVariablesResponse, ManagerError>
Set session variables on a call.
Sourcepub async fn cancel(&self, id: &str) -> Result<CallItemResponse, ManagerError>
pub async fn cancel(&self, id: &str) -> Result<CallItemResponse, ManagerError>
Cancel a queued or scheduled call; returns the updated call.
Sourcepub async fn list_queued(
&self,
queue_id: &str,
) -> Result<Vec<QueuedCall>, ManagerError>
pub async fn list_queued( &self, queue_id: &str, ) -> Result<Vec<QueuedCall>, ManagerError>
List the calls waiting in a queue, collecting every call across pages.
Sourcepub async fn queue_callback(
&self,
queue_id: &str,
body: QueueCallbackRequest,
) -> Result<QueueCallbackResponse, ManagerError>
pub async fn queue_callback( &self, queue_id: &str, body: QueueCallbackRequest, ) -> Result<QueueCallbackResponse, ManagerError>
Request a callback for a caller waiting in a queue.