Skip to main content

ynab_api/models/
category_group.rs

1/*
2 * YNAB API Endpoints
3 *
4 * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body.  API Documentation is at https://api.ynab.com
5 *
6 * The version of the OpenAPI document: 1.72.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct CategoryGroup {
16    #[serde(rename = "id")]
17    pub id: uuid::Uuid,
18    #[serde(rename = "name")]
19    pub name: String,
20    /// Whether or not the category group is hidden
21    #[serde(rename = "hidden")]
22    pub hidden: bool,
23    /// Whether or not the category group has been deleted.  Deleted category groups will only be included in delta requests.
24    #[serde(rename = "deleted")]
25    pub deleted: bool,
26}
27
28impl CategoryGroup {
29    pub fn new(id: uuid::Uuid, name: String, hidden: bool, deleted: bool) -> CategoryGroup {
30        CategoryGroup {
31            id,
32            name,
33            hidden,
34            deleted,
35        }
36    }
37}
38