bkper-js 1.13.2 → 1.14.0
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 +4 -4
- package/lib/model/Book.js +2 -2
- package/lib/model/Transaction.js +4 -4
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1895,13 +1895,13 @@ export declare class Transaction {
|
|
|
1895
1895
|
*/
|
|
1896
1896
|
post(): Promise<Transaction>;
|
|
1897
1897
|
/**
|
|
1898
|
-
*
|
|
1898
|
+
* Trash the transaction.
|
|
1899
1899
|
*/
|
|
1900
|
-
|
|
1900
|
+
trash(): Promise<Transaction>;
|
|
1901
1901
|
/**
|
|
1902
|
-
*
|
|
1902
|
+
* Untrash the transaction.
|
|
1903
1903
|
*/
|
|
1904
|
-
|
|
1904
|
+
untrash(): Promise<Transaction>;
|
|
1905
1905
|
}
|
|
1906
1906
|
|
|
1907
1907
|
/**
|
package/lib/model/Book.js
CHANGED
|
@@ -32,8 +32,8 @@ import { TransactionList } from './TransactionList.js';
|
|
|
32
32
|
export class Book {
|
|
33
33
|
constructor(payload) {
|
|
34
34
|
this.payload = payload || {};
|
|
35
|
-
this.mapGroups();
|
|
36
|
-
this.mapAccounts();
|
|
35
|
+
this.mapGroups(this.payload.groups);
|
|
36
|
+
this.mapAccounts(this.payload.accounts);
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* @returns An immutable copy of the json payload
|
package/lib/model/Transaction.js
CHANGED
|
@@ -677,9 +677,9 @@ export class Transaction {
|
|
|
677
677
|
});
|
|
678
678
|
}
|
|
679
679
|
/**
|
|
680
|
-
*
|
|
680
|
+
* Trash the transaction.
|
|
681
681
|
*/
|
|
682
|
-
|
|
682
|
+
trash() {
|
|
683
683
|
return __awaiter(this, void 0, void 0, function* () {
|
|
684
684
|
var _a;
|
|
685
685
|
let operation = yield TransactionService.trashTransaction(this.book.getId(), this.payload);
|
|
@@ -688,9 +688,9 @@ export class Transaction {
|
|
|
688
688
|
});
|
|
689
689
|
}
|
|
690
690
|
/**
|
|
691
|
-
*
|
|
691
|
+
* Untrash the transaction.
|
|
692
692
|
*/
|
|
693
|
-
|
|
693
|
+
untrash() {
|
|
694
694
|
return __awaiter(this, void 0, void 0, function* () {
|
|
695
695
|
var _a;
|
|
696
696
|
let operation = yield TransactionService.restoreTransaction(this.book.getId(), this.payload);
|