From 851f494989320ebb81f3a294add4474a8c5ced27 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 15 Sep 2019 21:32:57 -0400 Subject: bump ynab-api --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- src/ynab/budget.rs | 4 +--- src/ynab/transaction.rs | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 18121dc..f02a502 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1708,7 +1708,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "ynab-api" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "reqwest 0.9.19 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1726,7 +1726,7 @@ dependencies = [ "cursive_table_view 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "directories 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "snafu 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ynab-api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ynab-api 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [metadata] @@ -1926,4 +1926,4 @@ dependencies = [ "checksum winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum xi-unicode 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "12ea8eda4b1eb72f02d148402e23832d56a33f55d8c1b2d5bcdde91d79d47cb1" -"checksum ynab-api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "004581d786952ee09c3a4f1e2a2319eb51d992cb35bc3d4d068e9a46a224053b" +"checksum ynab-api 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2249731e972372209fd0d41e1db5da32312164d01e710159411138c753c2ba8" diff --git a/Cargo.toml b/Cargo.toml index e9129a9..d9481c4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,4 +12,4 @@ cursive = "0.12" cursive_table_view = "0.10" directories = "2.0" snafu = "0.4" -ynab-api = "1.0" +ynab-api = "2" diff --git a/src/ynab/budget.rs b/src/ynab/budget.rs index e3275bb..b802072 100644 --- a/src/ynab/budget.rs +++ b/src/ynab/budget.rs @@ -63,9 +63,7 @@ impl Budget { &self, txns: &[&super::transaction::Transaction], ) -> Result<()> { - let mut to_update = - ynab_api::models::UpdateTransactionsWrapper::new(); - to_update.transactions = Some( + let to_update = ynab_api::models::UpdateTransactionsWrapper::new( txns.iter() .map(|t| { let mut ut = t.to_update_transaction(); diff --git a/src/ynab/transaction.rs b/src/ynab/transaction.rs index be31019..287b574 100644 --- a/src/ynab/transaction.rs +++ b/src/ynab/transaction.rs @@ -83,11 +83,11 @@ impl Transaction { &self, ) -> ynab_api::models::UpdateTransaction { let mut ut = ynab_api::models::UpdateTransaction::new( + self.id.clone(), self.account_id.clone(), self.date.clone(), self.amount, ); - ut.id = Some(self.id.clone()); ut.payee_id = self.payee_id.clone(); ut.category_id = self.category_id.clone(); ut.memo = self.memo.clone(); -- cgit v1.2.3-54-g00ecf