1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! Data models for every Infobip SMS endpoint.
//!
//! Every type here is `Serialize + Deserialize` and uses
//! `#[serde(rename_all = "camelCase")]` so field names match the JSON
//! wire format (`bulkId`, `messageId`, etc.). Optional fields are
//! `Option<T>` and skipped when serializing if `None`, so the JSON you
//! send stays minimal.
//!
//! # Module map
//!
//! - [`common`] — types shared across multiple endpoints (status,
//! error, price, regional options, etc.).
//! - [`send`] — models for `POST /sms/3/messages`.
//! - [`reports`] — models for `GET /sms/3/reports`.
//! - [`logs`] — models for `GET /sms/3/logs`, including cursor-based
//! pagination.
//! - [`inbox`] — models for `GET /sms/1/inbox/reports`.
//! - [`bulks`] — models for `/sms/1/bulks` and `/sms/1/bulks/status`.
//! - [`preview`] — models for `POST /sms/1/preview`.
//! - [`conversion`] — models for `POST /ct/1/log/end/{messageId}`.
//! - [`webhooks`] — payload shapes Infobip POSTs to your callback URLs.
//!
//! # Building requests with `..Default::default()`
//!
//! Most request types implement [`Default`], so the idiomatic pattern
//! for building them is to set the fields you care about and let the
//! rest fall back to `None`:
//!
//! ```
//! use infobip_sms::models::send::{
//! SmsMessage, SmsMessageContent, SmsTextMessageContent, SmsToDestination,
//! };
//!
//! let _ = SmsMessage {
//! sender: Some("InfoSMS".into()),
//! destinations: vec![SmsToDestination {
//! to: "41793026727".into(),
//! ..Default::default()
//! }],
//! content: SmsMessageContent::Text(SmsTextMessageContent {
//! text: "Hello!".into(),
//! ..Default::default()
//! }),
//! ..Default::default()
//! };
//! ```
//!
//! # Date-time fields
//!
//! Date-time values (`sentAt`, `doneAt`, `receivedAt`, `sendAt`, …) are
//! stored as `String`. Infobip uses the format
//! `yyyy-MM-dd'T'HH:mm:ss.SSSZ` (ISO 8601 with millisecond precision and
//! a numeric offset, e.g. `2026-04-29T15:00:00.000+0000`). If you need
//! typed times, parse these into `chrono::DateTime` or
//! `time::OffsetDateTime` in your own code.