import { PaymentTypeEnum } from '../Cart'; import ITax from '../Tax'; export interface IRefunds { creditNotes: ICreditNote[]; subtotalWithoutPromotions: number; subtotal: number; total: number; promoAfterTaxesAmount: number; refundFeesAmount: number; shipping: number; taxes: ITax[]; } export interface ICreditNote { id: string; ref: string; items: IRefundItem[]; paymentDetails: IPaymentDetails[]; taxes: ITax[]; createdAt: Date; createdBy: ICreatedBy; shipping?: number; subtotalWithoutPromotions: number; promoAfterTaxesAmount: number; refundFeesAmount: number; subtotal: number; total: number; notes: string; promos?: IRefundPromo[]; secondaryRef?: string; externalRef?: string; groupCode?: string; } export interface IRefundItem { id: string; itemId: string; variantId: string; previousQty: number; creditableQty: number; creditedQty: number; price: number; paymentDetails: IPaymentDetails[]; createdAt: Date; createdBy: ICreatedBy; } export interface IPaymentDetails { id: string; method: PaymentTypeEnum; amount: number; reference: string | null; } export interface IRefundPromo { name: string; unit: string; promoCode: string; promoAmount: number; refundedAmount: number; discountId: string; itemSkus: string[]; } export interface ICreateCreditNote { readonly creditNoteLines: ICreateCreditNoteLine[]; readonly paymentDetails: ICreatePaymentDetail[]; readonly taxes: ITax[]; readonly groupCode?: string | null; readonly spaceId?: string; readonly invoiceNo?: string; readonly invoiceId?: string; readonly createdBy: ICreatedBy; readonly notes?: string; readonly customerId?: string; readonly customerDetails?: ICustomerDetails; readonly subtotalWithoutPromotions: number; readonly subtotal: number; readonly promoAfterTaxesAmount: number; readonly refundFeesAmount: number; readonly total: number; readonly shipping?: number; readonly promos: IRefundPromo[]; readonly secondaryRef?: string; } export interface ICreateCreditNoteLine { readonly itemId: string; readonly variantId: string; readonly previousQty: number; readonly creditedQty: number; readonly unitPrice: number; } export interface ICreatePaymentDetail { readonly amount: number; readonly method: string; } export interface ICreatedBy { firstname: string; lastname: string; email: string; } export interface ICustomerDetails { readonly customer_type?: string; readonly pro_title?: string; readonly pro_proof_doc?: string; readonly customer_default_email?: string; readonly customer_external_code?: string; readonly customer_external_group?: string; readonly terms_code?: string; readonly company_name?: string; }