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 = "reference", alias = "Reference")]
18    pub reference: Option<String>,
19    #[serde(rename = "credit", alias = "Credit")]
20    pub credit: f64,
21    #[serde(rename = "charge", alias = "Charge")]
22    pub charge: f64,
23    #[serde(rename = "tax", alias = "Tax")]
24    pub tax: f64,
25    #[serde(rename = "total", alias = "Total")]
26    pub total: f64,
27    #[serde(rename = "months", alias = "Months")]
28    pub months: i32,
29}
30
31impl PurchasableProration {
32    pub fn new(
33        reference: Option<String>,
34        credit: f64,
35        charge: f64,
36        tax: f64,
37        total: f64,
38        months: i32,
39    ) -> PurchasableProration {
40        PurchasableProration {
41            reference,
42            credit,
43            charge,
44            tax,
45            total,
46            months,
47        }
48    }
49}