pub struct OutboundResource { /* private fields */ }Expand description
Outbound lists & leads — /api/v2/outbound/lists.
Implementations§
Source§impl OutboundResource
impl OutboundResource
Sourcepub async fn lists(&self) -> Result<Vec<OutboundList>, ManagerError>
pub async fn lists(&self) -> Result<Vec<OutboundList>, ManagerError>
List the outbound lists.
Sourcepub async fn create_list(
&self,
body: CreateOutboundListRequest,
) -> Result<OutboundListItemResponse, ManagerError>
pub async fn create_list( &self, body: CreateOutboundListRequest, ) -> Result<OutboundListItemResponse, ManagerError>
Create an outbound list.
Sourcepub async fn clear_list(
&self,
id: &str,
) -> Result<OutboundListItemResponse, ManagerError>
pub async fn clear_list( &self, id: &str, ) -> Result<OutboundListItemResponse, ManagerError>
Clear all leads from an outbound list; returns the updated list.
Sourcepub async fn add_lead(
&self,
list_id: &str,
body: AddOutboundLeadRequest,
) -> Result<OutboundLeadItemResponse, ManagerError>
pub async fn add_lead( &self, list_id: &str, body: AddOutboundLeadRequest, ) -> Result<OutboundLeadItemResponse, ManagerError>
Add a lead to an outbound list.
Sourcepub async fn update_lead(
&self,
list_id: &str,
lead_id: &str,
body: AddOutboundLeadRequest,
) -> Result<OutboundLeadItemResponse, ManagerError>
pub async fn update_lead( &self, list_id: &str, lead_id: &str, body: AddOutboundLeadRequest, ) -> Result<OutboundLeadItemResponse, ManagerError>
Update a lead on an outbound list.
Sourcepub async fn delete_lead(
&self,
list_id: &str,
lead_id: &str,
) -> Result<(), ManagerError>
pub async fn delete_lead( &self, list_id: &str, lead_id: &str, ) -> Result<(), ManagerError>
Delete a lead from an outbound list.
Sourcepub async fn create_agent_call(
&self,
id: &str,
body: AgentOutboundCallRequest,
) -> Result<CallItemResponse, ManagerError>
pub async fn create_agent_call( &self, id: &str, body: AgentOutboundCallRequest, ) -> Result<CallItemResponse, ManagerError>
Place an outbound call on behalf of an agent.
Sourcepub async fn simple_reporting(&self) -> Result<Vec<ReportingCall>, ManagerError>
pub async fn simple_reporting(&self) -> Result<Vec<ReportingCall>, ManagerError>
The simple outbound call report, collecting every call across pages.
Sourcepub async fn attempts(&self) -> Result<Vec<CallAttempt>, ManagerError>
pub async fn attempts(&self) -> Result<Vec<CallAttempt>, ManagerError>
List outbound dial attempts, collecting every attempt across pages.
Sourcepub async fn leads(&self) -> Result<Vec<Lead>, ManagerError>
pub async fn leads(&self) -> Result<Vec<Lead>, ManagerError>
List outbound leads, collecting every lead across pages.
Sourcepub async fn processed_leads(&self) -> Result<Vec<Lead>, ManagerError>
pub async fn processed_leads(&self) -> Result<Vec<Lead>, ManagerError>
List processed outbound leads, collecting every lead across pages.
Sourcepub async fn get_list(
&self,
id: &str,
) -> Result<LeadListItemResponse, ManagerError>
pub async fn get_list( &self, id: &str, ) -> Result<LeadListItemResponse, ManagerError>
Get a single outbound list.
Sourcepub async fn update_list(
&self,
id: &str,
body: CreateListRequest,
) -> Result<LeadListItemResponse, ManagerError>
pub async fn update_list( &self, id: &str, body: CreateListRequest, ) -> Result<LeadListItemResponse, ManagerError>
Update an outbound list.
Sourcepub async fn delete_list(&self, id: &str) -> Result<(), ManagerError>
pub async fn delete_list(&self, id: &str) -> Result<(), ManagerError>
Delete an outbound list.
Sourcepub async fn bulk_delete_leads(
&self,
id: &str,
body: LeadBulkDeleteRequest,
) -> Result<DefaultV2MessageResponse, ManagerError>
pub async fn bulk_delete_leads( &self, id: &str, body: LeadBulkDeleteRequest, ) -> Result<DefaultV2MessageResponse, ManagerError>
Bulk-delete leads from an outbound list.
Sourcepub async fn bulk_delete_leads_alt(
&self,
id: &str,
body: LeadBulkDeleteRequest,
) -> Result<DefaultV2MessageResponse, ManagerError>
pub async fn bulk_delete_leads_alt( &self, id: &str, body: LeadBulkDeleteRequest, ) -> Result<DefaultV2MessageResponse, ManagerError>
Bulk-delete leads from an outbound list (alternate endpoint).
Sourcepub async fn get_lead(
&self,
list_id: &str,
lead_id: &str,
) -> Result<LeadItemResponse, ManagerError>
pub async fn get_lead( &self, list_id: &str, lead_id: &str, ) -> Result<LeadItemResponse, ManagerError>
Get a single lead from an outbound list.
Sourcepub async fn list_leads(
&self,
list_id: &str,
status: Option<DialStatus>,
format: Option<&str>,
) -> Result<PaginatedLeadResponse, ManagerError>
pub async fn list_leads( &self, list_id: &str, status: Option<DialStatus>, format: Option<&str>, ) -> Result<PaginatedLeadResponse, ManagerError>
List the leads in an outbound list, optionally filtered by dial status and format.
Sourcepub async fn upload_leads(
&self,
id: &str,
file: PathBuf,
mapping: Option<&str>,
separator: Option<&str>,
clear: Option<bool>,
) -> Result<LeadUploadResponse, ManagerError>
pub async fn upload_leads( &self, id: &str, file: PathBuf, mapping: Option<&str>, separator: Option<&str>, clear: Option<bool>, ) -> Result<LeadUploadResponse, ManagerError>
Upload leads to an outbound list from a CSV file.
Sourcepub async fn upload_leads_bytes(
&self,
id: &str,
file_name: &str,
csv: Vec<u8>,
mapping: Option<&str>,
separator: Option<&str>,
clear: Option<bool>,
) -> Result<LeadUploadResponse, ManagerError>
pub async fn upload_leads_bytes( &self, id: &str, file_name: &str, csv: Vec<u8>, mapping: Option<&str>, separator: Option<&str>, clear: Option<bool>, ) -> Result<LeadUploadResponse, ManagerError>
Upload leads to an outbound list from in-memory CSV bytes — the same multipart request as
upload_leads without a file on disk (lead CSVs carry PII; callers
holding the content in memory shouldn’t have to write it out to upload it).