billecta/
delivery.rs

1//! # Delivery
2//!
3//!
4use crate::{Created, EmptyResponse, MailDelivery, Request, RequestBuilder, SmsDelivery};
5
6///Sends the posted PDF file (and appendixes [optional]) with mail
7///delivery. One file (and appendixes [optional]) is one post delivery/
8///envelope. The PDF's needs to be in A4 format, main file needs to have
9///sender and receiver information according to our standard on the first
10///page and total file after merge with appendixes [optional] can not
11///excced 10 MB.
12pub fn send_a_mail(body: &MailDelivery) -> Request<EmptyResponse> {
13    RequestBuilder::new(http::Method::POST, "/v1/delivery/mail")
14        .body(body)
15        .build()
16}
17///Sends a SMS to the specified phone number. Sender will be your company
18///name. Line breaks are added by typing \n\r in the message.
19pub fn send_a_sms_text(body: &SmsDelivery) -> Request<Created> {
20    RequestBuilder::new(http::Method::POST, "/v1/delivery/sms")
21        .body(body)
22        .build()
23}