ynab_api_async_fork/models/
payee.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.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Payee {
16    #[serde(rename = "id")]
17    pub id: String,
18    #[serde(rename = "name")]
19    pub name: String,
20    /// If a transfer payee, the `account_id` to which this payee transfers to
21    #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")]
22    pub transfer_account_id: Option<String>,
23    /// Whether or not the payee has been deleted.  Deleted payees will only be included in delta requests.
24    #[serde(rename = "deleted")]
25    pub deleted: bool,
26}
27
28impl Payee {
29    pub fn new(id: String, name: String, deleted: bool) -> Payee {
30        Payee {
31            id,
32            name,
33            transfer_account_id: None,
34            deleted,
35        }
36    }
37}
38
39