2021-01-15 23:10:37 +00:00
|
|
|
// License: LGPL-3.0-or-later
|
2021-02-10 22:04:05 +00:00
|
|
|
import type { IDType, HoudiniObject, HoudiniEvent, Amount, RecurrenceRule } from '../../common';
|
2021-01-15 23:10:37 +00:00
|
|
|
import type Nonprofit from '..';
|
|
|
|
import type Campaign from '.';
|
|
|
|
|
|
|
|
interface OneTimeGiftOptionAmount {
|
|
|
|
amount: Amount;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface RecurringGiftOptionAmount {
|
|
|
|
amount: Amount;
|
|
|
|
recurrence: RecurrenceRule;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface CampaignGiftOption extends HoudiniObject {
|
2021-02-10 22:04:05 +00:00
|
|
|
campaign: IDType | Campaign;
|
2021-01-15 23:10:37 +00:00
|
|
|
deleted: boolean;
|
|
|
|
description: string;
|
|
|
|
gift_option_amount: Array<RecurringGiftOptionAmount | OneTimeGiftOptionAmount>;
|
|
|
|
hide_contributions: boolean;
|
|
|
|
name: string;
|
2021-02-10 22:04:05 +00:00
|
|
|
nonprofit: IDType | Nonprofit;
|
2021-01-15 23:10:37 +00:00
|
|
|
object: "campaign_gift_option";
|
|
|
|
order: number;
|
|
|
|
quantity?: number;
|
|
|
|
to_ship: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export type CampaignGiftOptionCreated = HoudiniEvent<'campaign_gift_option.created', CampaignGiftOption>;
|
|
|
|
export type CampaignGiftOptionUpdated = HoudiniEvent<'campaign_gift_option.updated', CampaignGiftOption>;
|
|
|
|
export type CampaignGiftOptionDeleted = HoudiniEvent<'campaign_gift_option.deleted', CampaignGiftOption>;
|