import { Answer } from 'types/answer'; import { rcEnums } from 'types/rc.enums'; export interface ProductResource { type: string; id: number; } export interface IPaymentProduct { id: number; ordinal: number; paidAmount: number; resources?: ProductResource[]; userId?: number; } export interface IPaymentData { installmentsAmount: number; isPartialPayment: boolean; products?: IPaymentProduct[]; paymentData: { token: string; type: 'ach' | 'card'; }; answers: Answer[] | { userId: number; answers: Answer[] }[]; amountToPay: number | undefined; userId: number; signType: rcEnums.league.SignTypeEnum; entityId?: number; } export interface PaymentMethod { id: string; billing_details: { address: { city: string | null; country: string | null; line1: string | null; line2: string | null; postalCode: string | null; state: string | null; }; email: string; name: string; phone: string; }; card: { brand: string; country?: string; exp_month: string; exp_year: string; fingerprint?: string; funding?: string; generated_from?: string | null; last4: string; isDefault: boolean; }; type: 'ach' | 'card'; } export interface PurchaseProduct { id: number; ordinal: number; parentOrdinal: number | undefined; resources: ProductResource[]; userId: number | undefined; // ----- remove this - it's not needed anymore -------- paidAmount: number; }