bkper 2.5.3 → 2.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -97,15 +97,13 @@ export declare class Account {
97
97
  deleteProperty(key: string): Account;
98
98
  /**
99
99
  * Gets the balance based on credit nature of this Account.
100
- *
101
- * @param raw - True to get the raw balance, no matter the credit nature of this Account.
102
- *
100
+ * @deprecated Use `Book.getBalancesReport` instead.
103
101
  * @returns The balance of this account.
104
102
  */
105
- getBalance(raw?: boolean): Amount;
103
+ getBalance(): Amount;
106
104
  /**
107
105
  * Gets the raw balance, no matter credit nature of this Account.
108
- *
106
+ * @deprecated Use `Book.getBalancesReport` instead.
109
107
  * @returns The balance of this account.
110
108
  */
111
109
  getBalanceRaw(): Amount;
@@ -872,7 +870,7 @@ export declare class Group {
872
870
  *
873
871
  * @returns This Group, for chainning.
874
872
  */
875
- setParent(group: Group): Group;
873
+ setParent(group: Group | null): Group;
876
874
  /**
877
875
  * @returns The name of this Group
878
876
  */
@@ -165,26 +165,19 @@ class Account {
165
165
  }
166
166
  /**
167
167
  * Gets the balance based on credit nature of this Account.
168
- *
169
- * @param raw - True to get the raw balance, no matter the credit nature of this Account.
170
- *
168
+ * @deprecated Use `Book.getBalancesReport` instead.
171
169
  * @returns The balance of this account.
172
170
  */
173
- getBalance(raw) {
171
+ getBalance() {
174
172
  var balance = new Amount_1.Amount('0');
175
173
  if (this.wrapped.balance != null) {
176
174
  balance = utils_1.round(this.wrapped.balance, this.book.getFractionDigits());
177
175
  }
178
- if (raw) {
179
- return balance;
180
- }
181
- else {
182
- return utils_1.getRepresentativeValue(balance, this.isCredit());
183
- }
176
+ return balance;
184
177
  }
185
178
  /**
186
179
  * Gets the raw balance, no matter credit nature of this Account.
187
- *
180
+ * @deprecated Use `Book.getBalancesReport` instead.
188
181
  * @returns The balance of this account.
189
182
  */
190
183
  getBalanceRaw() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkper",
3
- "version": "2.5.3",
3
+ "version": "2.5.9",
4
4
  "description": "Node.js client for Bkper REST API",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",