deriv_api_schema/p2p_advertiser_update_request.rs
1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/p2p_advertiser_update/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_listed::IsListed;
13use crate::show_name::ShowName;
14
15/// Update the information of the P2P advertiser for the current account. Can only be used by an approved P2P advertiser.
16#[derive(Debug, Clone, Serialize, Deserialize)]
17#[serde(rename_all = "snake_case")]
18pub struct P2pAdvertiserUpdateRequest {
19 /// [Optional] Advertiser's contact information, to be used as a default for new sell adverts.\n
20 // Correct serde attribute construction - Use helper
21 #[serde(skip_serializing_if = "Option::is_none")]
22 pub contact_info: Option<String>,
23 /// [Optional] Default description that can be used every time an advert is created.\n
24 // Correct serde attribute construction - Use helper
25 #[serde(skip_serializing_if = "Option::is_none")]
26 pub default_advert_description: Option<String>,
27 /// [Optional] Used to set if the advertiser's adverts could be listed. When `0`, adverts won't be listed regardless of they are active or not. This doesn't change the `is_active` of each individual advert.\n
28 // Correct serde attribute construction - Use helper
29 #[serde(skip_serializing_if = "Option::is_none")]
30 pub is_listed: Option<IsListed>,
31 /// [Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.\n
32 // Correct serde attribute construction - Use helper
33 #[serde(skip_serializing_if = "Option::is_none")]
34 pub loginid: Option<String>,
35 /// Must be 1\n
36 // Correct serde attribute construction - Use helper
37
38 pub p2p_advertiser_update: i64,
39 /// [Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.\n
40 // Correct serde attribute construction - Use helper
41 #[serde(skip_serializing_if = "Option::is_none")]
42 pub passthrough: Option<Value>,
43 /// [Optional] Advertiser's payment information, to be used as a default for new sell adverts.\n
44 // Correct serde attribute construction - Use helper
45 #[serde(skip_serializing_if = "Option::is_none")]
46 pub payment_info: Option<String>,
47 /// [Optional] Used to map request to response.\n
48 // Correct serde attribute construction - Use helper
49 #[serde(skip_serializing_if = "Option::is_none")]
50 pub req_id: Option<i64>,
51 /// [Optional] Weekly availability schedule. Ads are visible and orders can be created only during available periods.\n
52 // Correct serde attribute construction - Use helper
53 #[serde(skip_serializing_if = "Option::is_none")]
54 pub schedule: Option<Vec<String>>,
55 /// [Optional] When `1`, the advertiser's real name will be displayed on to other users on adverts and orders.\n
56 // Correct serde attribute construction - Use helper
57 #[serde(skip_serializing_if = "Option::is_none")]
58 pub show_name: Option<ShowName>,
59 /// [Optional] Used to upgrade daily limits of eligible advertiser.\n
60 // Correct serde attribute construction - Use helper
61 #[serde(skip_serializing_if = "Option::is_none")]
62 pub upgrade_limits: Option<i64>,
63}
64