amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Selling Partner API for Pricing
 *
 * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products.
 *
 * The version of the OpenAPI document: v0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// Product : An item.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Product {
    #[serde(rename = "Identifiers")]
    pub identifiers: Box<models::product_pricing_v0::IdentifierType>,
    /// A list of product attributes if they are applicable to the product that is returned.
    #[serde(rename = "AttributeSets", skip_serializing_if = "Option::is_none")]
    pub attribute_sets: Option<Vec<serde_json::Value>>,
    /// A list that contains product variation information, if applicable.
    #[serde(rename = "Relationships", skip_serializing_if = "Option::is_none")]
    pub relationships: Option<Vec<serde_json::Value>>,
    #[serde(rename = "CompetitivePricing", skip_serializing_if = "Option::is_none")]
    pub competitive_pricing: Option<Box<models::product_pricing_v0::CompetitivePricingType>>,
    /// A list of sales rank information for the item, by category.
    #[serde(rename = "SalesRankings", skip_serializing_if = "Option::is_none")]
    pub sales_rankings: Option<Vec<models::product_pricing_v0::SalesRankType>>,
    /// A list of offers.
    #[serde(rename = "Offers", skip_serializing_if = "Option::is_none")]
    pub offers: Option<Vec<models::product_pricing_v0::OfferType>>,
}

impl Product {
    /// An item.
    pub fn new(identifiers: models::product_pricing_v0::IdentifierType) -> Product {
        Product {
            identifiers: Box::new(identifiers),
            attribute_sets: None,
            relationships: None,
            competitive_pricing: None,
            sales_rankings: None,
            offers: None,
        }
    }
}