/*
 * 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.1
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

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

/// XApiPricing : Canonical X/Twitter API pricing table. Zernio passes X API costs through at exact rates with zero markup, so every call you make has a known per-unit price. Use this payload alongside `/v1/usage-stats` (which returns per-operation call counts via `xApiCallsByOperation`) to compute exact cost attribution by X action.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct XApiPricing {
    #[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
    pub currency: Option<String>,
    /// Always 0% — Zernio does not mark up X API rates.
    #[serde(rename = "markup", skip_serializing_if = "Option::is_none")]
    pub markup: Option<String>,
    #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
    pub source: Option<String>,
    /// Date the prices were last verified against X's published rates.
    #[serde(rename = "lastVerified", skip_serializing_if = "Option::is_none")]
    pub last_verified: Option<String>,
    /// Rollup of operations grouped by their per-call price.
    #[serde(rename = "tiers", skip_serializing_if = "Option::is_none")]
    pub tiers: Option<Vec<models::XApiPricingTiersInner>>,
    /// Flat list of every X operation Zernio can perform, with its rate.
    #[serde(rename = "operations", skip_serializing_if = "Option::is_none")]
    pub operations: Option<Vec<models::XApiOperation>>,
}

impl XApiPricing {
    /// Canonical X/Twitter API pricing table. Zernio passes X API costs through at exact rates with zero markup, so every call you make has a known per-unit price. Use this payload alongside `/v1/usage-stats` (which returns per-operation call counts via `xApiCallsByOperation`) to compute exact cost attribution by X action.
    pub fn new() -> XApiPricing {
        XApiPricing {
            currency: None,
            markup: None,
            source: None,
            last_verified: None,
            tiers: None,
            operations: None,
        }
    }
}
