1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* 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 MeterUsageItem {
/// Chargeable units (after free threshold) as string for precision
#[serde(rename = "chargeable_units")]
pub chargeable_units: String,
/// Total units consumed as string for precision
#[serde(rename = "consumed_units")]
pub consumed_units: String,
/// Currency for the price per unit
#[serde(rename = "currency")]
pub currency: models::Currency,
/// Free threshold units for this meter
#[serde(rename = "free_threshold")]
pub free_threshold: i64,
/// Meter identifier
#[serde(rename = "id")]
pub id: String,
/// Meter name
#[serde(rename = "name")]
pub name: String,
/// Price per unit in string format for precision
#[serde(rename = "price_per_unit")]
pub price_per_unit: String,
/// Total price charged for this meter in smallest currency unit (cents)
#[serde(rename = "total_price")]
pub total_price: i32,
}
impl MeterUsageItem {
pub fn new(chargeable_units: String, consumed_units: String, currency: models::Currency, free_threshold: i64, id: String, name: String, price_per_unit: String, total_price: i32) -> MeterUsageItem {
MeterUsageItem {
chargeable_units,
consumed_units,
currency,
free_threshold,
id,
name,
price_per_unit,
total_price,
}
}
}