import type { invoice_PaymentsAddress } from './invoice_PaymentsAddress'; import type { invoice_QuickBooksData } from './invoice_QuickBooksData'; import type { line_item_LineItem } from './line_item_LineItem'; import type { payment_Payment } from './payment_Payment'; import type { payment_PaymentMethodPreference } from './payment_PaymentMethodPreference'; import type { payment_PaymentPreferences } from './payment_PaymentPreferences'; export type invoice_Invoice = { /** * Address stores the selected billing address from custom fields */ address?: invoice_PaymentsAddress; /** * AmountPaid is the amount paid so far in the smallest currency unit (e.g. cents). */ amountPaid?: number; /** * AttachmentKeys are the storage keys of the invoice attachments. */ attachmentKeys?: Array; /** * AttachmentUrls are presigned download URLs for the invoice attachments. */ attachmentUrls?: Array; /** * BillingReason describes why the invoice was created (e.g. manual, subscription cycle). */ billingReason?: string; /** * ClientID is the ID of the client the invoice is billed to. */ clientId?: string; /** * CollectionMethod controls how the invoice is collected. */ collectionMethod?: invoice_Invoice.collectionMethod; /** * CompanyID is the ID of the company the invoice is billed to. */ companyId?: string; createdAt?: string; creatorId?: string; /** * Currency is the ISO 4217 currency code the invoice is denominated in. */ currency?: string; data?: string; /** * DaysUntilDue is the number of days from issuance until the invoice is due. */ daysUntilDue?: number; /** * DueDate is the RFC 3339 timestamp by which the invoice must be paid. */ dueDate?: string; /** * ObjectType is the internal entity type discriminator. */ entityType?: string; /** * FileKey is the storage key of the invoice PDF. */ fileKey?: string; /** * FileUrl is the presigned download URL for the invoice PDF. */ fileUrl?: string; id?: string; identityId?: string; /** * Property copied from subscription when creating invoice * We need this value when we have to show line items descriptions (Format "Item (at US$621.00 / month)") on invoice details for subscriptions invoices. * We can fetch this directly from subscription at that time, but we delete subscriptions when we delete * the recipient (client/company). For deleted recipients we still show invoices which were paid in the past. So we need to store this value here * to show line items descriptions for invoices even if subscriptions are deleted. */ interval?: string; invoiceCreationStatus?: invoice_Invoice.invoiceCreationStatus; /** * LatestRefundStatus is the status of the most recent refund issued against the invoice, when any. */ latestRefundStatus?: invoice_Invoice.latestRefundStatus; /** * LineItems are the priced line items that make up the invoice. */ lineItems?: Array; /** * Memo is an optional note shown to the recipient on the invoice. */ memo?: string; /** * Number is the human-readable invoice number. */ number?: string; object?: string; /** * Origin indicates how the invoice was created. */ origin?: invoice_Invoice.origin; paidManually?: boolean; /** * represents the successful payments only */ payment?: Array; /** * field is only used for platform api and should not be used anywhere else on FE/BE */ paymentMethodPreferences?: Array; /** * fields is used for BE/FE only */ paymentPreferences?: payment_PaymentPreferences; paymentSourceId?: string; /** * PaymentSuccessDate is the RFC 3339 timestamp at which payment succeeded; absent until paid. */ paymentSuccessDate?: string; /** * PortalID is the ID of the portal the invoice belongs to. */ portalId?: string; previousAttributes?: Record; quickBooksData?: invoice_QuickBooksData; receiptKey?: string; /** * ReceiptNumber is the human-readable receipt number, set once the invoice is paid. */ receiptNumber?: string; /** * ReceiptUrl is the presigned download URL for the receipt PDF. */ receiptUrl?: string; /** * Deprecated: use ClientID and CompanyID instead */ recipientId?: string; ref?: string; /** * SentDate is the RFC 3339 timestamp at which the invoice was sent to the recipient. */ sentDate?: string; /** * SourcePaymentLinkId is the ID of the payment link that produced this invoice, when applicable. */ sourcePaymentLinkId?: string; /** * Status is the current lifecycle state of the invoice. */ status?: invoice_Invoice.status; /** * Subscription is populated from search results when subscriptionId is present (not persisted) */ subscription?: any; /** * SubscriptionID is the ID of the subscription that generated this invoice, when applicable. */ subscriptionId?: string; /** * TaxAmount is the computed tax in the smallest currency unit (e.g. cents). */ taxAmount?: number; /** * TaxPercentage is the tax rate applied to the invoice, expressed as a percentage. */ taxPercentage?: number; /** * TemplateID is the ID of the invoice template the invoice was created from, when applicable. */ templateId?: string; /** * Total is the invoice total in the smallest currency unit (e.g. cents). */ total?: number; updatedAt?: string; }; export declare namespace invoice_Invoice { /** * CollectionMethod controls how the invoice is collected. */ enum collectionMethod { SEND_INVOICE = "sendInvoice", CHARGE_AUTOMATICALLY = "chargeAutomatically", PAYMENT_LINK = "paymentLink" } enum invoiceCreationStatus { EPHEMERAL = "ephemeral", PENDING = "pending", CREATED = "created" } /** * LatestRefundStatus is the status of the most recent refund issued against the invoice, when any. */ enum latestRefundStatus { PENDING = "pending", SUCCEEDED = "succeeded", FAILED = "failed" } /** * Origin indicates how the invoice was created. */ enum origin { INTERNAL = "internal", PAYMENT_LINK = "payment_link", PRODUCT_STORE = "product_store" } /** * Status is the current lifecycle state of the invoice. */ enum status { DRAFT = "draft", OPEN = "open", VOID = "void", PAID = "paid", PROCESSING = "processing" } }