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
use crate::common::RequestTrait;
use chrono::serde::ts_seconds;
use chrono::{DateTime, Utc};
use rust_decimal::Decimal;
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug)]
pub struct Payment {
pub paid_before: Decimal,
pub paid_after: Decimal,
pub total_price: Decimal,
pub currency: String,
pub external_payment_id: String,
#[serde(with = "ts_seconds")]
pub date: DateTime<Utc>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct GetOrderPaymentsHistoryResponse {
pub payments: Vec<Payment>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct GetOrderPaymentsHistory {
pub order_id: i64,
pub show_full_history: Option<bool>,
}
impl RequestTrait<GetOrderPaymentsHistoryResponse> for GetOrderPaymentsHistory {
const METHOD: &'static str = "getOrderPaymentsHistory";
}