pub struct NewArticle {
pub subject: Option<String>,
pub body: String,
pub article_type: Option<String>,
pub internal: Option<bool>,
pub content_type: Option<String>,
pub sender: Option<String>,
pub from: Option<String>,
pub to: Option<String>,
pub cc: Option<String>,
pub attachments: Vec<NewAttachment>,
pub ticket_id: Option<u64>,
}Expand description
Payload for POST /api/v1/ticket_articles and inline article on ticket creation.
Fields§
§subject: Option<String>Subject line.
body: StringArticle body.
article_type: Option<String>Article type, e.g. note, email, phone, web, sms.
internal: Option<bool>Whether the article should be hidden from customers.
content_type: Option<String>MIME content type - text/plain (default server-side) or text/html.
sender: Option<String>Sender role override (Agent, Customer, System).
from: Option<String>From address (mail-type articles).
to: Option<String>To address (mail-type articles).
cc: Option<String>CC addresses.
attachments: Vec<NewAttachment>Inline attachments.
ticket_id: Option<u64>Parent ticket - filled in automatically by
crate::api::ArticlesApi::create, not needed when used inline.
Implementations§
Source§impl NewArticle
impl NewArticle
Sourcepub fn new(body: impl Into<String>) -> Self
pub fn new(body: impl Into<String>) -> Self
Build with the given body. Without an explicit article_type the
server defaults to a note.
Sourcepub fn article_type(self, s: impl Into<String>) -> Self
pub fn article_type(self, s: impl Into<String>) -> Self
Set the article type (note, email, phone, web, sms, …).
Sourcepub fn content_type(self, s: impl Into<String>) -> Self
pub fn content_type(self, s: impl Into<String>) -> Self
Set the MIME content type (text/plain or text/html).
Sourcepub fn attach(self, a: NewAttachment) -> Self
pub fn attach(self, a: NewAttachment) -> Self
Append an attachment.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NewArticle
impl RefUnwindSafe for NewArticle
impl Send for NewArticle
impl Sync for NewArticle
impl Unpin for NewArticle
impl UnsafeUnpin for NewArticle
impl UnwindSafe for NewArticle
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