square_api_client/models/
publish_invoice_request.rs

1//! Request body struct for the Publish Invoice API
2
3use serde::Serialize;
4
5/// This is a model struct for PublishInvoiceRequest type.
6#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize)]
7pub struct PublishInvoiceRequest {
8    /// The version of the [Invoice] to publish. This must match the current version of the invoice;
9    /// otherwise, the request is rejected.
10    pub version: i32,
11    /// A unique string that identifies the `PublishInvoice` request. If you do not provide
12    /// `idempotency_key` (or provide an empty string as the value), the endpoint treats each
13    /// request as independent.
14    ///
15    /// For more information, see
16    /// [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency).
17    pub idempotency_key: Option<String>,
18}