Skip to main content

autogen_squareup/models/
transfer_order_status.rs

1/*
2 * Square
3 *
4 * Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.
5 *
6 * The version of the OpenAPI document: 2.0
7 * Contact: developers@squareup.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// TransferOrderStatus : Status values for transfer orders. Represents the current state of a  [TransferOrder](entity:TransferOrder) in its lifecycle from creation to completion. Each status determines what actions are available and how inventory is affected.
15/// Status values for transfer orders. Represents the current state of a  [TransferOrder](entity:TransferOrder) in its lifecycle from creation to completion. Each status determines what actions are available and how inventory is affected.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum TransferOrderStatus {
18    #[serde(rename = "DRAFT")]
19    Draft,
20    #[serde(rename = "STARTED")]
21    Started,
22    #[serde(rename = "PARTIALLY_RECEIVED")]
23    PartiallyReceived,
24    #[serde(rename = "COMPLETED")]
25    Completed,
26    #[serde(rename = "CANCELED")]
27    Canceled,
28
29}
30
31impl std::fmt::Display for TransferOrderStatus {
32    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
33        match self {
34            Self::Draft => write!(f, "DRAFT"),
35            Self::Started => write!(f, "STARTED"),
36            Self::PartiallyReceived => write!(f, "PARTIALLY_RECEIVED"),
37            Self::Completed => write!(f, "COMPLETED"),
38            Self::Canceled => write!(f, "CANCELED"),
39        }
40    }
41}
42
43impl Default for TransferOrderStatus {
44    fn default() -> TransferOrderStatus {
45        Self::Draft
46    }
47}
48