aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-08-17 01:18:47 -0400
committerJesse Luehrs <doy@tozt.net>2019-08-17 01:21:39 -0400
commita494b85f2ab08c98f57c59883c07bb92e2afd193 (patch)
tree2f5b8168225a48654013cc05310dbe0371d2e6b0
parentc21d4e9ce167d8411cfb40d309987acc9f5bf2a3 (diff)
downloadynab-reimbursements-a494b85f2ab08c98f57c59883c07bb92e2afd193.tar.gz
ynab-reimbursements-a494b85f2ab08c98f57c59883c07bb92e2afd193.zip
add a separate model for update transactions
unlike creating transactions, they require a transaction id
-rw-r--r--data/spec-v1-swagger.json133
-rw-r--r--ynab-api/README.md4
-rw-r--r--ynab-api/docs/TransactionsApi.md8
-rw-r--r--ynab-api/docs/UpdateTransaction.md22
-rw-r--r--ynab-api/docs/UpdateTransactionWrapper.md11
-rw-r--r--ynab-api/docs/UpdateTransactionsResponse.md11
-rw-r--r--ynab-api/docs/UpdateTransactionsWrapper.md12
-rw-r--r--ynab-api/src/apis/transactions_api.rs8
-rw-r--r--ynab-api/src/models/mod.rs8
-rw-r--r--ynab-api/src/models/update_transaction.rs98
-rw-r--r--ynab-api/src/models/update_transaction_wrapper.rs30
-rw-r--r--ynab-api/src/models/update_transactions_response.rs30
-rw-r--r--ynab-api/src/models/update_transactions_wrapper.rs33
13 files changed, 397 insertions, 11 deletions
diff --git a/data/spec-v1-swagger.json b/data/spec-v1-swagger.json
index ada356d..bddd5c9 100644
--- a/data/spec-v1-swagger.json
+++ b/data/spec-v1-swagger.json
@@ -914,7 +914,7 @@
"description": "The transactions to update. Optionally, transaction 'id' value(s) can be specified as null and an 'import_id' value can be provided which will allow transaction(s) to updated by their import_id.",
"required": true,
"schema": {
- "$ref": "#/definitions/SaveTransactionsWrapper"
+ "$ref": "#/definitions/UpdateTransactionsWrapper"
}
}
],
@@ -922,7 +922,7 @@
"209": {
"description": "The transactions were successfully updated",
"schema": {
- "$ref": "#/definitions/SaveTransactionsResponse"
+ "$ref": "#/definitions/UpdateTransactionsResponse"
}
},
"400": {
@@ -1005,7 +1005,7 @@
"description": "The transaction to update",
"required": true,
"schema": {
- "$ref": "#/definitions/SaveTransactionWrapper"
+ "$ref": "#/definitions/UpdateTransactionWrapper"
}
}
],
@@ -2224,6 +2224,133 @@
}
}
},
+ "UpdateTransactionWrapper": {
+ "type": "object",
+ "required": ["transaction"],
+ "properties": {
+ "transaction": {
+ "$ref": "#/definitions/UpdateTransaction"
+ }
+ }
+ },
+ "UpdateTransactionsWrapper": {
+ "type": "object",
+ "properties": {
+ "transaction": {
+ "$ref": "#/definitions/UpdateTransaction"
+ },
+ "transactions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/UpdateTransaction"
+ }
+ }
+ }
+ },
+ "UpdateTransaction": {
+ "type": "object",
+ "required": ["account_id", "date", "amount"],
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid"
+ },
+ "account_id": {
+ "type": "string",
+ "format": "uuid"
+ },
+ "date": {
+ "type": "string",
+ "format": "date",
+ "description": "The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored."
+ },
+ "amount": {
+ "type": "integer",
+ "format": "int64",
+ "description": "The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored."
+ },
+ "payee_id": {
+ "type": "string",
+ "format": "uuid",
+ "description": "The payee for the transaction"
+ },
+ "payee_name": {
+ "type": "string",
+ "maxLength": 50,
+ "description": "The payee name. If a payee_name value is provided and payee_id has a null value, the payee_name value will be used to resolve the payee by either (1) a matching payee rename rule (only if import_id is also specified) or (2) a payee with the same name or (3) creation of a new payee."
+ },
+ "category_id": {
+ "type": "string",
+ "format": "uuid",
+ "description": "The category for the transaction. Split and Credit Card Payment categories are not permitted and will be ignored if supplied. If an existing transaction has a Split category it cannot be changed."
+ },
+ "memo": {
+ "type": "string",
+ "maxLength": 200
+ },
+ "cleared": {
+ "type": "string",
+ "enum": ["cleared", "uncleared", "reconciled"],
+ "description": "The cleared status of the transaction"
+ },
+ "approved": {
+ "type": "boolean",
+ "description": "Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default."
+ },
+ "flag_color": {
+ "type": "string",
+ "enum": ["red", "orange", "yellow", "green", "blue", "purple", null],
+ "description": "The transaction flag"
+ },
+ "import_id": {
+ "type": "string",
+ "maxLength": 36,
+ "description": "If specified, the new transaction will be assigned this import_id and considered \"imported\". *At the time of import* we will attempt to match \"imported\" transactions with non-imported (i.e. \"user-entered\") transactions.<br><br>Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in 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'. Using a consistent format will prevent duplicates through Direct Import and File Based Import.<br><br>If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API)."
+ }
+ }
+ },
+ "UpdateTransactionsResponse": {
+ "type": "object",
+ "required": ["data"],
+ "properties": {
+ "data": {
+ "type": "object",
+ "required": ["transaction_ids", "server_knowledge"],
+ "properties": {
+ "transaction_ids": {
+ "type": "array",
+ "description": "The transaction ids that were saved",
+ "items": {
+ "type": "string"
+ }
+ },
+ "transaction": {
+ "description": "If a single transaction was specified, the transaction that was saved",
+ "$ref": "#/definitions/TransactionDetail"
+ },
+ "transactions": {
+ "type": "array",
+ "description": "If multiple transactions were specified, the transactions that were saved",
+ "items": {
+ "$ref": "#/definitions/TransactionDetail"
+ }
+ },
+ "duplicate_import_ids": {
+ "type": "array",
+ "description": "If multiple transactions were specified, a list of import_ids that were not created because of an existing import_id found on the same account",
+ "items": {
+ "type": "string"
+ }
+ },
+ "server_knowledge": {
+ "type": "integer",
+ "format": "int64",
+ "description": "The knowledge of the server"
+ }
+ }
+ }
+ }
+ },
"TransactionResponse": {
"type": "object",
"required": ["data"],
diff --git a/ynab-api/README.md b/ynab-api/README.md
index 353b402..77efbeb 100644
--- a/ynab-api/README.md
+++ b/ynab-api/README.md
@@ -133,6 +133,10 @@ Class | Method | HTTP request | Description
- [TransactionSummary](docs/TransactionSummary.md)
- [TransactionsResponse](docs/TransactionsResponse.md)
- [TransactionsResponseData](docs/TransactionsResponseData.md)
+ - [UpdateTransaction](docs/UpdateTransaction.md)
+ - [UpdateTransactionWrapper](docs/UpdateTransactionWrapper.md)
+ - [UpdateTransactionsResponse](docs/UpdateTransactionsResponse.md)
+ - [UpdateTransactionsWrapper](docs/UpdateTransactionsWrapper.md)
- [User](docs/User.md)
- [UserResponse](docs/UserResponse.md)
- [UserResponseData](docs/UserResponseData.md)
diff --git a/ynab-api/docs/TransactionsApi.md b/ynab-api/docs/TransactionsApi.md
index 04b8bc3..64ecb4b 100644
--- a/ynab-api/docs/TransactionsApi.md
+++ b/ynab-api/docs/TransactionsApi.md
@@ -272,7 +272,7 @@ Name | Type | Description | Notes
**ctx** | **context.Context** | context containing the authentication | nil if no authentication
**budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
**transaction_id** | **String**| The id of the transaction |
- **data** | [**SaveTransactionWrapper**](SaveTransactionWrapper.md)| The transaction to update |
+ **data** | [**UpdateTransactionWrapper**](UpdateTransactionWrapper.md)| The transaction to update |
### Return type
@@ -292,7 +292,7 @@ Name | Type | Description | Notes
## update_transactions
-> ::models::SaveTransactionsResponse update_transactions(ctx, budget_id, data)
+> ::models::UpdateTransactionsResponse update_transactions(ctx, budget_id, data)
Update multiple transactions
Updates multiple transactions, by 'id' or 'import_id'.
@@ -304,11 +304,11 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context containing the authentication | nil if no authentication
**budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
- **data** | [**SaveTransactionsWrapper**](SaveTransactionsWrapper.md)| The transactions to update. Optionally, transaction 'id' value(s) can be specified as null and an 'import_id' value can be provided which will allow transaction(s) to updated by their import_id. |
+ **data** | [**UpdateTransactionsWrapper**](UpdateTransactionsWrapper.md)| The transactions to update. Optionally, transaction 'id' value(s) can be specified as null and an 'import_id' value can be provided which will allow transaction(s) to updated by their import_id. |
### Return type
-[**::models::SaveTransactionsResponse**](SaveTransactionsResponse.md)
+[**::models::UpdateTransactionsResponse**](UpdateTransactionsResponse.md)
### Authorization
diff --git a/ynab-api/docs/UpdateTransaction.md b/ynab-api/docs/UpdateTransaction.md
new file mode 100644
index 0000000..6d6ecb0
--- /dev/null
+++ b/ynab-api/docs/UpdateTransaction.md
@@ -0,0 +1,22 @@
+# UpdateTransaction
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | | [optional]
+**account_id** | **String** | |
+**date** | [***String**](string.md) | The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored. |
+**amount** | **i64** | The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored. |
+**payee_id** | **String** | The payee for the transaction | [optional]
+**payee_name** | **String** | The payee name. If a payee_name value is provided and payee_id has a null value, the payee_name value will be used to resolve the payee by either (1) a matching payee rename rule (only if import_id is also specified) or (2) a payee with the same name or (3) creation of a new payee. | [optional]
+**category_id** | **String** | The category for the transaction. Split and Credit Card Payment categories are not permitted and will be ignored if supplied. If an existing transaction has a Split category it cannot be changed. | [optional]
+**memo** | **String** | | [optional]
+**cleared** | **String** | The cleared status of the transaction | [optional]
+**approved** | **bool** | Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. | [optional]
+**flag_color** | **String** | The transaction flag | [optional]
+**import_id** | **String** | If specified, the new transaction will be assigned this import_id and considered \"imported\". *At the time of import* we will attempt to match \"imported\" transactions with non-imported (i.e. \"user-entered\") transactions.<br><br>Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in 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'. Using a consistent format will prevent duplicates through Direct Import and File Based Import.<br><br>If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API). | [optional]
+
+[[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/UpdateTransactionWrapper.md b/ynab-api/docs/UpdateTransactionWrapper.md
new file mode 100644
index 0000000..df6846f
--- /dev/null
+++ b/ynab-api/docs/UpdateTransactionWrapper.md
@@ -0,0 +1,11 @@
+# UpdateTransactionWrapper
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**transaction** | [***::models::UpdateTransaction**](UpdateTransaction.md) | |
+
+[[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/UpdateTransactionsResponse.md b/ynab-api/docs/UpdateTransactionsResponse.md
new file mode 100644
index 0000000..77e6431
--- /dev/null
+++ b/ynab-api/docs/UpdateTransactionsResponse.md
@@ -0,0 +1,11 @@
+# UpdateTransactionsResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::SaveTransactionsResponseData**](SaveTransactionsResponse_data.md) | |
+
+[[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/UpdateTransactionsWrapper.md b/ynab-api/docs/UpdateTransactionsWrapper.md
new file mode 100644
index 0000000..f039804
--- /dev/null
+++ b/ynab-api/docs/UpdateTransactionsWrapper.md
@@ -0,0 +1,12 @@
+# UpdateTransactionsWrapper
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**transaction** | [***::models::UpdateTransaction**](UpdateTransaction.md) | | [optional]
+**transactions** | [**Vec<::models::UpdateTransaction>**](UpdateTransaction.md) | | [optional]
+
+[[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/apis/transactions_api.rs b/ynab-api/src/apis/transactions_api.rs
index 8947552..a6386a0 100644
--- a/ynab-api/src/apis/transactions_api.rs
+++ b/ynab-api/src/apis/transactions_api.rs
@@ -34,8 +34,8 @@ pub trait TransactionsApi {
fn get_transactions_by_account(&self, budget_id: &str, account_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::TransactionsResponse, Error>;
fn get_transactions_by_category(&self, budget_id: &str, category_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::HybridTransactionsResponse, Error>;
fn get_transactions_by_payee(&self, budget_id: &str, payee_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::HybridTransactionsResponse, Error>;
- fn update_transaction(&self, budget_id: &str, transaction_id: &str, data: ::models::SaveTransactionWrapper) -> Result<::models::TransactionResponse, Error>;
- fn update_transactions(&self, budget_id: &str, data: ::models::SaveTransactionsWrapper) -> Result<::models::SaveTransactionsResponse, Error>;
+ fn update_transaction(&self, budget_id: &str, transaction_id: &str, data: ::models::UpdateTransactionWrapper) -> Result<::models::TransactionResponse, Error>;
+ fn update_transactions(&self, budget_id: &str, data: ::models::UpdateTransactionsWrapper) -> Result<::models::UpdateTransactionsResponse, Error>;
}
impl TransactionsApi for TransactionsApiClient {
@@ -202,7 +202,7 @@ impl TransactionsApi for TransactionsApiClient {
Ok(client.execute(req)?.error_for_status()?.json()?)
}
- fn update_transaction(&self, budget_id: &str, transaction_id: &str, data: ::models::SaveTransactionWrapper) -> Result<::models::TransactionResponse, Error> {
+ fn update_transaction(&self, budget_id: &str, transaction_id: &str, data: ::models::UpdateTransactionWrapper) -> Result<::models::TransactionResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
@@ -228,7 +228,7 @@ impl TransactionsApi for TransactionsApiClient {
Ok(client.execute(req)?.error_for_status()?.json()?)
}
- fn update_transactions(&self, budget_id: &str, data: ::models::SaveTransactionsWrapper) -> Result<::models::SaveTransactionsResponse, Error> {
+ fn update_transactions(&self, budget_id: &str, data: ::models::UpdateTransactionsWrapper) -> Result<::models::UpdateTransactionsResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
diff --git a/ynab-api/src/models/mod.rs b/ynab-api/src/models/mod.rs
index e0c52d9..ba8b351 100644
--- a/ynab-api/src/models/mod.rs
+++ b/ynab-api/src/models/mod.rs
@@ -152,6 +152,14 @@ mod transactions_response;
pub use self::transactions_response::TransactionsResponse;
mod transactions_response_data;
pub use self::transactions_response_data::TransactionsResponseData;
+mod update_transaction;
+pub use self::update_transaction::UpdateTransaction;
+mod update_transaction_wrapper;
+pub use self::update_transaction_wrapper::UpdateTransactionWrapper;
+mod update_transactions_response;
+pub use self::update_transactions_response::UpdateTransactionsResponse;
+mod update_transactions_wrapper;
+pub use self::update_transactions_wrapper::UpdateTransactionsWrapper;
mod user;
pub use self::user::User;
mod user_response;
diff --git a/ynab-api/src/models/update_transaction.rs b/ynab-api/src/models/update_transaction.rs
new file mode 100644
index 0000000..5e93837
--- /dev/null
+++ b/ynab-api/src/models/update_transaction.rs
@@ -0,0 +1,98 @@
+/*
+ * 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 UpdateTransaction {
+ #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
+ pub id: Option<String>,
+ #[serde(rename = "account_id")]
+ pub account_id: String,
+ /// The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored.
+ #[serde(rename = "date")]
+ pub date: String,
+ /// The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored.
+ #[serde(rename = "amount")]
+ pub amount: i64,
+ /// The payee for the transaction
+ #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")]
+ pub payee_id: Option<String>,
+ /// The payee name. If a payee_name value is provided and payee_id has a null value, the payee_name value will be used to resolve the payee by either (1) a matching payee rename rule (only if import_id is also specified) or (2) a payee with the same name or (3) creation of a new payee.
+ #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")]
+ pub payee_name: Option<String>,
+ /// The category for the transaction. Split and Credit Card Payment categories are not permitted and will be ignored if supplied. If an existing transaction has a Split category it cannot be changed.
+ #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")]
+ pub category_id: Option<String>,
+ #[serde(rename = "memo", skip_serializing_if = "Option::is_none")]
+ pub memo: Option<String>,
+ /// The cleared status of the transaction
+ #[serde(rename = "cleared", skip_serializing_if = "Option::is_none")]
+ pub cleared: Option<String>,
+ /// Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default.
+ #[serde(rename = "approved", skip_serializing_if = "Option::is_none")]
+ pub approved: Option<bool>,
+ /// The transaction flag
+ #[serde(rename = "flag_color", skip_serializing_if = "Option::is_none")]
+ pub flag_color: Option<String>,
+ /// If specified, the new transaction will be assigned this import_id and considered \"imported\". *At the time of import* we will attempt to match \"imported\" transactions with non-imported (i.e. \"user-entered\") transactions.<br><br>Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in 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'. Using a consistent format will prevent duplicates through Direct Import and File Based Import.<br><br>If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API).
+ #[serde(rename = "import_id", skip_serializing_if = "Option::is_none")]
+ pub import_id: Option<String>,
+}
+
+impl UpdateTransaction {
+ pub fn new(account_id: String, date: String, amount: i64) -> UpdateTransaction {
+ UpdateTransaction {
+ id: None,
+ account_id: account_id,
+ date: date,
+ amount: amount,
+ payee_id: None,
+ payee_name: None,
+ category_id: None,
+ memo: None,
+ cleared: None,
+ approved: None,
+ flag_color: None,
+ import_id: None,
+ }
+ }
+}
+
+/// The cleared status of the transaction
+#[derive(Debug, Serialize, Deserialize)]
+pub enum Cleared {
+ #[serde(rename = "cleared")]
+ Cleared,
+ #[serde(rename = "uncleared")]
+ Uncleared,
+ #[serde(rename = "reconciled")]
+ Reconciled,
+}
+/// The transaction flag
+#[derive(Debug, Serialize, Deserialize)]
+pub enum FlagColor {
+ #[serde(rename = "red")]
+ Red,
+ #[serde(rename = "orange")]
+ Orange,
+ #[serde(rename = "yellow")]
+ Yellow,
+ #[serde(rename = "green")]
+ Green,
+ #[serde(rename = "blue")]
+ Blue,
+ #[serde(rename = "purple")]
+ Purple,
+}
+
diff --git a/ynab-api/src/models/update_transaction_wrapper.rs b/ynab-api/src/models/update_transaction_wrapper.rs
new file mode 100644
index 0000000..5c34fbb
--- /dev/null
+++ b/ynab-api/src/models/update_transaction_wrapper.rs
@@ -0,0 +1,30 @@
+/*
+ * 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 UpdateTransactionWrapper {
+ #[serde(rename = "transaction")]
+ pub transaction: ::models::UpdateTransaction,
+}
+
+impl UpdateTransactionWrapper {
+ pub fn new(transaction: ::models::UpdateTransaction) -> UpdateTransactionWrapper {
+ UpdateTransactionWrapper {
+ transaction: transaction,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/update_transactions_response.rs b/ynab-api/src/models/update_transactions_response.rs
new file mode 100644
index 0000000..c56d2b3
--- /dev/null
+++ b/ynab-api/src/models/update_transactions_response.rs
@@ -0,0 +1,30 @@
+/*
+ * 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 UpdateTransactionsResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::SaveTransactionsResponseData,
+}
+
+impl UpdateTransactionsResponse {
+ pub fn new(data: ::models::SaveTransactionsResponseData) -> UpdateTransactionsResponse {
+ UpdateTransactionsResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/update_transactions_wrapper.rs b/ynab-api/src/models/update_transactions_wrapper.rs
new file mode 100644
index 0000000..810d054
--- /dev/null
+++ b/ynab-api/src/models/update_transactions_wrapper.rs
@@ -0,0 +1,33 @@
+/*
+ * 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 UpdateTransactionsWrapper {
+ #[serde(rename = "transaction", skip_serializing_if = "Option::is_none")]
+ pub transaction: Option<::models::UpdateTransaction>,
+ #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")]
+ pub transactions: Option<Vec<::models::UpdateTransaction>>,
+}
+
+impl UpdateTransactionsWrapper {
+ pub fn new() -> UpdateTransactionsWrapper {
+ UpdateTransactionsWrapper {
+ transaction: None,
+ transactions: None,
+ }
+ }
+}
+
+