deriv_api_schema/
unsubscribe_email_response.rs

1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/unsubscribe_email/receive.json
4
5// Use direct crate names for imports
6use serde::{Deserialize, Serialize};
7use serde_json::Value;
8
9
10
11// Import required types from the *same* crate
12use crate::email_unsubscribe_status::EmailUnsubscribeStatus;
13
14/// The result of the unsubscribe email request.
15#[derive(Debug, Clone, Serialize, Deserialize)]
16#[serde(rename_all = "snake_case")]
17pub struct UnsubscribeEmailResponse {
18    /// Customer User ID.\n
19    // Correct serde attribute construction - Use helper
20    #[serde(skip_serializing_if = "Option::is_none")] 
21    pub binary_user_id: Option<f64>,
22    /// Echo of the request made.\n
23    // Correct serde attribute construction - Use helper
24    
25    pub echo_req: Value,
26    /// `1`: email notification unsubscribed sucssesfully, `0`: failed to unsubscribed email notification\n
27    // Correct serde attribute construction - Use helper
28    #[serde(skip_serializing_if = "Option::is_none")] 
29    pub email_unsubscribe_status: Option<EmailUnsubscribeStatus>,
30    /// Action name of the request made.\n
31    // Correct serde attribute construction - Use helper
32    
33    pub msg_type: String,
34    /// Optional field sent in request to map to response, present only when request contains `req_id`.\n
35    // Correct serde attribute construction - Use helper
36    #[serde(skip_serializing_if = "Option::is_none")] 
37    pub req_id: Option<i64>,
38}
39