aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-08-09 04:31:25 -0400
committerJesse Luehrs <doy@tozt.net>2019-08-09 04:31:25 -0400
commit50c1255b06b9053ce26afbccbb5ad26831423f73 (patch)
treec5998771efdccca37e0185f53fc9d46b423b09e2
parentfdefcbe583680d72d15562430fb8492277f368e8 (diff)
downloadynab-reimbursements-50c1255b06b9053ce26afbccbb5ad26831423f73.tar.gz
ynab-reimbursements-50c1255b06b9053ce26afbccbb5ad26831423f73.zip
more spec fixes
-rw-r--r--data/spec-v1-swagger.json2
-rw-r--r--ynab-api/docs/HybridTransaction.md4
-rw-r--r--ynab-api/docs/HybridTransactionAllOf.md4
-rw-r--r--ynab-api/src/models/hybrid_transaction.rs14
-rw-r--r--ynab-api/src/models/hybrid_transaction_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 fea1c53..ada356d 100644
--- a/data/spec-v1-swagger.json
+++ b/data/spec-v1-swagger.json
@@ -2352,7 +2352,7 @@
},
{
"type": "object",
- "required": ["type", "parent_transaction_id", "account_name", "payee_name", "category_name"],
+ "required": ["type", "account_name", "category_name"],
"properties": {
"type": {
"type": "string",
diff --git a/ynab-api/docs/HybridTransaction.md b/ynab-api/docs/HybridTransaction.md
index 69c0a4e..c168944 100644
--- a/ynab-api/docs/HybridTransaction.md
+++ b/ynab-api/docs/HybridTransaction.md
@@ -20,9 +20,9 @@ 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. |
**_type** | **String** | Whether the hybrid transaction represents a regular transaction or a subtransaction |
-**parent_transaction_id** | **String** | For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null. |
+**parent_transaction_id** | **String** | For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null. | [optional]
**account_name** | **String** | |
-**payee_name** | **String** | |
+**payee_name** | **String** | | [optional]
**category_name** | **String** | |
[[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/HybridTransactionAllOf.md b/ynab-api/docs/HybridTransactionAllOf.md
index 657d6d9..af38160 100644
--- a/ynab-api/docs/HybridTransactionAllOf.md
+++ b/ynab-api/docs/HybridTransactionAllOf.md
@@ -5,9 +5,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_type** | **String** | Whether the hybrid transaction represents a regular transaction or a subtransaction |
-**parent_transaction_id** | **String** | For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null. |
+**parent_transaction_id** | **String** | For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null. | [optional]
**account_name** | **String** | |
-**payee_name** | **String** | |
+**payee_name** | **String** | | [optional]
**category_name** | **String** | |
[[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/hybrid_transaction.rs b/ynab-api/src/models/hybrid_transaction.rs
index 488872e..802813b 100644
--- a/ynab-api/src/models/hybrid_transaction.rs
+++ b/ynab-api/src/models/hybrid_transaction.rs
@@ -59,18 +59,18 @@ pub struct HybridTransaction {
#[serde(rename = "type")]
pub _type: String,
/// For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null.
- #[serde(rename = "parent_transaction_id")]
- pub parent_transaction_id: String,
+ #[serde(rename = "parent_transaction_id", skip_serializing_if = "Option::is_none")]
+ pub parent_transaction_id: Option<String>,
#[serde(rename = "account_name")]
pub account_name: String,
- #[serde(rename = "payee_name")]
- pub payee_name: String,
+ #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")]
+ pub payee_name: Option<String>,
#[serde(rename = "category_name")]
pub category_name: String,
}
impl HybridTransaction {
- pub fn new(id: String, date: String, amount: i64, cleared: String, approved: bool, account_id: String, deleted: bool, _type: String, parent_transaction_id: String, account_name: String, payee_name: String, category_name: String) -> HybridTransaction {
+ pub fn new(id: String, date: String, amount: i64, cleared: String, approved: bool, account_id: String, deleted: bool, _type: String, account_name: String, category_name: String) -> HybridTransaction {
HybridTransaction {
id: id,
date: date,
@@ -88,9 +88,9 @@ impl HybridTransaction {
import_id: None,
deleted: deleted,
_type: _type,
- parent_transaction_id: parent_transaction_id,
+ parent_transaction_id: None,
account_name: account_name,
- payee_name: payee_name,
+ payee_name: None,
category_name: category_name,
}
}
diff --git a/ynab-api/src/models/hybrid_transaction_all_of.rs b/ynab-api/src/models/hybrid_transaction_all_of.rs
index f0294ec..42fd515 100644
--- a/ynab-api/src/models/hybrid_transaction_all_of.rs
+++ b/ynab-api/src/models/hybrid_transaction_all_of.rs
@@ -19,23 +19,23 @@ pub struct HybridTransactionAllOf {
#[serde(rename = "type")]
pub _type: String,
/// For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null.
- #[serde(rename = "parent_transaction_id")]
- pub parent_transaction_id: String,
+ #[serde(rename = "parent_transaction_id", skip_serializing_if = "Option::is_none")]
+ pub parent_transaction_id: Option<String>,
#[serde(rename = "account_name")]
pub account_name: String,
- #[serde(rename = "payee_name")]
- pub payee_name: String,
+ #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")]
+ pub payee_name: Option<String>,
#[serde(rename = "category_name")]
pub category_name: String,
}
impl HybridTransactionAllOf {
- pub fn new(_type: String, parent_transaction_id: String, account_name: String, payee_name: String, category_name: String) -> HybridTransactionAllOf {
+ pub fn new(_type: String, account_name: String, category_name: String) -> HybridTransactionAllOf {
HybridTransactionAllOf {
_type: _type,
- parent_transaction_id: parent_transaction_id,
+ parent_transaction_id: None,
account_name: account_name,
- payee_name: payee_name,
+ payee_name: None,
category_name: category_name,
}
}