late 0.0.894

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).
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).
 *
 * 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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateCustomConversionRequest {
    /// Platform ad account id (Meta act_<n>, Google customer id, LinkedIn account id, ...).
    #[serde(rename = "adAccountId")]
    pub ad_account_id: String,
    /// Also the reuse key, together with pixelId.
    #[serde(rename = "name")]
    pub name: String,
    /// Meta pixel id (event_source_id). From GET /v1/accounts/{accountId}/tracking-tags.
    #[serde(rename = "pixelId")]
    pub pixel_id: String,
    /// Meta custom_event_type, e.g. LEAD, PURCHASE, OTHER.
    #[serde(rename = "customEventType")]
    pub custom_event_type: String,
    /// Meta conversion rule, forwarded verbatim.
    #[serde(rename = "rule")]
    pub rule: serde_json::Value,
}

impl CreateCustomConversionRequest {
    pub fn new(
        ad_account_id: String,
        name: String,
        pixel_id: String,
        custom_event_type: String,
        rule: serde_json::Value,
    ) -> CreateCustomConversionRequest {
        CreateCustomConversionRequest {
            ad_account_id,
            name,
            pixel_id,
            custom_event_type,
            rule,
        }
    }
}