deriv_api_schema/
p2p_advertiser_list_request.rs

1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/p2p_advertiser_list/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::is_blocked::IsBlocked;
13use crate::sort_by::SortBy;
14use crate::trade_partners::TradePartners;
15
16/// Retrieve advertisers has/had trade with the current advertiser.
17#[derive(Debug, Clone, Serialize, Deserialize)]
18#[serde(rename_all = "snake_case")]
19pub struct P2pAdvertiserListRequest {
20    /// [Optional] Search for advertiser by name. Partial matches will be returned.\n
21    // Correct serde attribute construction - Use helper
22    #[serde(skip_serializing_if = "Option::is_none")] 
23    pub advertiser_name: Option<String>,
24    /// [Optional] Used to return only blocked or unblocked partners\n
25    // Correct serde attribute construction - Use helper
26    #[serde(skip_serializing_if = "Option::is_none")] 
27    pub is_blocked: Option<IsBlocked>,
28    /// [Optional] Used for paging.\n
29    // Correct serde attribute construction - Use helper
30    #[serde(skip_serializing_if = "Option::is_none")] 
31    pub limit: Option<i64>,
32    /// [Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.\n
33    // Correct serde attribute construction - Use helper
34    #[serde(skip_serializing_if = "Option::is_none")] 
35    pub loginid: Option<String>,
36    /// [Optional] Used for paging.\n
37    // Correct serde attribute construction - Use helper
38    #[serde(skip_serializing_if = "Option::is_none")] 
39    pub offset: Option<i64>,
40    /// Must be 1\n
41    // Correct serde attribute construction - Use helper
42    
43    pub p2p_advertiser_list: i64,
44    /// [Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.\n
45    // Correct serde attribute construction - Use helper
46    #[serde(skip_serializing_if = "Option::is_none")] 
47    pub passthrough: Option<Value>,
48    /// [Optional] Used to map request to response.\n
49    // Correct serde attribute construction - Use helper
50    #[serde(skip_serializing_if = "Option::is_none")] 
51    pub req_id: Option<i64>,
52    /// [Optional] How the results are sorted.\n
53    // Correct serde attribute construction - Use helper
54    #[serde(skip_serializing_if = "Option::is_none")] 
55    pub sort_by: Option<SortBy>,
56    /// [Optional] Get all advertisers has/had trade.\n
57    // Correct serde attribute construction - Use helper
58    #[serde(skip_serializing_if = "Option::is_none")] 
59    pub trade_partners: Option<TradePartners>,
60}
61