amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Selling Partner API for Product Fees
 *
 * The Selling Partner API for Product Fees lets you programmatically retrieve estimated fees for a product. You can then account for those fees in your pricing.
 *
 * The version of the OpenAPI document: v0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// IncludedFeeDetail : The type of fee, fee amount, and other details.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct IncludedFeeDetail {
    /// The type of fee charged to a seller.
    #[serde(rename = "FeeType")]
    pub fee_type: String,
    #[serde(rename = "FeeAmount")]
    pub fee_amount: Box<models::product_fees_v0::MoneyType>,
    #[serde(rename = "FeePromotion", skip_serializing_if = "Option::is_none")]
    pub fee_promotion: Option<Box<models::product_fees_v0::MoneyType>>,
    #[serde(rename = "TaxAmount", skip_serializing_if = "Option::is_none")]
    pub tax_amount: Option<Box<models::product_fees_v0::MoneyType>>,
    #[serde(rename = "FinalFee")]
    pub final_fee: Box<models::product_fees_v0::MoneyType>,
}

impl IncludedFeeDetail {
    /// The type of fee, fee amount, and other details.
    pub fn new(fee_type: String, fee_amount: models::product_fees_v0::MoneyType, final_fee: models::product_fees_v0::MoneyType) -> IncludedFeeDetail {
        IncludedFeeDetail {
            fee_type,
            fee_amount: Box::new(fee_amount),
            fee_promotion: None,
            tax_amount: None,
            final_fee: Box::new(final_fee),
        }
    }
}