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
// @generated DO NOT EDIT.
//
// Generated from the CNB OpenAPI specification by `cnb-codegen`.
// Run `cargo run -p cnb-codegen --manifest-path codegen/Cargo.toml \
// -- --spec codegen/spec/swagger.json --out src` to refresh.
#![allow(clippy::all)]
#![allow(missing_docs)]
#![allow(unused_imports)]
#![allow(unused_mut)]
use reqwest::Method;
use serde::Serialize;
use crate::error::{ApiError, Result};
use crate::http::HttpInner;
use crate::models;
// `Charge` resource client (generated, 1 operations).
/// Resource client.
#[derive(Debug, Clone)]
pub struct ChargeClient {
inner: HttpInner,
}
impl ChargeClient {
/// Construct a new resource client. Normally obtained
/// via [`crate::ApiClient`] rather than directly.
pub fn new(inner: HttpInner) -> Self {
Self { inner }
}
/// 查看特权额度
///
/// `GET /{slug}/-/charge/special-amount`
pub async fn get_special_amount(&self, slug: String) -> Result<crate::models::SpecialAmount> {
let path = format!("/{}/-/charge/special-amount", slug);
let mut url = self.inner.url(&path)?;
self.inner
.execute::<crate::models::SpecialAmount>(Method::GET, url)
.await
}
}