amazon_spapi/models/shipping/
create_shipment_request.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/// CreateShipmentRequest : The request schema for the createShipment operation.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CreateShipmentRequest {
17    /// Client reference id.
18    #[serde(rename = "clientReferenceId")]
19    pub client_reference_id: String,
20    #[serde(rename = "shipTo")]
21    pub ship_to: Box<models::shipping::Address>,
22    #[serde(rename = "shipFrom")]
23    pub ship_from: Box<models::shipping::Address>,
24    /// A list of container.
25    #[serde(rename = "containers")]
26    pub containers: Vec<models::shipping::Container>,
27}
28
29impl CreateShipmentRequest {
30    /// The request schema for the createShipment operation.
31    pub fn new(client_reference_id: String, ship_to: models::shipping::Address, ship_from: models::shipping::Address, containers: Vec<models::shipping::Container>) -> CreateShipmentRequest {
32        CreateShipmentRequest {
33            client_reference_id,
34            ship_to: Box::new(ship_to),
35            ship_from: Box::new(ship_from),
36            containers,
37        }
38    }
39}
40