pub struct ServiceDesk {
pub base_url: Url,
pub credentials: Credentials,
/* private fields */
}Expand description
Main client for interacting with ServiceDesk Plus API.
Use tickets() for search/create operations,
or ticket(id) for single-ticket operations.
Fields§
§base_url: Url§credentials: CredentialsImplementations§
Source§impl ServiceDesk
impl ServiceDesk
Sourcepub fn tickets(&self) -> TicketsClient<'_>
pub fn tickets(&self) -> TicketsClient<'_>
Get a client for ticket collection operations.
Sourcepub fn ticket(&self, id: impl Into<TicketID>) -> TicketClient<'_>
pub fn ticket(&self, id: impl Into<TicketID>) -> TicketClient<'_>
Get a client for single ticket operations.
Source§impl ServiceDesk
impl ServiceDesk
pub async fn ticket_details( &self, ticket_id: impl Into<TicketID>, ) -> Result<DetailedTicket, Error>
Sourcepub async fn edit(
&self,
ticket_id: impl Into<TicketID>,
data: &EditTicketData,
) -> Result<(), Error>
pub async fn edit( &self, ticket_id: impl Into<TicketID>, data: &EditTicketData, ) -> Result<(), Error>
Edit an existing ticket. Some of the fields are optional and can be left as None if not being changed. Some fields might be missing due to SDP API restrictions, like account assignment to a given ticket being immutable after creation.
Sourcepub async fn add_note(
&self,
ticket_id: impl Into<TicketID>,
note: &NoteData,
) -> Result<Note, Error>
pub async fn add_note( &self, ticket_id: impl Into<TicketID>, note: &NoteData, ) -> Result<Note, Error>
Add a note to a ticket (creates a new note).
Sourcepub async fn get_note(
&self,
ticket_id: impl Into<TicketID>,
note_id: impl Into<NoteID>,
) -> Result<Note, Error>
pub async fn get_note( &self, ticket_id: impl Into<TicketID>, note_id: impl Into<NoteID>, ) -> Result<Note, Error>
Get a specific note from a ticket.
Sourcepub async fn list_notes(
&self,
ticket_id: impl Into<TicketID>,
row_count: Option<u32>,
start_index: Option<u32>,
) -> Result<Vec<Note>, Error>
pub async fn list_notes( &self, ticket_id: impl Into<TicketID>, row_count: Option<u32>, start_index: Option<u32>, ) -> Result<Vec<Note>, Error>
List all notes for a ticket.
Sourcepub async fn edit_note(
&self,
ticket_id: impl Into<TicketID>,
note_id: impl Into<NoteID>,
note: &NoteData,
) -> Result<Note, Error>
pub async fn edit_note( &self, ticket_id: impl Into<TicketID>, note_id: impl Into<NoteID>, note: &NoteData, ) -> Result<Note, Error>
Edit an existing note.
Sourcepub async fn delete_note(
&self,
ticket_id: impl Into<TicketID>,
note_id: impl Into<NoteID>,
) -> Result<(), Error>
pub async fn delete_note( &self, ticket_id: impl Into<TicketID>, note_id: impl Into<NoteID>, ) -> Result<(), Error>
Delete a note from a ticket.
Sourcepub async fn assign_ticket(
&self,
ticket_id: impl Into<TicketID>,
technician_name: &str,
) -> Result<(), Error>
pub async fn assign_ticket( &self, ticket_id: impl Into<TicketID>, technician_name: &str, ) -> Result<(), Error>
Assign a ticket to a technician.
Sourcepub async fn create_ticket(
&self,
data: &CreateTicketData,
) -> Result<TicketResponse, Error>
pub async fn create_ticket( &self, data: &CreateTicketData, ) -> Result<TicketResponse, Error>
Create a new ticket.
Sourcepub async fn search_tickets(
&self,
criteria: Criteria,
) -> Result<Vec<DetailedTicket>, Error>
pub async fn search_tickets( &self, criteria: Criteria, ) -> Result<Vec<DetailedTicket>, Error>
Search for tickets based on specified criteria.
The criteria can be built using the Criteria struct.
The default method of querying is not straightforward, Criteria struct
on the ‘root’ level contains a single condition, to combine multiple conditions
use the ‘children’ field with appropriate ‘logical_operator’.
Source§impl ServiceDesk
impl ServiceDesk
Sourcepub fn new(
base_url: Url,
credentials: Credentials,
options: ServiceDeskOptions,
) -> Self
pub fn new( base_url: Url, credentials: Credentials, options: ServiceDeskOptions, ) -> Self
Create a new ServiceDesk client instance
Trait Implementations§
Source§impl Clone for ServiceDesk
impl Clone for ServiceDesk
Source§fn clone(&self) -> ServiceDesk
fn clone(&self) -> ServiceDesk
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more