square_api_client/models/enums/invoice_status.rs
1//! Model for InvoiceStatus enum.
2
3use serde::{Deserialize, Serialize};
4
5/// Indicates the status of an invoice.
6#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
7#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
8pub enum InvoiceStatus {
9 /// The invoice is a draft. You must publish a draft invoice before Square can process it. A
10 /// draft invoice has no `public_url`, so it is not available to customers.
11 Draft,
12 /// The invoice is published but not yet paid.
13 Unpaid,
14 /// The invoice is scheduled to be processed. On the scheduled date, Square sends the invoice,
15 /// initiates an automatic payment, or takes no action, depending on the delivery method and
16 /// payment request settings. Square also sets the invoice status to the appropriate state:
17 /// `UNPAID`, `PAID`, `PARTIALLY_PAID`, or `PAYMENT_PENDING`.
18 Scheduled,
19 /// A partial payment is received for the invoice.
20 PartiallyPaid,
21 /// The customer paid the invoice in full.
22 Paid,
23 /// The invoice is paid (or partially paid) and some but not all the amount paid is refunded.
24 PartiallyRefunded,
25 /// The full amount that the customer paid for the invoice is refunded.
26 Refunded,
27 /// The invoice is canceled. Square no longer requests payments from the customer. The
28 /// `public_url` page remains and is accessible, but it displays the invoice as canceled and
29 /// does not accept payment.
30 Canceled,
31 /// Square canceled the invoice due to suspicious activity.
32 Failed,
33 /// A payment on the invoice was initiated but has not yet been processed.
34 ///
35 /// When in this state, invoices cannot be updated and other payments cannot be initiated.
36 PaymentPending,
37}