late 0.0.1376

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.587.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 UpdateAccountRequest {
    #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
    pub username: Option<String>,
    #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
    pub display_name: Option<String>,
    #[serde(rename = "xCapabilities", skip_serializing_if = "Option::is_none")]
    pub x_capabilities: Option<Box<models::UpdateAccountRequestXCapabilities>>,
    /// Facebook only (400 `invalid_field_value` on any other platform). Off by default for every Facebook account.  `true` makes this account sync the Meta ads of the ad accounts it reaches, like a `metaads` connection.  - The first sync starts at once (14 days, then 90 days of history in the background) and fires `account.ads.initial_sync_completed` for this `accountId` with `platform: metaads`. - It then refreshes on the Meta Ads schedule. - Each switch from `false` to `true` runs another initial sync and fires the webhook again. Sending `true` while it is on changes nothing. - Needs `ads_management` and `ads_read` on the account (403 `reconnect_required` otherwise, with `details.requiredPermissions`). - Needs ads access (403 `ads_addon_required`) and room in the managed ads allowance (403 `ads_allowance_exceeded`). - While a `metaads` connection has this account as `parentAccountId`, that connection syncs the ads instead.  Synced active ads count on the managed ads meter like ads from a Meta Ads connection.  `false` stops the sync. Ads already synced are kept, never deleted: they stop updating and stop counting on the meter, and a `metaads` connection of yours that reaches the same ad account takes them over. Posting, inbox and comments on the account are not affected.
    #[serde(rename = "metaAdsSyncEnabled", skip_serializing_if = "Option::is_none")]
    pub meta_ads_sync_enabled: Option<bool>,
}

impl UpdateAccountRequest {
    pub fn new() -> UpdateAccountRequest {
        UpdateAccountRequest {
            username: None,
            display_name: None,
            x_capabilities: None,
            meta_ads_sync_enabled: None,
        }
    }
}