open-logistics 0.3.0

Rust client for the Open Logistics Shiprocket and Delhivery APIs.
Documentation
/*
 * Open Logistics — Delhivery
 *
 * OpenAPI description of the Delhivery B2C 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.  Delhivery overloads `POST /api/p/edit` for update and cancel, and `GET /api/v1/packages/json/` for single, order, and bulk tracking. OpenAPI permits one operation per path + method, so this spec exposes `orders_edit` and `tracking_fetch`; language facades may alias them as `update`, `cancel`, `by_waybill`, `by_order_id`, and `by_waybills`. 
 *
 * The version of the OpenAPI document: 0.3.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DelhiveryPickupRequestPayload {
    #[serde(rename = "pickup_time")]
    pub pickup_time: String,
    #[serde(rename = "pickup_date")]
    pub pickup_date: String,
    #[serde(rename = "pickup_location")]
    pub pickup_location: String,
    #[serde(rename = "expected_package_count")]
    pub expected_package_count: i32,
}

impl DelhiveryPickupRequestPayload {
    pub fn new(pickup_time: String, pickup_date: String, pickup_location: String, expected_package_count: i32) -> DelhiveryPickupRequestPayload {
        DelhiveryPickupRequestPayload {
            pickup_time,
            pickup_date,
            pickup_location,
            expected_package_count,
        }
    }
}