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};

/// FeesEstimateRequest : A product, marketplace, and proposed price used to request estimated fees.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FeesEstimateRequest {
    /// A marketplace identifier.
    #[serde(rename = "MarketplaceId")]
    pub marketplace_id: String,
    /// When true, the offer is fulfilled by Amazon.
    #[serde(rename = "IsAmazonFulfilled", skip_serializing_if = "Option::is_none")]
    pub is_amazon_fulfilled: Option<bool>,
    #[serde(rename = "PriceToEstimateFees")]
    pub price_to_estimate_fees: Box<models::product_fees_v0::PriceToEstimateFees>,
    /// A unique identifier provided by the caller to track this request.
    #[serde(rename = "Identifier")]
    pub identifier: String,
    #[serde(rename = "OptionalFulfillmentProgram", skip_serializing_if = "Option::is_none")]
    pub optional_fulfillment_program: Option<models::product_fees_v0::OptionalFulfillmentProgram>,
}

impl FeesEstimateRequest {
    /// A product, marketplace, and proposed price used to request estimated fees.
    pub fn new(marketplace_id: String, price_to_estimate_fees: models::product_fees_v0::PriceToEstimateFees, identifier: String) -> FeesEstimateRequest {
        FeesEstimateRequest {
            marketplace_id,
            is_amazon_fulfilled: None,
            price_to_estimate_fees: Box::new(price_to_estimate_fees),
            identifier,
            optional_fulfillment_program: None,
        }
    }
}