amazon_spapi/models/shipping/
event.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/// Event : An event of a shipment
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Event {
17    /// The event code of a shipment, such as Departed, Received, and ReadyForReceive.
18    #[serde(rename = "eventCode")]
19    pub event_code: String,
20    /// The date and time of an event for a shipment.
21    #[serde(rename = "eventTime")]
22    pub event_time: String,
23    #[serde(rename = "location", skip_serializing_if = "Option::is_none")]
24    pub location: Option<Box<models::shipping::Location>>,
25}
26
27impl Event {
28    /// An event of a shipment
29    pub fn new(event_code: String, event_time: String) -> Event {
30        Event {
31            event_code,
32            event_time,
33            location: None,
34        }
35    }
36}
37