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 CHANGED
@@ -1895,13 +1895,13 @@ export declare class Transaction {
1895
1895
  */
1896
1896
  post(): Promise<Transaction>;
1897
1897
  /**
1898
- * Remove the transaction, sending to trash.
1898
+ * Trash the transaction.
1899
1899
  */
1900
- remove(): Promise<Transaction>;
1900
+ trash(): Promise<Transaction>;
1901
1901
  /**
1902
- * Restore the transaction from trash.
1902
+ * Untrash the transaction.
1903
1903
  */
1904
- restore(): Promise<Transaction>;
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
@@ -677,9 +677,9 @@ export class Transaction {
677
677
  });
678
678
  }
679
679
  /**
680
- * Remove the transaction, sending to trash.
680
+ * Trash the transaction.
681
681
  */
682
- remove() {
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
- * Restore the transaction from trash.
691
+ * Untrash the transaction.
692
692
  */
693
- restore() {
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkper-js",
3
- "version": "1.13.2",
3
+ "version": "1.14.0",
4
4
  "description": "Javascript client for Bkper REST API",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",