aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-08-17 03:20:35 -0400
committerJesse Luehrs <doy@tozt.net>2019-08-17 03:20:35 -0400
commit39b10acb918ca059384c620d38e31c669f6696b2 (patch)
tree1d060d8eb4c7079a3208666d07605ff8e9f2a893
parente801bc38e6ef8746ea61dd2bc7fce59e3204049f (diff)
downloadynab-api-39b10acb918ca059384c620d38e31c669f6696b2.tar.gz
ynab-api-39b10acb918ca059384c620d38e31c669f6696b2.zip
fix some more incorrectly required parameter values
-rw-r--r--data/spec-v1-swagger.json2
-rw-r--r--ynab-api/docs/TransactionDetail.md4
-rw-r--r--ynab-api/docs/TransactionDetailAllOf.md4
-rw-r--r--ynab-api/src/models/transaction_detail.rs14
-rw-r--r--ynab-api/src/models/transaction_detail_all_of.rs14
5 files changed, 19 insertions, 19 deletions
diff --git a/data/spec-v1-swagger.json b/data/spec-v1-swagger.json
index bddd5c9..453301e 100644
--- a/data/spec-v1-swagger.json
+++ b/data/spec-v1-swagger.json
@@ -2450,7 +2450,7 @@
},
{
"type": "object",
- "required": ["account_name", "payee_name", "category_name", "subtransactions"],
+ "required": ["account_name", "subtransactions"],
"properties": {
"account_name": {
"type": "string"
diff --git a/ynab-api/docs/TransactionDetail.md b/ynab-api/docs/TransactionDetail.md
index ad156d7..3d23f44 100644
--- a/ynab-api/docs/TransactionDetail.md
+++ b/ynab-api/docs/TransactionDetail.md
@@ -20,8 +20,8 @@ Name | Type | Description | Notes
**import_id** | **String** | If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. | [optional]
**deleted** | **bool** | Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. |
**account_name** | **String** | |
-**payee_name** | **String** | |
-**category_name** | **String** | |
+**payee_name** | **String** | | [optional]
+**category_name** | **String** | | [optional]
**subtransactions** | [**Vec<::models::SubTransaction>**](SubTransaction.md) | If a split transaction, the subtransactions. |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/ynab-api/docs/TransactionDetailAllOf.md b/ynab-api/docs/TransactionDetailAllOf.md
index f446e5d..2db8459 100644
--- a/ynab-api/docs/TransactionDetailAllOf.md
+++ b/ynab-api/docs/TransactionDetailAllOf.md
@@ -5,8 +5,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**account_name** | **String** | |
-**payee_name** | **String** | |
-**category_name** | **String** | |
+**payee_name** | **String** | | [optional]
+**category_name** | **String** | | [optional]
**subtransactions** | [**Vec<::models::SubTransaction>**](SubTransaction.md) | If a split transaction, the subtransactions. |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/ynab-api/src/models/transaction_detail.rs b/ynab-api/src/models/transaction_detail.rs
index 361813b..956eae9 100644
--- a/ynab-api/src/models/transaction_detail.rs
+++ b/ynab-api/src/models/transaction_detail.rs
@@ -57,17 +57,17 @@ pub struct TransactionDetail {
pub deleted: bool,
#[serde(rename = "account_name")]
pub account_name: String,
- #[serde(rename = "payee_name")]
- pub payee_name: String,
- #[serde(rename = "category_name")]
- pub category_name: String,
+ #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")]
+ pub payee_name: Option<String>,
+ #[serde(rename = "category_name", skip_serializing_if = "Option::is_none")]
+ pub category_name: Option<String>,
/// If a split transaction, the subtransactions.
#[serde(rename = "subtransactions")]
pub subtransactions: Vec<::models::SubTransaction>,
}
impl TransactionDetail {
- pub fn new(id: String, date: String, amount: i64, cleared: String, approved: bool, account_id: String, deleted: bool, account_name: String, payee_name: String, category_name: String, subtransactions: Vec<::models::SubTransaction>) -> TransactionDetail {
+ pub fn new(id: String, date: String, amount: i64, cleared: String, approved: bool, account_id: String, deleted: bool, account_name: String, subtransactions: Vec<::models::SubTransaction>) -> TransactionDetail {
TransactionDetail {
id: id,
date: date,
@@ -85,8 +85,8 @@ impl TransactionDetail {
import_id: None,
deleted: deleted,
account_name: account_name,
- payee_name: payee_name,
- category_name: category_name,
+ payee_name: None,
+ category_name: None,
subtransactions: subtransactions,
}
}
diff --git a/ynab-api/src/models/transaction_detail_all_of.rs b/ynab-api/src/models/transaction_detail_all_of.rs
index b0b44f9..cead8f5 100644
--- a/ynab-api/src/models/transaction_detail_all_of.rs
+++ b/ynab-api/src/models/transaction_detail_all_of.rs
@@ -17,21 +17,21 @@ use serde_json::Value;
pub struct TransactionDetailAllOf {
#[serde(rename = "account_name")]
pub account_name: String,
- #[serde(rename = "payee_name")]
- pub payee_name: String,
- #[serde(rename = "category_name")]
- pub category_name: String,
+ #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")]
+ pub payee_name: Option<String>,
+ #[serde(rename = "category_name", skip_serializing_if = "Option::is_none")]
+ pub category_name: Option<String>,
/// If a split transaction, the subtransactions.
#[serde(rename = "subtransactions")]
pub subtransactions: Vec<::models::SubTransaction>,
}
impl TransactionDetailAllOf {
- pub fn new(account_name: String, payee_name: String, category_name: String, subtransactions: Vec<::models::SubTransaction>) -> TransactionDetailAllOf {
+ pub fn new(account_name: String, subtransactions: Vec<::models::SubTransaction>) -> TransactionDetailAllOf {
TransactionDetailAllOf {
account_name: account_name,
- payee_name: payee_name,
- category_name: category_name,
+ payee_name: None,
+ category_name: None,
subtransactions: subtransactions,
}
}