quicknode_sdk/admin/
api_credits.rs1#[cfg(feature = "node")]
2use napi_derive::napi;
3#[cfg(feature = "python")]
4use pyo3::pyclass;
5#[cfg(feature = "python")]
6use pyo3_stub_gen::derive::gen_stub_pyclass;
7use serde::{Deserialize, Serialize};
8
9#[cfg_attr(feature = "python", gen_stub_pyclass)]
11#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
12#[cfg_attr(feature = "node", napi(object))]
13#[derive(Debug, Clone, Serialize, Deserialize)]
14pub struct ApiCredit {
15 pub method: String,
17 pub credits: i64,
19}
20
21#[cfg_attr(feature = "python", gen_stub_pyclass)]
23#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
24#[cfg_attr(feature = "node", napi(object))]
25#[derive(Debug, Clone, Serialize, Deserialize)]
26pub struct GetApiCreditsResponse {
27 pub data: Option<Vec<ApiCredit>>,
30 pub error: Option<String>,
32}