rust_woocommerce/models/
settings.rs

1use crate::controllers::Entity;
2use serde::{Deserialize, Serialize};
3
4#[derive(Debug, Clone, Serialize, Deserialize)]
5pub struct SettingGroup {
6    /// A unique identifier that can be used to link settings together.
7    pub id: String,
8    /// A human-readable label for the setting used in interfaces.
9    pub label: String,
10    /// A human-readable description for the setting used in interfaces.
11    pub description: String,
12    /// ID of parent grouping.
13    pub parent_id: String,
14    /// IDs for settings subgroups.
15    pub sub_groups: Vec<String>,
16}
17impl Entity for SettingGroup {
18    fn endpoint() -> String {
19        String::from("settings/")
20    }
21
22    fn child_endpoint(parent_id: i32) -> String {
23        let _ = parent_id;
24        String::new()
25    }
26}