amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * The Selling Partner API for Finances
 *
 * The Selling Partner API for Finances helps you obtain financial information relevant to a seller's business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
 *
 * The version of the OpenAPI document: 2024-06-19
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// Breakdown : Breakdown provides details regarding the money movement under the financial transaction. Breakdowns get categorized further into breakdown types, breakdown amounts, and further breakdowns into a hierarchical structure.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Breakdown {
    /// The type of charge.
    #[serde(rename = "breakdownType", skip_serializing_if = "Option::is_none")]
    pub breakdown_type: Option<String>,
    #[serde(rename = "breakdownAmount", skip_serializing_if = "Option::is_none")]
    pub breakdown_amount: Option<Box<models::finances_2024_06_19::Currency>>,
    /// A list of breakdowns that detail how the total amount is calculated for the transaction.
    #[serde(rename = "breakdowns", skip_serializing_if = "Option::is_none")]
    pub breakdowns: Option<Vec<models::finances_2024_06_19::Breakdown>>,
}

impl Breakdown {
    /// Breakdown provides details regarding the money movement under the financial transaction. Breakdowns get categorized further into breakdown types, breakdown amounts, and further breakdowns into a hierarchical structure.
    pub fn new() -> Breakdown {
        Breakdown {
            breakdown_type: None,
            breakdown_amount: None,
            breakdowns: None,
        }
    }
}