From f0e27bf7c882e8347cc5e86fae0fe128f5f714df Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Fri, 21 Aug 2020 01:33:30 +0000 Subject: [PATCH] fix(core): update --- ts/bunq.classes.account.ts | 6 +++--- ts/bunq.classes.monetaryaccount.ts | 8 ++++---- ts/bunq.classes.transaction.ts | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ts/bunq.classes.account.ts b/ts/bunq.classes.account.ts index 60bcd57..ed47b98 100644 --- a/ts/bunq.classes.account.ts +++ b/ts/bunq.classes.account.ts @@ -1,6 +1,6 @@ import * as plugins from './bunq.plugins'; import * as paths from './bunq.paths'; -import { MonetaryAccount } from './bunq.classes.monetaryaccount'; +import { BunqMonetaryAccount } from './bunq.classes.monetaryaccount'; export interface IBunqConstructorOptions { deviceName: string; @@ -92,9 +92,9 @@ export class BunqAccount { .catch((e) => { console.log(e); }); - const accountsArray: MonetaryAccount[] = []; + const accountsArray: BunqMonetaryAccount[] = []; for (const apiAccount of apiMonetaryAccounts) { - accountsArray.push(MonetaryAccount.fromAPIObject(this, apiAccount)); + accountsArray.push(BunqMonetaryAccount.fromAPIObject(this, apiAccount)); } return accountsArray; } diff --git a/ts/bunq.classes.monetaryaccount.ts b/ts/bunq.classes.monetaryaccount.ts index 156158c..e2c9ab6 100644 --- a/ts/bunq.classes.monetaryaccount.ts +++ b/ts/bunq.classes.monetaryaccount.ts @@ -1,13 +1,13 @@ import * as plugins from './bunq.plugins'; import { BunqAccount } from './bunq.classes.account'; -import { Transaction } from './bunq.classes.transaction'; +import { BunqTransaction } from './bunq.classes.transaction'; export type TAccountType = 'joint' | 'savings' | 'bank'; /** * a monetary account */ -export class MonetaryAccount { +export class BunqMonetaryAccount { public static fromAPIObject(bunqAccountRef: BunqAccount, apiObject: any) { const newMonetaryAccount = new this(bunqAccountRef); @@ -105,9 +105,9 @@ export class MonetaryAccount { this.id, paginationOptions ); - const transactionsArray: Transaction[] = []; + const transactionsArray: BunqTransaction[] = []; for (const apiTransaction of apiTransactions) { - transactionsArray.push(Transaction.fromApiObject(this, apiTransaction)); + transactionsArray.push(BunqTransaction.fromApiObject(this, apiTransaction)); } return transactionsArray; } diff --git a/ts/bunq.classes.transaction.ts b/ts/bunq.classes.transaction.ts index 6944e87..6f7d4e8 100644 --- a/ts/bunq.classes.transaction.ts +++ b/ts/bunq.classes.transaction.ts @@ -1,8 +1,8 @@ import * as plugins from './bunq.plugins'; -import { MonetaryAccount } from './bunq.classes.monetaryaccount'; +import { BunqMonetaryAccount } from './bunq.classes.monetaryaccount'; -export class Transaction { - public static fromApiObject(monetaryAccountRefArg: MonetaryAccount, apiObjectArg: any) { +export class BunqTransaction { + public static fromApiObject(monetaryAccountRefArg: BunqMonetaryAccount, apiObjectArg: any) { const newTransaction = new this(monetaryAccountRefArg); Object.assign(newTransaction, apiObjectArg.Payment); return newTransaction; @@ -35,9 +35,9 @@ export class Transaction { value: string; }; - public monetaryAccountRef: MonetaryAccount; + public monetaryAccountRef: BunqMonetaryAccount; - constructor(monetaryAccountRefArg: MonetaryAccount) { + constructor(monetaryAccountRefArg: BunqMonetaryAccount) { this.monetaryAccountRef = monetaryAccountRefArg; } }