2021-02-02 22:47:00 +00:00
|
|
|
// License: LGPL-3.0-or-later
|
2021-05-05 22:11:35 +00:00
|
|
|
import type { Amount, HouID, HoudiniEvent, PolymorphicID } from "../../common";
|
2021-04-07 21:43:58 +00:00
|
|
|
import type { Subtransaction, TrxDescendent } from ".";
|
2021-02-02 22:47:00 +00:00
|
|
|
|
2021-05-05 22:11:35 +00:00
|
|
|
export interface PaymentAsId extends PolymorphicID<HouID> {
|
|
|
|
type: 'payment';
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Payment extends PaymentAsId, TrxDescendent {
|
2021-04-07 21:43:58 +00:00
|
|
|
created: number;
|
|
|
|
deleted: boolean;
|
2021-05-05 22:11:35 +00:00
|
|
|
fee_total: Amount;
|
2021-04-07 21:43:58 +00:00
|
|
|
gross_amount: Amount;
|
|
|
|
net_amount: Amount;
|
|
|
|
status: string;
|
|
|
|
subtransaction: HouID | Subtransaction;
|
|
|
|
type: 'payment';
|
2021-02-02 22:47:00 +00:00
|
|
|
}
|
|
|
|
|
2021-04-07 21:43:58 +00:00
|
|
|
export type PaymentCreated = HoudiniEvent<'payment.created', Payment>;
|
|
|
|
export type PaymentUpdated = HoudiniEvent<'payment.updated', Payment>;
|
|
|
|
export type PaymentDeleted = HoudiniEvent<'payment.deleted', Payment>;
|
|
|
|
|