artcoded_api/models/
invoice_summary.rs

1/*
2 * Artcoded
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.0.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct InvoiceSummary {
16    #[serde(rename = "period", skip_serializing_if = "Option::is_none")]
17    pub period: Option<String>,
18    #[serde(rename = "dateOfInvoice", skip_serializing_if = "Option::is_none")]
19    pub date_of_invoice: Option<String>,
20    #[serde(rename = "amountType", skip_serializing_if = "Option::is_none")]
21    pub amount_type: Option<AmountType>,
22    #[serde(rename = "amount", skip_serializing_if = "Option::is_none")]
23    pub amount: Option<f64>,
24    #[serde(rename = "hoursPerDay", skip_serializing_if = "Option::is_none")]
25    pub hours_per_day: Option<f64>,
26    #[serde(rename = "subTotal", skip_serializing_if = "Option::is_none")]
27    pub sub_total: Option<f64>,
28    #[serde(rename = "client", skip_serializing_if = "Option::is_none")]
29    pub client: Option<String>,
30}
31
32impl InvoiceSummary {
33    pub fn new() -> InvoiceSummary {
34        InvoiceSummary {
35            period: None,
36            date_of_invoice: None,
37            amount_type: None,
38            amount: None,
39            hours_per_day: None,
40            sub_total: None,
41            client: None,
42        }
43    }
44}
45///
46#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
47pub enum AmountType {
48    #[serde(rename = "DAYS")]
49    Days,
50    #[serde(rename = "HOURS")]
51    Hours,
52}
53
54impl Default for AmountType {
55    fn default() -> AmountType {
56        Self::Days
57    }
58}