Skip to main content

bitwarden_api_api/models/
purchasable_proration.rs

1/*
2 * Bitwarden Internal API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: latest
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PurchasableProration {
17    #[serde(rename = "credit", alias = "Credit")]
18    pub credit: f64,
19    #[serde(rename = "charge", alias = "Charge")]
20    pub charge: f64,
21    #[serde(rename = "tax", alias = "Tax")]
22    pub tax: f64,
23    #[serde(rename = "total", alias = "Total")]
24    pub total: f64,
25    #[serde(rename = "months", alias = "Months")]
26    pub months: i32,
27}
28
29impl PurchasableProration {
30    pub fn new(
31        credit: f64,
32        charge: f64,
33        tax: f64,
34        total: f64,
35        months: i32,
36    ) -> PurchasableProration {
37        PurchasableProration {
38            credit,
39            charge,
40            tax,
41            total,
42            months,
43        }
44    }
45}