squareup/models/order_created.rs
1//! Response body struct for the OrderCreated type
2
3use crate::models::DateTime;
4use crate::models::enums::OrderState;
5use serde::{Deserialize, Serialize};
6
7/// This is a model struct for OrderCreated type.
8#[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq)]
9pub struct OrderCreated {
10 /// The order's unique ID.
11 pub order_id: String,
12 /// The version number, which is incremented each time an update is committed to the order.
13 /// Orders that were not created through the API do not include a version number and therefore
14 /// cannot be updated.
15 pub version: Option<i32>,
16 /// The ID of the seller location that this order is associated with.
17 pub location_id: String,
18 /// The state of the order.
19 pub state: OrderState,
20 /// **Read only** The timestamp of when the event was created, in RFC 3339 format.
21 /// Examples for January 25th, 2020 6:25:34pm Pacific Standard Time:
22 /// UTC: 2020-01-26T02:25:34Z
23 /// Pacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00
24 pub created_at: DateTime,
25}