bkper-js 2.10.0 → 2.10.1

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.
@@ -219,8 +219,13 @@ export class Transaction extends Resource {
219
219
  * @returns This Transaction, for chaining
220
220
  */
221
221
  setFiles(files) {
222
- const filePayloads = files.map((file) => file.json());
223
- this.payload.files = [...filePayloads];
222
+ const filePayloads = files.map((file) => {
223
+ return {
224
+ id: file.getId(),
225
+ name: file.getName()
226
+ };
227
+ });
228
+ this.payload.files = filePayloads;
224
229
  return this;
225
230
  }
226
231
  /**
@@ -440,12 +445,12 @@ export class Transaction extends Resource {
440
445
  setDebitAccount(account) {
441
446
  if (account instanceof Account) {
442
447
  if (account != null && account.getId() != null) {
443
- this.payload.debitAccount = account.json();
448
+ this.payload.debitAccount = { id: account.getId(), name: account.getName() };
444
449
  }
445
450
  }
446
451
  else {
447
452
  if (account != null && account.id != null) {
448
- this.payload.debitAccount = account;
453
+ this.payload.debitAccount = { id: account.id, name: account.name };
449
454
  }
450
455
  }
451
456
  return this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkper-js",
3
- "version": "2.10.0",
3
+ "version": "2.10.1",
4
4
  "description": "Javascript client for Bkper REST API",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",