pub struct CampaignsResource { /* private fields */ }Expand description
Outbound campaigns — /api/v2/outbound/campaigns.
Implementations§
Source§impl CampaignsResource
impl CampaignsResource
Sourcepub async fn list(&self) -> Result<Vec<OutboundCampaign>, ManagerError>
pub async fn list(&self) -> Result<Vec<OutboundCampaign>, ManagerError>
List the outbound campaigns.
Sourcepub async fn create(
&self,
body: CreateCampaignRequest,
) -> Result<OutboundCampaignItemResponse, ManagerError>
pub async fn create( &self, body: CreateCampaignRequest, ) -> Result<OutboundCampaignItemResponse, ManagerError>
Create a campaign.
Sourcepub async fn get(
&self,
id: &str,
) -> Result<OutboundCampaignItemResponse, ManagerError>
pub async fn get( &self, id: &str, ) -> Result<OutboundCampaignItemResponse, ManagerError>
Get a campaign by id.
Sourcepub async fn update(
&self,
id: &str,
body: UpdateCampaignRequest,
) -> Result<OutboundCampaignItemResponse, ManagerError>
pub async fn update( &self, id: &str, body: UpdateCampaignRequest, ) -> Result<OutboundCampaignItemResponse, ManagerError>
Update a campaign.
Sourcepub async fn attempts(
&self,
id: &str,
number: Option<&str>,
) -> Result<PaginatedAttemptResponse, ManagerError>
pub async fn attempts( &self, id: &str, number: Option<&str>, ) -> Result<PaginatedAttemptResponse, ManagerError>
List the dial attempts for a campaign, optionally filtered by phone number.
Sourcepub async fn hopper(
&self,
id: &str,
) -> Result<CampaignHopperResponse, ManagerError>
pub async fn hopper( &self, id: &str, ) -> Result<CampaignHopperResponse, ManagerError>
Get the hopper (queued leads) of a campaign.
Sourcepub async fn leads(
&self,
id: &str,
) -> Result<PaginatedLeadResponse, ManagerError>
pub async fn leads( &self, id: &str, ) -> Result<PaginatedLeadResponse, ManagerError>
List the leads of a campaign.
Sourcepub async fn processed_leads(
&self,
id: &str,
) -> Result<PaginatedLeadResponse, ManagerError>
pub async fn processed_leads( &self, id: &str, ) -> Result<PaginatedLeadResponse, ManagerError>
List the processed leads of a campaign.
Sourcepub async fn get_list(
&self,
id: &str,
) -> Result<LeadListItemResponse, ManagerError>
pub async fn get_list( &self, id: &str, ) -> Result<LeadListItemResponse, ManagerError>
Get the lead list assigned to a campaign.
Sourcepub async fn set_list(
&self,
id: &str,
body: SetCampaignListRequest,
) -> Result<CampaignItemResponse, ManagerError>
pub async fn set_list( &self, id: &str, body: SetCampaignListRequest, ) -> Result<CampaignItemResponse, ManagerError>
Set the lead list of a campaign.
Sourcepub async fn unset_list(
&self,
id: &str,
) -> Result<CampaignItemResponse, ManagerError>
pub async fn unset_list( &self, id: &str, ) -> Result<CampaignItemResponse, ManagerError>
Unset (detach) the lead list of a campaign.
Sourcepub async fn set_list_by_id(
&self,
id: &str,
list_id: &str,
) -> Result<CampaignItemResponse, ManagerError>
pub async fn set_list_by_id( &self, id: &str, list_id: &str, ) -> Result<CampaignItemResponse, ManagerError>
Set the lead list of a campaign by list id.
Sourcepub async fn logout_all_agents(
&self,
id: &str,
) -> Result<DefaultV2MessageResponse, ManagerError>
pub async fn logout_all_agents( &self, id: &str, ) -> Result<DefaultV2MessageResponse, ManagerError>
Log out all agents currently assigned to a campaign.
Sourcepub async fn statistics(
&self,
id: &str,
from: Option<i32>,
to: Option<i32>,
) -> Result<CampaignStatisticsResponse, ManagerError>
pub async fn statistics( &self, id: &str, from: Option<i32>, to: Option<i32>, ) -> Result<CampaignStatisticsResponse, ManagerError>
Get the statistics of a campaign, optionally bounded by a from/to time range.
Sourcepub async fn status(
&self,
id: &str,
) -> Result<CampaignRealtimeStatusResponse, ManagerError>
pub async fn status( &self, id: &str, ) -> Result<CampaignRealtimeStatusResponse, ManagerError>
Get the realtime status of a campaign.
Auto Trait Implementations§
impl !RefUnwindSafe for CampaignsResource
impl !UnwindSafe for CampaignsResource
impl Freeze for CampaignsResource
impl Send for CampaignsResource
impl Sync for CampaignsResource
impl Unpin for CampaignsResource
impl UnsafeUnpin for CampaignsResource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more