square_api_client/models/update_invoice_request.rs
1//! Request body struct for the Update Invoice API
2
3use serde::Serialize;
4
5use super::Invoice;
6
7/// This is a model struct for UpdateInvoiceRequest type.
8#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize)]
9pub struct UpdateInvoiceRequest {
10 /// The invoice fields to update. The current invoice version must be specified in the `version`
11 /// field. For more information, see [Update an
12 /// Invoice](https://developer.squareup.com/docs/invoices-api/update-invoices).
13 pub invoice: Invoice,
14 /// A unique string that identifies the `UpdateInvoice` request. If you do not provide
15 /// `idempotency_key` (or provide an empty string as the value), the endpoint treats each
16 /// request as independent.
17 ///
18 /// For more information, see
19 /// [Idempotency](https://developer.squareup.com/docs/basics/api101/idempotency).
20 pub idempotency_key: Option<String>,
21 /// The list of fields to clear. For examples, see [Update an
22 /// Invoice](https://developer.squareup.com/docs/invoices-api/update-invoices).
23 pub fields_to_clear: Option<Vec<String>>,
24}