2020-12-01 17:55:23 +01:00
|
|
|
import { Reservation } from './reservation';
|
2020-12-29 17:31:57 +01:00
|
|
|
import { SubscriptionRequest } from './subscription';
|
2020-12-01 17:55:23 +01:00
|
|
|
|
|
|
|
export interface PaymentConfirmation {
|
|
|
|
requires_action?: boolean,
|
|
|
|
payment_intent_client_secret?: string,
|
|
|
|
success?: boolean,
|
|
|
|
error?: {
|
|
|
|
statusText: string
|
2020-12-07 13:49:11 +01:00
|
|
|
}
|
2020-12-01 17:55:23 +01:00
|
|
|
}
|
|
|
|
|
2020-12-08 12:26:03 +01:00
|
|
|
export interface IntentConfirmation {
|
|
|
|
client_secret: string
|
|
|
|
}
|
|
|
|
|
2020-12-01 17:55:23 +01:00
|
|
|
export enum PaymentMethod {
|
2021-04-22 19:24:08 +02:00
|
|
|
Card = 'card',
|
2020-12-01 17:55:23 +01:00
|
|
|
Other = ''
|
|
|
|
}
|
|
|
|
|
2021-05-21 18:25:18 +02:00
|
|
|
export type CartItem = { reservation: Reservation }|{ subscription: SubscriptionRequest };
|
|
|
|
|
|
|
|
export interface ShoppingCart {
|
2021-04-22 19:24:08 +02:00
|
|
|
customer_id: number,
|
2021-05-21 18:25:18 +02:00
|
|
|
items: Array<CartItem>,
|
2021-04-22 19:24:08 +02:00
|
|
|
coupon_code?: string,
|
|
|
|
payment_schedule?: boolean,
|
|
|
|
payment_method: PaymentMethod
|
2020-12-01 17:55:23 +01:00
|
|
|
}
|
2021-02-09 12:09:26 +01:00
|
|
|
|
|
|
|
export interface UpdateCardResponse {
|
|
|
|
updated: boolean,
|
|
|
|
error?: string
|
|
|
|
}
|