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
/*
* 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};
/// CurrentBreakup : Breakup of the current (first) payment
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CurrentBreakup {
/// Total discount amount
#[serde(rename = "discount")]
pub discount: i32,
/// Subtotal before discount (pre-tax original prices)
#[serde(rename = "subtotal")]
pub subtotal: i32,
/// Total tax amount
#[serde(rename = "tax", skip_serializing_if = "Option::is_none")]
pub tax: Option<i32>,
/// Total amount to be charged (final amount after all calculations)
#[serde(rename = "total_amount")]
pub total_amount: i32,
}
impl CurrentBreakup {
/// Breakup of the current (first) payment
pub fn new(discount: i32, subtotal: i32, total_amount: i32) -> CurrentBreakup {
CurrentBreakup {
discount,
subtotal,
tax: None,
total_amount,
}
}
}