pub struct CaseClient { /* private fields */ }Expand description
Calls CaseService.
Support cases: an organization’s questions and problems, and where each one stands.
Implementations§
Source§impl CaseClient
impl CaseClient
Sourcepub fn new(client: &Client) -> Self
pub fn new(client: &Client) -> Self
Returns a client of CaseService that sends its calls through client.
Sourcepub fn service(&self) -> &Service
pub fn service(&self) -> &Service
The endpoint the client sends its calls to, which also serves the operations its methods answer with.
Sourcepub async fn get_case(&self, request: GetCaseRequest) -> Result<Case, Error>
pub async fn get_case(&self, request: GetCaseRequest) -> Result<Case, Error>
Returns a case. Needs admin.support_case.get on the organization.
Sourcepub async fn list_cases(
&self,
request: ListCasesRequest,
) -> Result<ListCasesResponse, Error>
pub async fn list_cases( &self, request: ListCasesRequest, ) -> Result<ListCasesResponse, Error>
Lists an organization’s cases, newest first. Needs
admin.support_case.list on the organization.
Sourcepub fn all_cases(&self, request: ListCasesRequest) -> Pages<Case>
pub fn all_cases(&self, request: ListCasesRequest) -> Pages<Case>
Returns everything list_cases lists from request’s page on, fetching the next page as the stream reaches it. A page that fails ends the stream with its error.
Sourcepub async fn create_case(
&self,
request: CreateCaseRequest,
) -> Result<Case, Error>
pub async fn create_case( &self, request: CreateCaseRequest, ) -> Result<Case, Error>
Opens a case, case::State::Open. Needs admin.support_case.create on the
organization.
Sourcepub async fn close_case(&self, request: CloseCaseRequest) -> Result<Case, Error>
pub async fn close_case(&self, request: CloseCaseRequest) -> Result<Case, Error>
Closes a case: its state becomes case::State::Closed, and its contact email is
notified. Closing a closed case succeeds and changes nothing. Needs
admin.support_case.update on the organization.
Sourcepub async fn reopen_case(
&self,
request: ReopenCaseRequest,
) -> Result<Case, Error>
pub async fn reopen_case( &self, request: ReopenCaseRequest, ) -> Result<Case, Error>
Opens a resolved or closed case again: its state becomes case::State::Open, and
its contact email is notified. Reopening a case that is case::State::Open or
case::State::InProgress succeeds and changes nothing. Needs
admin.support_case.update on the organization.