deriv_api_schema/
partner_account_creation_request.rs

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