/*
 * Tribufu API
 *
 * API to access Tribufu services.
 *
 * The version of the OpenAPI document: 1.3.0
 * Contact: contact@tribufu.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ProductPrice {
    #[serde(rename = "currency", deserialize_with = "Option::deserialize")]
    pub currency: Option<String>,
    #[serde(rename = "amount", skip_serializing_if = "Option::is_none")]
    pub amount: Option<f64>,
    #[serde(rename = "renewal", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub renewal: Option<Option<f64>>,
}

impl ProductPrice {
    pub fn new(currency: Option<String>) -> ProductPrice {
        ProductPrice {
            currency,
            amount: None,
            renewal: None,
        }
    }
}

