From 6c233bc2f9df18d0448f9096ae7fb57f3ef6a18e Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Tue, 2 Feb 2021 16:47:00 -0600 Subject: [PATCH] InsertTickets tests pass while creating the new entities --- .../Nonprofit/Transaction.ts | 10 ---------- .../Nonprofit/Transaction/Payment.ts | 16 +++++++++++++++ .../Nonprofit/Transaction/index.ts | 20 +++++++++++++++++++ 3 files changed, 36 insertions(+), 10 deletions(-) delete mode 100644 docs/event_definitions/Nonprofit/Transaction.ts create mode 100644 docs/event_definitions/Nonprofit/Transaction/Payment.ts create mode 100644 docs/event_definitions/Nonprofit/Transaction/index.ts diff --git a/docs/event_definitions/Nonprofit/Transaction.ts b/docs/event_definitions/Nonprofit/Transaction.ts deleted file mode 100644 index d4a1331d..00000000 --- a/docs/event_definitions/Nonprofit/Transaction.ts +++ /dev/null @@ -1,10 +0,0 @@ -// License: LGPL-3.0-or-later -import type { Amount, HoudiniObject, IdType, HouID } from "../common"; -import type Nonprofit from './'; - - -export interface Transaction extends HoudiniObject { - amount: Amount; - nonprofit: IdType | Nonprofit; - object: 'transaction'; -} diff --git a/docs/event_definitions/Nonprofit/Transaction/Payment.ts b/docs/event_definitions/Nonprofit/Transaction/Payment.ts new file mode 100644 index 00000000..49489c96 --- /dev/null +++ b/docs/event_definitions/Nonprofit/Transaction/Payment.ts @@ -0,0 +1,16 @@ +// License: LGPL-3.0-or-later +import type { Amount, HoudiniObject, IdType, HouID } from "../../common"; +import type Nonprofit from '../'; +import type Supporter from "../Supporter"; +import type Transaction from './'; + + +export interface Payment extends HoudiniObject { + amount: Amount; + nonprofit: IdType | Nonprofit; + object: 'payment'; + supporter: IdType | Supporter; + transaction: HouID | Transaction; + +} + diff --git a/docs/event_definitions/Nonprofit/Transaction/index.ts b/docs/event_definitions/Nonprofit/Transaction/index.ts new file mode 100644 index 00000000..824e449d --- /dev/null +++ b/docs/event_definitions/Nonprofit/Transaction/index.ts @@ -0,0 +1,20 @@ +// License: LGPL-3.0-or-later +import type { Amount, HoudiniObject, IdType, HouID } from "../../common"; +import type Nonprofit from '../'; +import type Supporter from "../Supporter"; +import type { Payment } from "./Payment"; + +export default interface Transaction extends HoudiniObject { + amount: Amount; + nonprofit: IdType | Nonprofit; + object: 'transaction'; + payments: IdType[] | Payment[]; + status: "not-submitted"|"created" | "waiting-on-supporter" | "failed" | "completed"; + supporter: IdType | Supporter; + /** + * We don't specify more for now + */ + transaction_assignments: { id: HouID,object: string }[]; +} + +export * from './Payment';