late 0.0.1399

API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
Documentation
/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api  Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal.  Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).  Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
 *
 * The version of the OpenAPI document: 1.624.0
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhookPayloadAccountPrivacyRequestPrivacyRequest {
    /// customer_data_request: the merchant asked for the data you hold about `customer`. Send it to the merchant.  customer_redact: erase the data you hold about `customer` and the orders in `orderIds`.  shop_redact: erase the data you hold about the whole shop. Sent 48 hours after the merchant uninstalled the app.
    #[serde(rename = "type")]
    pub r#type: Type,
    #[serde(rename = "shopDomain")]
    pub shop_domain: String,
    #[serde(rename = "shopId", deserialize_with = "Option::deserialize")]
    pub shop_id: Option<String>,
    #[serde(rename = "customer")]
    pub customer: Box<models::WebhookPayloadAccountPrivacyRequestPrivacyRequestCustomer>,
    /// The Shopify order ids the request covers. Empty for shop_redact.
    #[serde(rename = "orderIds")]
    pub order_ids: Vec<String>,
    /// Shopify's id for a customer_data_request.
    #[serde(rename = "dataRequestId", deserialize_with = "Option::deserialize")]
    pub data_request_id: Option<String>,
}

impl WebhookPayloadAccountPrivacyRequestPrivacyRequest {
    pub fn new(
        r#type: Type,
        shop_domain: String,
        shop_id: Option<String>,
        customer: models::WebhookPayloadAccountPrivacyRequestPrivacyRequestCustomer,
        order_ids: Vec<String>,
        data_request_id: Option<String>,
    ) -> WebhookPayloadAccountPrivacyRequestPrivacyRequest {
        WebhookPayloadAccountPrivacyRequestPrivacyRequest {
            r#type,
            shop_domain,
            shop_id,
            customer: Box::new(customer),
            order_ids,
            data_request_id,
        }
    }
}
/// customer_data_request: the merchant asked for the data you hold about `customer`. Send it to the merchant.  customer_redact: erase the data you hold about `customer` and the orders in `orderIds`.  shop_redact: erase the data you hold about the whole shop. Sent 48 hours after the merchant uninstalled the app.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "customer_data_request")]
    CustomerDataRequest,
    #[serde(rename = "customer_redact")]
    CustomerRedact,
    #[serde(rename = "shop_redact")]
    ShopRedact,
}

impl Default for Type {
    fn default() -> Type {
        Self::CustomerDataRequest
    }
}