dodopayments_rust 2.2.1

Rust SDK for Dodo Payments API
Documentation
/*
 * public
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.87.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct MeterDetails {
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "free_threshold", skip_serializing_if = "Option::is_none")]
    pub free_threshold: Option<i64>,
    #[serde(rename = "measurement_unit")]
    pub measurement_unit: String,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "price_per_unit")]
    pub price_per_unit: String,
}

impl MeterDetails {
    pub fn new(measurement_unit: String, name: String, price_per_unit: String) -> MeterDetails {
        MeterDetails {
            description: None,
            free_threshold: None,
            measurement_unit,
            name,
            price_per_unit,
        }
    }
}