/*
* 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.104.0
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// XApiPricing : Canonical X 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%, because 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 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,
}
}
}