pub struct Templates<'a> { /* private fields */ }
Implementations§
Source§impl<'a> Templates<'a>
impl<'a> Templates<'a>
Sourcepub async fn send<T>(
&self,
payload: TemplatesRequest,
) -> Result<Vec<TemplateItem>, HttpError>
pub async fn send<T>( &self, payload: TemplatesRequest, ) -> Result<Vec<TemplateItem>, HttpError>
Set a template for your org’s one time pin.
§Examples
use termii_rust::{
async_impl::rest::termii,
common::switch::templates::{TemplatesData, TemplatesRequest},
};
let client = termii::Termii::new("Your API key");
let templates_data =
TemplatesData::new("Termii", "325821".to_string(), "10 minutes".to_string());
let templates_payload = TemplatesRequest::new(
"+234XXXXXXXXXX".to_string(),
"talert".to_string(),
"1493-csdn3-ns34w-sd3434-dfdf".to_string(),
templates_data,
);
let templates_response = client
.switch
.templates
.send(templates_payload)
.await
.unwrap();
println!("{:?}", templates_response);
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Templates<'a>
impl<'a> !RefUnwindSafe for Templates<'a>
impl<'a> Send for Templates<'a>
impl<'a> Sync for Templates<'a>
impl<'a> Unpin for Templates<'a>
impl<'a> !UnwindSafe for Templates<'a>
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