amazon_spapi/models/shipping_v2/
channel_details.rs

1/*
2 * Amazon Shipping API
3 *
4 * The Amazon Shipping API is designed to support outbound shipping use cases both for orders originating on Amazon-owned marketplaces as well as external channels/marketplaces. With these APIs, you can request shipping rates, create shipments, cancel shipments, and track shipments.
5 *
6 * The version of the OpenAPI document: v2
7 * Contact: swa-api-core@amazon.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ChannelDetails : Shipment source channel related information.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ChannelDetails {
17    #[serde(rename = "channelType")]
18    pub channel_type: models::shipping_v2::ChannelType,
19    #[serde(rename = "amazonOrderDetails", skip_serializing_if = "Option::is_none")]
20    pub amazon_order_details: Option<Box<models::shipping_v2::AmazonOrderDetails>>,
21    #[serde(rename = "amazonShipmentDetails", skip_serializing_if = "Option::is_none")]
22    pub amazon_shipment_details: Option<Box<models::shipping_v2::AmazonShipmentDetails>>,
23}
24
25impl ChannelDetails {
26    /// Shipment source channel related information.
27    pub fn new(channel_type: models::shipping_v2::ChannelType) -> ChannelDetails {
28        ChannelDetails {
29            channel_type,
30            amazon_order_details: None,
31            amazon_shipment_details: None,
32        }
33    }
34}
35