Skip to main content

hermes_ebay_sell_inventory/models/
availability_distribution.rs

1/*
2 * Inventory API
3 *
4 * The Inventory API is used to create and manage inventory, and then to publish and manage this inventory on an eBay marketplace. There are also methods in this API that will convert eligible, active eBay listings into the Inventory API model.
5 *
6 * The version of the OpenAPI document: 1.18.4
7 * Contact: your-email@example.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// AvailabilityDistribution : This type is used to set the available quantity of the inventory item at one or more warehouse locations.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AvailabilityDistribution {
17    #[serde(rename = "fulfillmentTime", skip_serializing_if = "Option::is_none")]
18    pub fulfillment_time: Option<Box<models::TimeDuration>>,
19    /// The unique identifier of an inventory location where quantity is available for the inventory item. This field is conditionally required to identify the inventory location that has quantity of the inventory item.<br><br>Use the <a href=\"/api-docs/sell/inventory/resources/location/methods/getInventoryLocations\" target=\"_blank\">getInventoryLocations</a> method to retrieve merchant location keys.
20    #[serde(rename = "merchantLocationKey", skip_serializing_if = "Option::is_none")]
21    pub merchant_location_key: Option<String>,
22    /// The integer value passed into this field indicates the quantity of the inventory item that is available at this inventory location. This field is conditionally required.
23    #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")]
24    pub quantity: Option<i32>,
25}
26
27impl AvailabilityDistribution {
28    /// This type is used to set the available quantity of the inventory item at one or more warehouse locations.
29    pub fn new() -> AvailabilityDistribution {
30        AvailabilityDistribution {
31            fulfillment_time: None,
32            merchant_location_key: None,
33            quantity: None,
34        }
35    }
36}
37