1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* Amazon Shipping API
*
* 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.
*
* The version of the OpenAPI document: v2
* Contact: swa-api-core@amazon.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// PurchaseShipmentResult : The payload for the purchaseShipment operation.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PurchaseShipmentResult {
/// The unique shipment identifier provided by a shipping service.
#[serde(rename = "shipmentId")]
pub shipment_id: String,
/// A list of post-purchase details about a package that will be shipped using a shipping service.
#[serde(rename = "packageDocumentDetails")]
pub package_document_details: Vec<models::shipping_v2::PackageDocumentDetail>,
#[serde(rename = "promise")]
pub promise: Box<models::shipping_v2::Promise>,
#[serde(rename = "benefits", skip_serializing_if = "Option::is_none")]
pub benefits: Option<Box<models::shipping_v2::Benefits>>,
}
impl PurchaseShipmentResult {
/// The payload for the purchaseShipment operation.
pub fn new(shipment_id: String, package_document_details: Vec<models::shipping_v2::PackageDocumentDetail>, promise: models::shipping_v2::Promise) -> PurchaseShipmentResult {
PurchaseShipmentResult {
shipment_id,
package_document_details,
promise: Box::new(promise),
benefits: None,
}
}
}