etopay_api_types/api/
dlt.rs1use super::networks::ApiNetwork;
2use crate::api::decimal::Decimal;
3use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Deserialize, Serialize, Clone)]
7#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema, utoipa::IntoParams))]
8pub struct AddressQueryParameters {
9 pub network_key: String,
10}
11
12#[derive(Debug, Default, Deserialize, Serialize, Clone)]
14#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
15pub struct SetUserAddressRequest {
16 pub address: String,
18}
19
20#[derive(Default, Serialize, Deserialize)]
22#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
23pub struct GetUserAddressResponse {
24 pub address: String,
26}
27
28#[derive(Debug, Deserialize, Serialize, Clone)]
29#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
30pub struct SetPreferredNetworkRequest {
31 pub network_key: Option<String>,
33}
34
35#[derive(Debug, Deserialize, Serialize, Clone)]
36#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
37pub struct GetPreferredNetworkResponse {
38 pub network_key: Option<String>,
40}
41
42#[derive(Debug, Deserialize, Serialize, Clone)]
44#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
45pub struct ApiGetNetworksResponse {
46 pub networks: Vec<ApiNetwork>,
47}
48
49#[derive(Debug, Deserialize, Serialize, Clone)]
52#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
53pub struct Course {
54 pub course: Decimal,
55 pub date: String,
56}
57
58#[derive(Debug, Deserialize, Serialize, Clone)]
63#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema, utoipa::IntoParams))]
64pub struct GetCourseRequestQueries {
65 pub network_key: String,
66}
67
68#[derive(Debug, Deserialize, Serialize)]
69#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema, utoipa::IntoParams))]
70pub struct GetCourseResponse {
71 pub course: Course,
72}
73
74#[derive(Debug, Deserialize, Serialize, Clone)]
77#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema, utoipa::IntoParams))]
78pub struct GetCourseHistoryRequestQueries {
79 pub network_key: String,
80 pub from_date: Option<String>,
81 pub to_date: Option<String>,
82}
83
84#[derive(Debug, Deserialize, Serialize)]
85#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
86pub struct GetCourseHistoryResponse {
87 pub courses: Vec<Course>,
88}