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.
- package/lib/model/Transaction.js +9 -4
- package/package.json +1 -1
package/lib/model/Transaction.js
CHANGED
|
@@ -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) =>
|
|
223
|
-
|
|
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.
|
|
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;
|