amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * The Selling Partner API for Amazon Warehousing and Distribution
 *
 * The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.
 *
 * The version of the OpenAPI document: 2024-05-09
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// TrackingDetails : Tracking details for the shipment. If using SPD transportation, this can be for each case. If not using SPD transportation, this is a single tracking entry for the entire shipment.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TrackingDetails {
    #[serde(rename = "carrierCode", skip_serializing_if = "Option::is_none")]
    pub carrier_code: Option<Box<models::awd_2024_05_09::CarrierCode>>,
    /// The identifier that is received from transportation to uniquely identify a booking.
    #[serde(rename = "bookingId")]
    pub booking_id: String,
}

impl TrackingDetails {
    /// Tracking details for the shipment. If using SPD transportation, this can be for each case. If not using SPD transportation, this is a single tracking entry for the entire shipment.
    pub fn new(booking_id: String) -> TrackingDetails {
        TrackingDetails {
            carrier_code: None,
            booking_id,
        }
    }
}