fireblocks_sdk/models/
amount_over_time_config_v2.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 {
10    crate::models,
11    serde::{Deserialize, Serialize},
12};
13
14/// AmountOverTimeConfigV2 : Amount over time configuration
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AmountOverTimeConfigV2 {
17    #[serde(rename = "range")]
18    pub range: models::AmountOverTimeConfigV2Range,
19    /// Currency for the amount
20    #[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
21    pub currency: Option<Currency>,
22    #[serde(rename = "timePeriod")]
23    pub time_period: models::TimePeriodConfigV2,
24}
25
26impl AmountOverTimeConfigV2 {
27    /// Amount over time configuration
28    pub fn new(
29        range: models::AmountOverTimeConfigV2Range,
30        time_period: models::TimePeriodConfigV2,
31    ) -> AmountOverTimeConfigV2 {
32        AmountOverTimeConfigV2 {
33            range,
34            currency: None,
35            time_period,
36        }
37    }
38}
39/// Currency for the amount
40#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
41pub enum Currency {
42    #[serde(rename = "NATIVE")]
43    Native,
44    #[serde(rename = "USD")]
45    Usd,
46    #[serde(rename = "EUR")]
47    Eur,
48}
49
50impl Default for Currency {
51    fn default() -> Currency {
52        Self::Native
53    }
54}