-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
104 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { HoudiniObject, FlexibleAmount, IdType, HoudiniEvent } from "../../common"; | ||
import Nonprofit from '..'; | ||
|
||
|
||
|
||
export interface DiscountCode extends HoudiniObject, CreateDiscountCode { | ||
event: IdType | Event; | ||
id: IdType; | ||
nonprofit: IdType | Nonprofit; | ||
object: 'discount_code'; | ||
} | ||
|
||
type DiscountDetails = { percent: number|string } | {flatAmount: FlexibleAmount} | ||
|
||
export interface CreateDiscountCode { | ||
code: string; | ||
description: string; | ||
discount: DiscountDetails; | ||
} | ||
|
||
export type DiscountCodeCreated = HoudiniEvent<'discount_code.created', DiscountCode> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
/* eslint-disable */ | ||
|
||
import { IdType, HoudiniObject, HoudiniEvent} from '../../common'; | ||
import { IdType, HoudiniObject, HoudiniEvent, Amount, FlexibleAmount} from '../../common'; | ||
import Event from './' | ||
|
||
export interface TicketLevel extends HoudiniObject { | ||
id: IdType; | ||
name: string; | ||
event: IdType | Event; | ||
|
||
amount: Amount | ||
limit?: number; | ||
object: "ticket_level"; | ||
} | ||
|
||
|
||
export interface CreateTicketLevel { | ||
name: string; | ||
amount: FlexibleAmount; | ||
limit?:number; | ||
adminOnly: boolean; | ||
} | ||
|
||
|
||
export type TicketLevelCreated = HoudiniEvent<'ticket_level.created', TicketLevel>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* eslint-disable @typescript-eslint/member-ordering */ | ||
import { HoudiniEvent, HoudiniObject, IdType } from "../../common"; | ||
import Nonprofit from '..'; | ||
|
||
|
||
|
||
export interface TagMaster extends HoudiniObject { | ||
object: 'tag_master'; | ||
nonprofit: IdType | Nonprofit; | ||
value: string; | ||
} | ||
|
||
|
||
export interface CreateTagMaster { | ||
value: string; | ||
} | ||
|
||
|
||
export type TagMasterCreated = HoudiniEvent<'tag_master.created', TagMaster>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 43 additions & 4 deletions
47
docs/event_definitions/Nonprofit/Transaction/TicketOrder.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,51 @@ | ||
/* eslint-disable */ | ||
import { IdType, HoudiniObject } from '../../common'; | ||
import { Transaction } from './Transaction'; | ||
|
||
import Nonprofit from '..' | ||
import { IdType, HoudiniObject, Amount, HoudiniEvent, FlexibleAmount } from '../../common'; | ||
import { TicketLevel } from '../Event/TicketLevel'; | ||
import Supporter from '../Supporter'; | ||
|
||
export interface TicketOrder extends HoudiniObject { | ||
id: IdType; | ||
object: "ticket_order"; | ||
event: IdType | Event; | ||
nonprofit: IdType | Nonprofit; | ||
supporter: IdType | Supporter; | ||
/** | ||
* the money that is associated with an online payment, such as a credit card purchase | ||
*/ | ||
amount: Amount | ||
|
||
/** the money that is associated with an offline payment */ | ||
amountAsOfflinePayment:Amount | ||
|
||
transaction: IdType | Transaction; | ||
discountCode: string|null | ||
|
||
/** | ||
* One ticket level for each ticket that they would like to buy of that level | ||
*/ | ||
tickets: TicketLevel[]; | ||
|
||
} | ||
|
||
export type TicketOrderCreated = HoudiniEvent<'ticket_order.created', TicketOrder>; | ||
|
||
|
||
export interface CreateTicketOrder extends HoudiniObject { | ||
object: "ticket_order" | ||
|
||
supporter: IdType | ||
/** | ||
* the money that is associated with an online payment, such as a credit card purchase | ||
*/ | ||
amount: FlexibleAmount | ||
|
||
/** the money that is associated with an offline payment */ | ||
amountAsOfflinePayment:FlexibleAmount | ||
|
||
|
||
discountCode: string|null | ||
/** | ||
* One ticket level for each ticket that they would like to buy of that level | ||
*/ | ||
tickets: TicketLevel[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters