baselinker/requests/orders/
get_order_payments_history.rs1use crate::common::RequestTrait;
2use chrono::serde::ts_seconds;
3use chrono::{DateTime, Utc};
4use rust_decimal::Decimal;
5use serde::{Deserialize, Serialize};
6
7#[derive(Serialize, Deserialize, Debug)]
8pub struct Payment {
9 pub paid_before: Decimal,
11 pub paid_after: Decimal,
13 pub total_price: Decimal,
14 pub currency: String,
15 pub external_payment_id: String,
17 #[serde(with = "ts_seconds")]
19 pub date: DateTime<Utc>,
20 pub comment: String,
21}
22
23#[derive(Serialize, Deserialize, Debug)]
24pub struct GetOrderPaymentsHistoryResponse {
25 pub payments: Vec<Payment>,
26}
27
28#[derive(Serialize, Deserialize, Debug)]
32pub struct GetOrderPaymentsHistory {
33 pub order_id: i64,
34 pub show_full_history: Option<bool>,
38}
39
40impl RequestTrait<GetOrderPaymentsHistoryResponse> for GetOrderPaymentsHistory {
41 const METHOD: &'static str = "getOrderPaymentsHistory";
42}