mercadopago_sdk_rust/
webhooks.rs

1//! You can setup your webhooks only
2
3use serde::{Deserialize, Serialize};
4
5#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
6pub struct WebhookRequest {
7    #[serde(rename = "id")]
8    pub notification_id: i64,
9    /// When true, indicates that it is running in production.
10    pub live_mode: bool,
11    #[serde(rename = "type")]
12    pub type_field: String,
13    pub date_created: String,
14    pub application_id: i64,
15    /// User id of which you are receiving this notification.
16    pub user_id: i64,
17    pub version: i64,
18    pub api_version: String,
19    pub action: String,
20    pub data: Data,
21}
22
23#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
24pub struct Data {
25    #[serde(rename = "id")]
26    pub payment_id: String,
27}