1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * Selling Partner API for Direct Fulfillment Shipping
 *
 * The Selling Partner API for Direct Fulfillment Shipping provides programmatic access to a direct fulfillment vendor's shipping data.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

/// StatusUpdateDetails : Details for the shipment status update given by the vendor for the specific package.



#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct StatusUpdateDetails {
    /// This is required to be provided for every package and should match with the trackingNumber sent for the shipment confirmation.
    #[serde(default, rename = "trackingNumber")]
    pub tracking_number: String,
    /// Indicates the shipment status code of the package that provides transportation information for Amazon tracking systems and ultimately for the final customer.
    #[serde(default, rename = "statusCode")]
    pub status_code: String,
    /// Provides a reason code for the status of the package that will provide additional information about the transportation status.
    #[serde(default, rename = "reasonCode")]
    pub reason_code: String,
    /// The date and time when the shipment status was updated. This field is expected to be in ISO-8601 date/time format, with UTC time zone or UTC offset. For example, 2020-07-16T23:00:00Z or 2020-07-16T23:00:00+01:00.
    #[serde(default, rename = "statusDateTime")]
    pub status_date_time: String,
    #[serde(default, rename = "statusLocationAddress")]
    pub status_location_address: Box<crate::models::Address>,
    #[serde(default, rename = "shipmentSchedule", skip_serializing_if = "Option::is_none")]
    pub shipment_schedule: Option<Box<crate::models::StatusUpdateDetailsShipmentSchedule>>,
}

impl StatusUpdateDetails {
    /// Details for the shipment status update given by the vendor for the specific package.
    pub fn new(tracking_number: String, status_code: String, reason_code: String, status_date_time: String, status_location_address: crate::models::Address) -> StatusUpdateDetails {
        StatusUpdateDetails {
            tracking_number,
            status_code,
            reason_code,
            status_date_time,
            status_location_address: Box::new(status_location_address),
            shipment_schedule: None,
        }
    }
}