square_api_client/models/create_order_request.rs
1//! Model struct for CreateOrderRequest type
2
3use serde::Serialize;
4
5use super::Order;
6
7/// This is a model struct for CreateOrderRequest type
8#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize)]
9pub struct CreateOrderRequest {
10 /// The order to create. If this field is set, the only other top-level field that can be set is
11 /// the `idempotency_key`.
12 pub order: Option<Order>,
13 /// A value you specify that uniquely identifies this order among orders you have created.
14 ///
15 /// If you are unsure whether a particular order was created successfully, you can try it again
16 /// with the same idempotency key without worrying about creating duplicate orders.
17 ///
18 /// For more information, see
19 /// [Idempotency](https://developer.squareup.com/docs/basics/api101/idempotency).
20 pub idempotency_key: Option<String>,
21}