open-logistics 0.2.2

Rust client for the Open Logistics Shiprocket and Delhivery APIs.
Documentation
/*
 * Open Logistics — Shiprocket
 *
 * OpenAPI description of the Shiprocket endpoints wrapped by `open-logistics`.  Source of truth for generated Python and Rust clients. Operation IDs and schema field names are intentionally snake_case so every language exposes the same names.  Two TypeScript methods (`checkServiceability` and `calculateRates`) call `GET /courier/serviceability`; OpenAPI permits one operation per path + method, so this spec exposes a single `courier_serviceability` operation. Language facades may alias it as `calculate_rates`. 
 *
 * The version of the OpenAPI document: 0.2.2
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TrackByAwbResponseTrackingData {
    #[serde(rename = "track_status")]
    pub track_status: i32,
    #[serde(rename = "shipment_status")]
    pub shipment_status: i32,
    #[serde(rename = "shipment_track")]
    pub shipment_track: Vec<models::TrackEvent>,
    #[serde(rename = "shipment_track_activities")]
    pub shipment_track_activities: Vec<models::TrackActivity>,
    #[serde(rename = "track_url")]
    pub track_url: String,
}

impl TrackByAwbResponseTrackingData {
    pub fn new(track_status: i32, shipment_status: i32, shipment_track: Vec<models::TrackEvent>, shipment_track_activities: Vec<models::TrackActivity>, track_url: String) -> TrackByAwbResponseTrackingData {
        TrackByAwbResponseTrackingData {
            track_status,
            shipment_status,
            shipment_track,
            shipment_track_activities,
            track_url,
        }
    }
}