/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
 *
 * The version of the OpenAPI document: 1.0.4
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// WebhookPayloadMessageMetadataOrder : WhatsApp only. Cart submitted by the user from a commerce message (catalog, product, or product-list message). Meta's `order` object forwarded verbatim.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhookPayloadMessageMetadataOrder {
    /// Meta catalog the ordered products belong to.
    #[serde(rename = "catalog_id", skip_serializing_if = "Option::is_none")]
    pub catalog_id: Option<String>,
    /// Optional free-text note the user attached to the cart.
    #[serde(rename = "text", skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
    #[serde(rename = "product_items", skip_serializing_if = "Option::is_none")]
    pub product_items: Option<Vec<models::WebhookPayloadMessageMetadataOrderProductItemsInner>>,
}

impl WebhookPayloadMessageMetadataOrder {
    /// WhatsApp only. Cart submitted by the user from a commerce message (catalog, product, or product-list message). Meta's `order` object forwarded verbatim.
    pub fn new() -> WebhookPayloadMessageMetadataOrder {
        WebhookPayloadMessageMetadataOrder {
            catalog_id: None,
            text: None,
            product_items: None,
        }
    }
}
