rust_woocommerce/models/
shipping_methods.rs

1use crate::controllers::Entity;
2use serde::{Deserialize, Serialize};
3
4#[derive(Debug, Clone, Serialize, Deserialize)]
5pub struct ShippingMethod {
6    /// Method ID.
7    pub id: String,
8    /// Shipping method title.
9    pub title: String,
10    /// Shipping method description.
11    pub description: String,
12}
13impl Entity for ShippingMethod {
14    fn endpoint() -> String {
15        String::from("shipping_methods/")
16    }
17
18    fn child_endpoint(parent_id: i32) -> String {
19        let _ = parent_id;
20        String::new()
21    }
22}