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
use serde::{Deserialize, Serialize};
/// ```rust
/// #[cfg(test)]
/// mod tests {
///     use crate::{shipping_methods::ShippingMethod, ApiClient, Entity};
///
///     #[tokio::test]
///     async fn test_list_all_retrieve_shipping_methods() {
///         let client = ApiClient::from_env().unwrap();
///         let result = client
///             .list_all::<ShippingMethod>(Entity::ShippingMethod)
///             .await
///             .unwrap();
///         assert!(!result.is_empty());
///         let first = result.first().unwrap();
///         let retrieved = client
///             .retrieve::<ShippingMethod>(Entity::ShippingMethod, &first.id)
///             .await
///             .unwrap();
///         assert_eq!(first.title, retrieved.title);
///     }
/// }
/// ```

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ShippingMethod {
    /// Method ID.
    pub id: String,
    /// Shipping method title.
    pub title: String,
    /// Shipping method description.
    pub description: String,
}