amazon_spapi/models/fba_inventory/
granularity.rs

1/*
2 * Selling Partner API for FBA Inventory
3 *
4 * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Granularity : Describes a granularity at which inventory data can be aggregated. For example, if you use Marketplace granularity, the fulfillable quantity will reflect inventory that could be fulfilled in the given marketplace.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Granularity {
17    /// The granularity type for the inventory aggregation level.
18    #[serde(rename = "granularityType", skip_serializing_if = "Option::is_none")]
19    pub granularity_type: Option<String>,
20    /// The granularity ID for the specified granularity type. When granularityType is Marketplace, specify the marketplaceId.
21    #[serde(rename = "granularityId", skip_serializing_if = "Option::is_none")]
22    pub granularity_id: Option<String>,
23}
24
25impl Granularity {
26    /// Describes a granularity at which inventory data can be aggregated. For example, if you use Marketplace granularity, the fulfillable quantity will reflect inventory that could be fulfilled in the given marketplace.
27    pub fn new() -> Granularity {
28        Granularity {
29            granularity_type: None,
30            granularity_id: None,
31        }
32    }
33}
34