]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/java/net/ktnx/mobileledger/json/v1_23/ParsedLedgerAccount.java
more pronounced day/month delimiters in the transaction list
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / json / v1_23 / ParsedLedgerAccount.java
1 /*
2  * Copyright © 2020 Damyan Ivanov.
3  * This file is part of MoLe.
4  * MoLe is free software: you can distribute it and/or modify it
5  * under the term of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your opinion), any later version.
8  *
9  * MoLe is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License terms for details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with MoLe. If not, see <https://www.gnu.org/licenses/>.
16  */
17
18 package net.ktnx.mobileledger.json.v1_23;
19
20 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
21
22 import java.util.ArrayList;
23 import java.util.List;
24
25 @JsonIgnoreProperties(ignoreUnknown = true)
26 public class ParsedLedgerAccount extends net.ktnx.mobileledger.json.ParsedLedgerAccount {
27     private List<ParsedBalance> aebalance;
28     private List<ParsedBalance> aibalance;
29     public ParsedLedgerAccount() {
30     }
31     public List<ParsedBalance> getAibalance() {
32         return aibalance;
33     }
34     public void setAibalance(List<ParsedBalance> aibalance) {
35         this.aibalance = aibalance;
36     }
37     public List<ParsedBalance> getAebalance() {
38         return aebalance;
39     }
40     public void setAebalance(List<ParsedBalance> aebalance) {
41         this.aebalance = aebalance;
42     }
43     @Override
44     public List<SimpleBalance> getSimpleBalance() {
45         List<SimpleBalance> result = new ArrayList<SimpleBalance>();
46         for (ParsedBalance b : getAibalance()) {
47             result.add(new SimpleBalance(b.getAcommodity(), b.getAquantity()
48                                                              .asFloat()));
49         }
50
51         return result;
52     }
53 }