deriv_api_schema/
cashier_request.rs

1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/cashier/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::provider::Provider;
13use crate::cashier::Cashier;
14use crate::type_::Type;
15use crate::dry_run::DryRun;
16
17/// Request the cashier info for the specified type.
18#[derive(Debug, Clone, Serialize, Deserialize)]
19#[serde(rename_all = "snake_case")]
20pub struct CashierRequest {
21    /// [Optional] Address for crypto withdrawal. Only applicable for `api` type.\n
22    // Correct serde attribute construction - Use helper
23    #[serde(skip_serializing_if = "Option::is_none")] 
24    pub address: Option<String>,
25    /// [Optional] Amount for crypto withdrawal. Only applicable for `api` type.\n
26    // Correct serde attribute construction - Use helper
27    #[serde(skip_serializing_if = "Option::is_none")] 
28    pub amount: Option<f64>,
29    /// Operation which needs to be requested from cashier\n
30    // Correct serde attribute construction - Use helper
31    
32    pub cashier: Cashier,
33    /// [Optional] If set to `1`, only validation is performed. Only applicable for `withdraw` using `crypto` provider and `api` type.\n
34    // Correct serde attribute construction - Use helper
35    #[serde(skip_serializing_if = "Option::is_none")] 
36    pub dry_run: Option<DryRun>,
37    /// [Optional] The `unique_id` of the estimated fee received from `crypto_estimations` call in case the client is willing to pay the returned fee in order to prioritise their withdrawal request.\n
38    // Correct serde attribute construction - Use helper
39    #[serde(skip_serializing_if = "Option::is_none")] 
40    pub estimated_fee_unique_id: Option<String>,
41    /// [Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.\n
42    // Correct serde attribute construction - Use helper
43    #[serde(skip_serializing_if = "Option::is_none")] 
44    pub loginid: Option<String>,
45    /// [Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.\n
46    // Correct serde attribute construction - Use helper
47    #[serde(skip_serializing_if = "Option::is_none")] 
48    pub passthrough: Option<Value>,
49    /// [Optional] Cashier provider.\n
50    // Correct serde attribute construction - Use helper
51    #[serde(skip_serializing_if = "Option::is_none")] 
52    pub provider: Option<Provider>,
53    /// [Optional] Used to map request to response.\n
54    // Correct serde attribute construction - Use helper
55    #[serde(skip_serializing_if = "Option::is_none")] 
56    pub req_id: Option<i64>,
57    /// [Optional] Data is returned from the cashier. The `crypto` provider only supports `api` (not `url`) for crypto accounts.\n
58    // Correct serde attribute construction - Use helper
59    #[serde(rename = "type", skip_serializing_if = "Option::is_none")] 
60    pub type_: Option<Type>,
61    /// [Optional] Email verification code (received from a `verify_email` call, which must be done first)\n
62    // Correct serde attribute construction - Use helper
63    #[serde(skip_serializing_if = "Option::is_none")] 
64    pub verification_code: Option<String>,
65}
66