amazon_spapi/models/shipping/create_shipment_result.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/// CreateShipmentResult : The payload schema for the createShipment operation.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CreateShipmentResult {
17 /// The unique shipment identifier.
18 #[serde(rename = "shipmentId")]
19 pub shipment_id: String,
20 /// A list of all the available rates that can be used to send the shipment.
21 #[serde(rename = "eligibleRates")]
22 pub eligible_rates: Vec<models::shipping::Rate>,
23}
24
25impl CreateShipmentResult {
26 /// The payload schema for the createShipment operation.
27 pub fn new(shipment_id: String, eligible_rates: Vec<models::shipping::Rate>) -> CreateShipmentResult {
28 CreateShipmentResult {
29 shipment_id,
30 eligible_rates,
31 }
32 }
33}
34