crypto_pay_api/models/
response.rs1use serde::Deserialize;
2
3use super::{Check, Invoice, Transfer};
4
5#[derive(Debug, Deserialize)]
6pub struct ApiResponse<T> {
7 pub ok: bool,
8 pub result: Option<T>,
9 pub error: Option<String>,
10 pub error_code: Option<i32>,
11}
12
13#[derive(Debug, Deserialize)]
14pub struct GetMeResponse {
15 pub app_id: i64,
17 pub name: String,
19 pub payment_processing_bot_username: String,
21 #[serde(skip_serializing_if = "Option::is_none")]
23 pub webhook_endpoint: Option<String>,
24}
25
26#[derive(Debug, Deserialize)]
27pub struct GetInvoicesResponse {
28 pub items: Vec<Invoice>,
29}
30
31#[derive(Debug, Deserialize)]
32pub struct GetTransfersResponse {
33 pub items: Vec<Transfer>,
34}
35
36#[derive(Debug, Deserialize)]
37pub struct GetChecksResponse {
38 pub items: Vec<Check>,
39}