import { InvoicingInvoicePayload } from '../../../entity/invoicing/invoice/invoicePayload'; import { InvoicingInvoice } from '../../../entity/invoicing/invoice/invoiceState'; import { InvoicingTransactionPayload } from '../../../entity/invoicing/invoicingTransaction/invoicingTransactionPayload'; import { ZeniAPIResponse } from '../../../responsePayload'; import { RecordPaymentFormLocalData } from './recordPaymentState'; /** Invoice reference linked to a recorded payment (amounts in dollars). */ export interface RecordPaymentLinkedInvoice { applied_amount: number; invoice_id: string; } /** Request body for recording a manual payment; mirrors the Invoicing backend. */ export interface RecordPaymentRequest { amount: number; customer_id: string; payment_method: string; currency_code?: string; date?: string; gateway?: string; id_at_gateway?: string; linked_invoices?: RecordPaymentLinkedInvoice[]; notes?: string; reference_number?: string; status?: string; type?: string; } /** Request body for POST /invoices/{id}/record-payment (amount in dollars). */ export interface InvoiceRecordPaymentRequest { amount: number; payment_method: string; date?: string; gateway?: string; reference_number?: string; } export type RecordPaymentResponse = ZeniAPIResponse; export type InvoiceRecordPaymentResponse = ZeniAPIResponse; /** * Build the invoice-scoped Record Payment body from the form draft. Amount stays * in dollars for the invoice endpoint. */ export declare const localDataToInvoiceRecordPaymentBody: (localData: RecordPaymentFormLocalData) => InvoiceRecordPaymentRequest; /** * Build the Record Payment request body from the form draft. Amount stays in * dollars; the comment maps to `notes`, transaction id to `id_at_gateway`, * and the linked invoice into `linked_invoices`. Currency is locked to USD. */ export declare const localDataToRecordPaymentPayload: (localData: RecordPaymentFormLocalData) => RecordPaymentRequest; export declare const initializeRecordPaymentDraftFromInvoice: (invoice: InvoicingInvoice) => RecordPaymentFormLocalData;