import { InvoicingInvoicePayload } from '../../../entity/invoicing/invoice/invoicePayload'; import { ZeniAPIResponse } from '../../../responsePayload'; export type InvoiceDetailResponse = ZeniAPIResponse; export type InvoicingInvoiceActionResponse = ZeniAPIResponse; /** Snake_case request bodies for invoice action endpoints. */ export type RecordPaymentBody = { amount: number; date?: string; gateway?: string; installment_id?: string; payment_method?: string; reference_number?: string; }; export type WriteOffBody = { amount: number; reason?: string; }; export type IssueCreditNoteLineItemBody = { amount?: number; description?: string; entity_type?: string; id?: string; quantity?: number; unit_amount?: number; }; export type IssueCreditNoteBody = { amount?: number; line_items?: IssueCreditNoteLineItemBody[]; reason_code?: string; type?: 'adjustment' | 'refundable' | 'store'; }; export type RemovePaymentBody = { txn_id: string; }; export type ApplyExcessBody = { amount: number; target_invoice_id: string; }; export type PaymentInstallmentBody = { amount: number; due_date: string; id?: string; seq?: number; }; export type PaymentScheduleBody = { installments: PaymentInstallmentBody[]; interval_count?: number; interval_unit?: 'month' | 'year' | 'week' | 'day'; type?: 'fixed' | 'flexible'; }; export type VoidInvoiceBody = { create_adjustment_credit_note?: boolean; credit_note_date?: string; reason_code?: string; }; export type InvoicingInvoiceActionBody = RecordPaymentBody | WriteOffBody | IssueCreditNoteBody | RemovePaymentBody | ApplyExcessBody | PaymentScheduleBody | VoidInvoiceBody | Record;