amazon_spapi/models/shipping/tracking_information.rs
1/*
2 * Selling Partner API for Shipping
3 *
4 * Provides programmatic access to Amazon Shipping APIs. **Note:** If you are new to the Amazon Shipping API, refer to the latest version of <a href=\"https://developer-docs.amazon.com/amazon-shipping/docs/shipping-api-v2-reference\">Amazon Shipping API (v2)</a> on the <a href=\"https://developer-docs.amazon.com/amazon-shipping/\">Amazon Shipping Developer Documentation</a> site.
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/// TrackingInformation : The payload schema for the getTrackingInformation operation.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct TrackingInformation {
17 /// The tracking id generated to each shipment. It contains a series of letters or digits or both.
18 #[serde(rename = "trackingId")]
19 pub tracking_id: String,
20 #[serde(rename = "summary")]
21 pub summary: Box<models::shipping::TrackingSummary>,
22 /// The promised delivery date and time of a shipment.
23 #[serde(rename = "promisedDeliveryDate")]
24 pub promised_delivery_date: String,
25 /// A list of events of a shipment.
26 #[serde(rename = "eventHistory")]
27 pub event_history: Vec<models::shipping::Event>,
28}
29
30impl TrackingInformation {
31 /// The payload schema for the getTrackingInformation operation.
32 pub fn new(tracking_id: String, summary: models::shipping::TrackingSummary, promised_delivery_date: String, event_history: Vec<models::shipping::Event>) -> TrackingInformation {
33 TrackingInformation {
34 tracking_id,
35 summary: Box::new(summary),
36 promised_delivery_date,
37 event_history,
38 }
39 }
40}
41