amazon_spapi/models/easy_ship_2022_03_23/
package.rs

1/*
2 * Selling Partner API for Easy Ship
3 *
4 * Use the Selling Partner API for Easy Ship to build applications for sellers to manage and ship Amazon Easy Ship orders. With this API, you can get available time slots, schedule and reschedule Easy Ship orders, and print shipping labels, invoices, and warranties. To review the differences in Easy Ship operations by marketplace, refer to [Marketplace support](https://developer-docs.amazon.com/sp-api/docs/easyship-api-v2022-03-23-use-case-guide#marketplace-support).
5 *
6 * The version of the OpenAPI document: 2022-03-23
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Package : This object contains all the details of the scheduled Easy Ship package.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Package {
17    #[serde(rename = "scheduledPackageId")]
18    pub scheduled_package_id: Box<models::easy_ship_2022_03_23::ScheduledPackageId>,
19    #[serde(rename = "packageDimensions")]
20    pub package_dimensions: Box<models::easy_ship_2022_03_23::Dimensions>,
21    #[serde(rename = "packageWeight")]
22    pub package_weight: Box<models::easy_ship_2022_03_23::Weight>,
23    /// A list of items contained in the package.
24    #[serde(rename = "packageItems", skip_serializing_if = "Option::is_none")]
25    pub package_items: Option<Vec<models::easy_ship_2022_03_23::Item>>,
26    #[serde(rename = "packageTimeSlot")]
27    pub package_time_slot: Box<models::easy_ship_2022_03_23::TimeSlot>,
28    /// Optional seller-created identifier that is printed on the shipping label to help the seller identify the package.
29    #[serde(rename = "packageIdentifier", skip_serializing_if = "Option::is_none")]
30    pub package_identifier: Option<String>,
31    #[serde(rename = "invoice", skip_serializing_if = "Option::is_none")]
32    pub invoice: Option<Box<models::easy_ship_2022_03_23::InvoiceData>>,
33    #[serde(rename = "packageStatus", skip_serializing_if = "Option::is_none")]
34    pub package_status: Option<models::easy_ship_2022_03_23::PackageStatus>,
35    #[serde(rename = "trackingDetails", skip_serializing_if = "Option::is_none")]
36    pub tracking_details: Option<Box<models::easy_ship_2022_03_23::TrackingDetails>>,
37}
38
39impl Package {
40    /// This object contains all the details of the scheduled Easy Ship package.
41    pub fn new(scheduled_package_id: models::easy_ship_2022_03_23::ScheduledPackageId, package_dimensions: models::easy_ship_2022_03_23::Dimensions, package_weight: models::easy_ship_2022_03_23::Weight, package_time_slot: models::easy_ship_2022_03_23::TimeSlot) -> Package {
42        Package {
43            scheduled_package_id: Box::new(scheduled_package_id),
44            package_dimensions: Box::new(package_dimensions),
45            package_weight: Box::new(package_weight),
46            package_items: None,
47            package_time_slot: Box::new(package_time_slot),
48            package_identifier: None,
49            invoice: None,
50            package_status: None,
51            tracking_details: None,
52        }
53    }
54}
55