plaid/model/
pay_stub_deductions_breakdown.rs

1use serde::{Serialize, Deserialize};
2///An object representing the deduction line items for the pay period
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct PayStubDeductionsBreakdown {
5    ///Raw amount of the deduction
6    #[serde(default, skip_serializing_if = "Option::is_none")]
7    pub current_amount: Option<f64>,
8    ///Description of the deduction line item
9    #[serde(default, skip_serializing_if = "Option::is_none")]
10    pub description: Option<String>,
11    ///The ISO-4217 currency code of the line item. Always `null` if `unofficial_currency_code` is non-null.
12    #[serde(default, skip_serializing_if = "Option::is_none")]
13    pub iso_currency_code: Option<String>,
14    /**The unofficial currency code associated with the line item. Always `null` if `iso_currency_code` is non-`null`. Unofficial currency codes are used for currencies that do not have official ISO currency codes, such as cryptocurrencies and the currencies of certain countries.
15
16See the [currency code schema](https://plaid.com/docs/api/accounts#currency-code-schema) for a full listing of supported `iso_currency_code`s.*/
17    #[serde(default, skip_serializing_if = "Option::is_none")]
18    pub unofficial_currency_code: Option<String>,
19    ///The year-to-date amount of the deduction
20    #[serde(default, skip_serializing_if = "Option::is_none")]
21    pub ytd_amount: Option<f64>,
22}
23impl std::fmt::Display for PayStubDeductionsBreakdown {
24    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
25        write!(f, "{}", serde_json::to_string(self).unwrap())
26    }
27}