square_api_client/models/create_invoice_request.rs
1//! Request body struct for the Create Invoice API
2
3use serde::Serialize;
4
5use super::Invoice;
6
7/// This is a model struct for CreateInvoiceRequest type
8#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize)]
9pub struct CreateInvoiceRequest {
10 /// The invoice to create.
11 pub invoice: Invoice,
12 /// A unique string that identifies the `CreateInvoice` request. If you do not provide
13 /// `idempotency_key` (or provide an empty string as the value), the endpoint treats each
14 /// request as independent.
15 ///
16 /// For more information, see
17 /// [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
18 ///
19 /// Max Length: 128
20 pub idempotency_key: Option<String>,
21}