deriv_api_schema/
p2p_order_dispute_request.rs

1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/p2p_order_dispute/send.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::dispute_reason::DisputeReason;
13
14/// Dispute a P2P order.
15#[derive(Debug, Clone, Serialize, Deserialize)]
16#[serde(rename_all = "snake_case")]
17pub struct P2pOrderDisputeRequest {
18    /// The predefined dispute reason\n
19    // Correct serde attribute construction - Use helper
20    
21    pub dispute_reason: DisputeReason,
22    /// The unique identifier for this order.\n
23    // Correct serde attribute construction - Use helper
24    
25    pub id: String,
26    /// [Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.\n
27    // Correct serde attribute construction - Use helper
28    #[serde(skip_serializing_if = "Option::is_none")] 
29    pub loginid: Option<String>,
30    /// Field 'p2p_order_dispute' mapped to Value due to complexity/potential issues.\n
31    // Correct serde attribute construction - Use helper
32    
33    pub p2p_order_dispute: Value,
34    /// [Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.\n
35    // Correct serde attribute construction - Use helper
36    #[serde(skip_serializing_if = "Option::is_none")] 
37    pub passthrough: Option<Value>,
38    /// [Optional] Used to map request to response.\n
39    // Correct serde attribute construction - Use helper
40    #[serde(skip_serializing_if = "Option::is_none")] 
41    pub req_id: Option<i64>,
42}
43