Skip to main content

autogen_squareup/models/
update_booking_request.rs

1/*
2 * Square
3 *
4 * Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.
5 *
6 * The version of the OpenAPI document: 2.0
7 * Contact: developers@squareup.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct UpdateBookingRequest {
16    /// A unique key to make this request an idempotent operation.
17    #[serde(rename = "idempotency_key", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
18    pub idempotency_key: Option<Option<String>>,
19    #[serde(rename = "booking")]
20    pub booking: Box<models::Booking>,
21}
22
23impl UpdateBookingRequest {
24    pub fn new(booking: models::Booking) -> UpdateBookingRequest {
25        UpdateBookingRequest {
26            idempotency_key: None,
27            booking: Box::new(booking),
28        }
29    }
30}
31