aboutsummaryrefslogtreecommitdiffstats
path: root/src/models/payee.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-08-19 00:19:38 -0400
committerJesse Luehrs <doy@tozt.net>2019-08-19 00:19:38 -0400
commitaa52e632b866b51d455787a96bcd2f5a63b7ac89 (patch)
tree7e947c62510404f6233be24c303d7fb6f455be0d /src/models/payee.rs
parent3539ceb20f5383a332a8ad1fcab816cf083f277e (diff)
downloadynab-api-aa52e632b866b51d455787a96bcd2f5a63b7ac89.tar.gz
ynab-api-aa52e632b866b51d455787a96bcd2f5a63b7ac89.zip
move ynab-api to its own repository
Diffstat (limited to 'src/models/payee.rs')
-rw-r--r--src/models/payee.rs41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/models/payee.rs b/src/models/payee.rs
new file mode 100644
index 0000000..13ad103
--- /dev/null
+++ b/src/models/payee.rs
@@ -0,0 +1,41 @@
+/*
+ * YNAB API Endpoints
+ *
+ * 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.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct Payee {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "name")]
+ pub name: String,
+ /// If a transfer payee, the account_id to which this payee transfers to
+ #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")]
+ pub transfer_account_id: Option<String>,
+ /// Whether or not the payee has been deleted. Deleted payees will only be included in delta requests.
+ #[serde(rename = "deleted")]
+ pub deleted: bool,
+}
+
+impl Payee {
+ pub fn new(id: String, name: String, deleted: bool) -> Payee {
+ Payee {
+ id: id,
+ name: name,
+ transfer_account_id: None,
+ deleted: deleted,
+ }
+ }
+}
+
+