Files
bunq/ts/bunq.classes.transaction.ts

68 lines
1.7 KiB
TypeScript
Raw Normal View History

2025-07-18 10:43:39 +00:00
import * as plugins from './bunq.plugins.js';
import { BunqMonetaryAccount } from './bunq.classes.monetaryaccount.js';
2019-10-02 23:34:05 +02:00
2020-08-21 01:33:30 +00:00
export class BunqTransaction {
public static fromApiObject(monetaryAccountRefArg: BunqMonetaryAccount, apiObjectArg: any) {
2019-10-02 23:34:05 +02:00
const newTransaction = new this(monetaryAccountRefArg);
2019-12-15 17:21:23 +00:00
Object.assign(newTransaction, apiObjectArg.Payment);
2019-10-02 23:34:05 +02:00
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];
2020-08-25 12:57:14 +00:00
public counterparty_alias: {
2025-07-18 10:31:12 +00:00
iban: string;
is_light: any;
display_name: string;
2020-08-25 12:57:14 +00:00
avatar: {
2025-07-18 10:31:12 +00:00
uuid: string;
2020-08-25 12:57:14 +00:00
image: [
{
2025-07-18 10:31:12 +00:00
attachment_public_uuid: string;
height: number;
width: number;
content_type: string;
}
];
anchor_uuid: null;
};
2020-08-25 12:57:14 +00:00
label_user: {
2025-07-18 10:31:12 +00:00
uuid: null;
display_name: string;
country: string;
avatar: null;
public_nick_name: string;
};
country: string;
2020-08-25 12:57:14 +00:00
};
2019-10-02 23:34:05 +02:00
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;
};
2020-08-21 01:33:30 +00:00
public monetaryAccountRef: BunqMonetaryAccount;
2019-10-02 23:34:05 +02:00
2020-08-21 01:33:30 +00:00
constructor(monetaryAccountRefArg: BunqMonetaryAccount) {
2019-10-02 23:34:05 +02:00
this.monetaryAccountRef = monetaryAccountRefArg;
}
2020-06-20 01:47:53 +00:00
}