1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* 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.4
* 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,
}
}
}