Skip to main content

amazon_spapi/models/catalog_items_2022_04_01/
item.rs

1/*
2 * Selling Partner API for Catalog Items
3 *
4 * Use the Selling Partner API for Catalog Items to retrieve information about items in the Amazon catalog.  For more information, refer to the [Catalog Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/:catalog-items-api-v2022-04-01-use-case-guide).
5 *
6 * The version of the OpenAPI document: 2022-04-01
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Item : An item in the Amazon catalog.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Item {
17    /// The unique identifier of an item in the Amazon catalog.
18    #[serde(rename = "asin")]
19    pub asin: String,
20    /// A JSON object containing structured item attribute data that is keyed by attribute name. Catalog item attributes conform to the related Amazon product type definitions that you can get from the [Product Type Definitions API](https://developer-docs.amazon.com/sp-api/reference/product-type-definitions-v2020-09-01).
21    #[serde(rename = "attributes", skip_serializing_if = "Option::is_none")]
22    pub attributes: Option<std::collections::HashMap<String, serde_json::Value>>,
23    /// An array of classifications (browse nodes) that is associated with the item in the Amazon catalog, grouped by `marketplaceId`.
24    #[serde(rename = "classifications", skip_serializing_if = "Option::is_none")]
25    pub classifications: Option<Vec<models::catalog_items_2022_04_01::ItemBrowseClassificationsByMarketplace>>,
26    /// An array of dimensions that are associated with the item in the Amazon catalog, grouped by `marketplaceId`.
27    #[serde(rename = "dimensions", skip_serializing_if = "Option::is_none")]
28    pub dimensions: Option<Vec<models::catalog_items_2022_04_01::ItemDimensionsByMarketplace>>,
29    /// Identifiers associated with the item in the Amazon catalog, such as UPC and EAN identifiers.
30    #[serde(rename = "identifiers", skip_serializing_if = "Option::is_none")]
31    pub identifiers: Option<Vec<models::catalog_items_2022_04_01::ItemIdentifiersByMarketplace>>,
32    /// The images for an item in the Amazon catalog.
33    #[serde(rename = "images", skip_serializing_if = "Option::is_none")]
34    pub images: Option<Vec<models::catalog_items_2022_04_01::ItemImagesByMarketplace>>,
35    /// Product types that are associated with the Amazon catalog item.
36    #[serde(rename = "productTypes", skip_serializing_if = "Option::is_none")]
37    pub product_types: Option<Vec<models::catalog_items_2022_04_01::ItemProductTypeByMarketplace>>,
38    /// Relationships grouped by `marketplaceId` for an Amazon catalog item (for example, variations).
39    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
40    pub relationships: Option<Vec<models::catalog_items_2022_04_01::ItemRelationshipsByMarketplace>>,
41    /// Sales ranks of an Amazon catalog item.
42    #[serde(rename = "salesRanks", skip_serializing_if = "Option::is_none")]
43    pub sales_ranks: Option<Vec<models::catalog_items_2022_04_01::ItemSalesRanksByMarketplace>>,
44    /// Summaries of Amazon catalog items.
45    #[serde(rename = "summaries", skip_serializing_if = "Option::is_none")]
46    pub summaries: Option<Vec<models::catalog_items_2022_04_01::ItemSummaryByMarketplace>>,
47    /// The vendor details that are associated with an Amazon catalog item. Vendor details are only available to vendors.
48    #[serde(rename = "vendorDetails", skip_serializing_if = "Option::is_none")]
49    pub vendor_details: Option<Vec<models::catalog_items_2022_04_01::ItemVendorDetailsByMarketplace>>,
50}
51
52impl Item {
53    /// An item in the Amazon catalog.
54    pub fn new(asin: String) -> Item {
55        Item {
56            asin,
57            attributes: None,
58            classifications: None,
59            dimensions: None,
60            identifiers: None,
61            images: None,
62            product_types: None,
63            relationships: None,
64            sales_ranks: None,
65            summaries: None,
66            vendor_details: None,
67        }
68    }
69}
70