square_api_client/models/enums/invoice_sort_field.rs
1//! Model for InvoiceSortField enum.
2
3use serde::Serialize;
4
5/// Indicates the status of an invoice.
6#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
7#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
8pub enum InvoiceSortField {
9 /// The field works as follows:
10 ///
11 /// - If the invoice is a draft, it uses the invoice `created_at` date.
12 /// - If the invoice is scheduled for publication, it uses the `scheduled_at` date.
13 /// - If the invoice is published, it uses the invoice publication date.
14 InvoiceSortDate,
15}
16
17impl Default for InvoiceSortField {
18 fn default() -> Self {
19 Self::InvoiceSortDate
20 }
21}