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