fireblocks_sdk/models/
convert_assets_request.rs

1// Fireblocks API
2//
3// Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain.  - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com)
4//
5// The version of the OpenAPI document: 1.8.0
6// Contact: developers@fireblocks.com
7// Generated by: https://openapi-generator.tech
8
9use serde::{Deserialize, Serialize};
10
11#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
12pub struct ConvertAssetsRequest {
13    /// Name of the source asset (must be in a currency that is supported for
14    /// conversions in the selected exchange type that corresponds to your
15    /// exchange ID)
16    #[serde(rename = "srcAsset")]
17    pub src_asset: String,
18    /// Name of the destination asset (must be in a currency that is supported
19    /// for conversions in the selected exchange type that corresponds to your
20    /// exchange ID)
21    #[serde(rename = "destAsset")]
22    pub dest_asset: String,
23    /// The amount to transfer (in the currency of the source asset)
24    #[serde(rename = "amount")]
25    pub amount: f64,
26}
27
28impl ConvertAssetsRequest {
29    pub fn new(src_asset: String, dest_asset: String, amount: f64) -> ConvertAssetsRequest {
30        ConvertAssetsRequest {
31            src_asset,
32            dest_asset,
33            amount,
34        }
35    }
36}