deriv_api_schema/
new_partner_account_request.rs

1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/new_partner_account/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::fatca_declaration::FatcaDeclaration;
13use crate::landing_company_short::LandingCompanyShort;
14use crate::partner_type::PartnerType;
15use crate::provider::Provider;
16use crate::account_turnover::AccountTurnover;
17use crate::client_type::ClientType;
18
19/// This call opens a new Real-Partner Account
20#[derive(Debug, Clone, Serialize, Deserialize)]
21#[serde(rename_all = "snake_case")]
22pub struct NewPartnerAccountRequest {
23    /// [Optional] The anticipated account turnover.\n
24    // Correct serde attribute construction - Use helper
25    #[serde(skip_serializing_if = "Option::is_none")] 
26    pub account_turnover: Option<AccountTurnover>,
27    /// [Optional] Within 100 characters.\n
28    // Correct serde attribute construction - Use helper
29    #[serde(skip_serializing_if = "Option::is_none")] 
30    pub address_city: Option<String>,
31    /// Within 70 characters, with no leading whitespaces and may contain letters/numbers and/or any of following characters '.,:;()@#/-\n
32    // Correct serde attribute construction - Use helper
33    #[serde(skip_serializing_if = "Option::is_none")] 
34    pub address_line_1: Option<String>,
35    /// Field 'address_line_2' mapped to Value due to complexity/potential issues.\n
36    // Correct serde attribute construction - Use helper
37    #[serde(skip_serializing_if = "Option::is_none")] 
38    pub address_line_2: Option<Value>,
39    /// [Optional] Within 20 characters and may not contain '+'.\n
40    // Correct serde attribute construction - Use helper
41    #[serde(skip_serializing_if = "Option::is_none")] 
42    pub address_postcode: Option<String>,
43    /// [Optional] Possible value receive from `states_list` call.\n
44    // Correct serde attribute construction - Use helper
45    #[serde(skip_serializing_if = "Option::is_none")] 
46    pub address_state: Option<String>,
47    /// [Optional] The phone's calling country code.\n
48    // Correct serde attribute construction - Use helper
49    #[serde(skip_serializing_if = "Option::is_none")] 
50    pub calling_country_code: Option<Value>,
51    /// [Optional] Country of legal citizenship, 2-letter country code.\n
52    // Correct serde attribute construction - Use helper
53    #[serde(skip_serializing_if = "Option::is_none")] 
54    pub citizen: Option<Value>,
55    /// [Optional] Indicates whether this is for a client requesting an account with professional status.\n
56    // Correct serde attribute construction - Use helper
57    #[serde(skip_serializing_if = "Option::is_none")] 
58    pub client_type: Option<ClientType>,
59    /// [Optional] Company name. Only applicable for partners of type company.\n
60    // Correct serde attribute construction - Use helper
61    #[serde(skip_serializing_if = "Option::is_none")] 
62    pub company_name: Option<String>,
63    /// [Optional] Company registration number. Only applicable for partners of type company.\n
64    // Correct serde attribute construction - Use helper
65    #[serde(skip_serializing_if = "Option::is_none")] 
66    pub company_registration_no: Option<String>,
67    /// [Optional] To set currency of the account. List of supported currencies can be acquired with `payout_currencies` call.\n
68    // Correct serde attribute construction - Use helper
69    #[serde(skip_serializing_if = "Option::is_none")] 
70    pub currency: Option<String>,
71    /// Date of birth format: `yyyy-mm-dd`.\n
72    // Correct serde attribute construction - Use helper
73    #[serde(skip_serializing_if = "Option::is_none")] 
74    pub date_of_birth: Option<String>,
75    /// [Optional] Indicates client's self-declaration of FATCA.\n
76    // Correct serde attribute construction - Use helper
77    #[serde(skip_serializing_if = "Option::is_none")] 
78    pub fatca_declaration: Option<FatcaDeclaration>,
79    /// Within 1-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes.\n
80    // Correct serde attribute construction - Use helper
81    #[serde(skip_serializing_if = "Option::is_none")] 
82    pub first_name: Option<String>,
83    /// [Optional] If specified, will return only the underlyings for the specified landing company.\n
84    // Correct serde attribute construction - Use helper
85    #[serde(skip_serializing_if = "Option::is_none")] 
86    pub landing_company_short: Option<LandingCompanyShort>,
87    /// Within 1-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes.\n
88    // Correct serde attribute construction - Use helper
89    #[serde(skip_serializing_if = "Option::is_none")] 
90    pub last_name: Option<String>,
91    /// [Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.\n
92    // Correct serde attribute construction - Use helper
93    #[serde(skip_serializing_if = "Option::is_none")] 
94    pub loginid: Option<String>,
95    /// Must be `1`\n
96    // Correct serde attribute construction - Use helper
97    
98    pub new_partner_account: i64,
99    /// [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates).\n
100    // Correct serde attribute construction - Use helper
101    #[serde(skip_serializing_if = "Option::is_none")] 
102    pub non_pep_declaration: Option<i64>,
103    /// Defines whether this partner is an individual or a company. Only applicable for partners\n
104    // Correct serde attribute construction - Use helper
105    
106    pub partner_type: PartnerType,
107    /// [Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.\n
108    // Correct serde attribute construction - Use helper
109    #[serde(skip_serializing_if = "Option::is_none")] 
110    pub passthrough: Option<Value>,
111    /// [Optional] Starting with `+` followed by 8-35 digits, allowing hyphens or space.\n
112    // Correct serde attribute construction - Use helper
113    #[serde(skip_serializing_if = "Option::is_none")] 
114    pub phone: Option<String>,
115    /// [Optional] Name  of the provider platform.\n
116    // Correct serde attribute construction - Use helper
117    #[serde(skip_serializing_if = "Option::is_none")] 
118    pub provider: Option<Provider>,
119    /// [Optional] Used to map request to response.\n
120    // Correct serde attribute construction - Use helper
121    #[serde(skip_serializing_if = "Option::is_none")] 
122    pub req_id: Option<i64>,
123    /// 2-letter country code, possible value receive from `residence_list` call.\n
124    // Correct serde attribute construction - Use helper
125    #[serde(skip_serializing_if = "Option::is_none")] 
126    pub residence: Option<String>,
127    /// [Optional] Accept any value in enum list.\n
128    // Correct serde attribute construction - Use helper
129    #[serde(skip_serializing_if = "Option::is_none")] 
130    pub salutation: Option<String>,
131    /// [Optional] Answer to secret question, within 4-50 characters. Required for new account and existing client details will be used if client open another account.\n
132    // Correct serde attribute construction - Use helper
133    #[serde(skip_serializing_if = "Option::is_none")] 
134    pub secret_answer: Option<String>,
135    /// [Optional] Accept any value in enum list. Required for new account and existing client details will be used if client open another account.\n
136    // Correct serde attribute construction - Use helper
137    #[serde(skip_serializing_if = "Option::is_none")] 
138    pub secret_question: Option<String>,
139    /// Partner's Website URI/Promotional Platform\n
140    // Correct serde attribute construction - Use helper
141    
142    pub website: String,
143}
144