Skip to main content

amazon_spapi/models/shipping_v2/
generate_collection_form_request.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/// GenerateCollectionFormRequest : The request schema Call to generate the collection form.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct GenerateCollectionFormRequest {
17    /// Object to pass additional information about the MCI Integrator shipperType: List of ClientReferenceDetail
18    #[serde(rename = "clientReferenceDetails", skip_serializing_if = "Option::is_none")]
19    pub client_reference_details: Option<Vec<models::shipping_v2::ClientReferenceDetail>>,
20    /// The carrier identifier for the offering, provided by the carrier.
21    #[serde(rename = "carrierId")]
22    pub carrier_id: String,
23    #[serde(rename = "shipFromAddress", skip_serializing_if = "Option::is_none")]
24    pub ship_from_address: Option<Box<models::shipping_v2::Address>>,
25}
26
27impl GenerateCollectionFormRequest {
28    /// The request schema Call to generate the collection form.
29    pub fn new(carrier_id: String) -> GenerateCollectionFormRequest {
30        GenerateCollectionFormRequest {
31            client_reference_details: None,
32            carrier_id,
33            ship_from_address: None,
34        }
35    }
36}
37