fix(core): update
This commit is contained in:
45
ts/bunq.classes.transaction.ts
Normal file
45
ts/bunq.classes.transaction.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import * as plugins from './bunq.plugins';
|
||||
import { MonetaryAccount } from './bunq.classes.monetaryaccount';
|
||||
|
||||
export class Transaction {
|
||||
public static fromApiObject(monetaryAccountRefArg: MonetaryAccount, apiObjectArg: any) {
|
||||
const newTransaction = new this(monetaryAccountRefArg);
|
||||
Object.assign(newTransaction, apiObjectArg);
|
||||
return newTransaction;
|
||||
}
|
||||
|
||||
|
||||
public id: number;
|
||||
public created: string;
|
||||
public updated: string;
|
||||
public monetary_account_id: number;
|
||||
public amount: {
|
||||
currency: string;
|
||||
value: string;
|
||||
};
|
||||
public description: string;
|
||||
public type: 'MASTERCARD' | 'BUNQ';
|
||||
public merchant_reference: null;
|
||||
public alias: [Object];
|
||||
public counterparty_alias: [Object];
|
||||
public attachment: [];
|
||||
public geolocation: null;
|
||||
public batch_id: null;
|
||||
public allow_chat: boolean;
|
||||
public scheduled_id: null;
|
||||
public address_billing: null;
|
||||
public address_shipping: null;
|
||||
public sub_type: 'PAYMENT';
|
||||
public request_reference_split_the_bill: [];
|
||||
public balance_after_mutation: {
|
||||
currency: string;
|
||||
value: string;
|
||||
};
|
||||
|
||||
public monetaryAccountRef: MonetaryAccount;
|
||||
|
||||
constructor(monetaryAccountRefArg: MonetaryAccount) {
|
||||
this.monetaryAccountRef = monetaryAccountRefArg;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user