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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
* The Selling Partner API for FBA inbound operations.
*
* The Selling Partner API for Fulfillment By Amazon (FBA) Inbound. The FBA Inbound API enables building inbound workflows to create, manage, and send shipments into Amazon's fulfillment network. The API has interoperability with the Send-to-Amazon user interface.
*
* The version of the OpenAPI document: 2024-03-20
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// InboundPlan : Inbound plan containing details of the inbound workflow.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InboundPlan {
/// The time at which the inbound plan was created. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) datetime with pattern `yyyy-MM-ddTHH:mm:ssZ`.
#[serde(rename = "createdAt")]
pub created_at: String,
/// Identifier of an inbound plan.
#[serde(rename = "inboundPlanId")]
pub inbound_plan_id: String,
/// The time at which the inbound plan was last updated. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) datetime format with pattern `yyyy-MM-ddTHH:mm:ssZ`.
#[serde(rename = "lastUpdatedAt")]
pub last_updated_at: String,
/// A list of marketplace IDs.
#[serde(rename = "marketplaceIds")]
pub marketplace_ids: Vec<String>,
/// Human-readable name of the inbound plan.
#[serde(rename = "name")]
pub name: String,
/// Packing options for the inbound plan. This property will be populated when it has been generated via the corresponding operation. If there is a chosen placement option, only packing options for that placement option will be returned. If there are confirmed shipments, only packing options for those shipments will be returned. Query the packing option for more details.
#[serde(rename = "packingOptions", skip_serializing_if = "Option::is_none")]
pub packing_options: Option<Vec<models::fulfillment_inbound_2024_03_20::PackingOptionSummary>>,
/// Placement options for the inbound plan. This property will be populated when it has been generated via the corresponding operation. If there is a chosen placement option, that will be the only returned option. Query the placement option for more details.
#[serde(rename = "placementOptions", skip_serializing_if = "Option::is_none")]
pub placement_options: Option<Vec<models::fulfillment_inbound_2024_03_20::PlacementOptionSummary>>,
/// A list of shipment IDs for the inbound plan. This property is populated when it has been generated with the `confirmPlacementOptions` operation. Only shipments from the chosen placement option are returned. Query the shipment for more details.
#[serde(rename = "shipments", skip_serializing_if = "Option::is_none")]
pub shipments: Option<Vec<models::fulfillment_inbound_2024_03_20::ShipmentSummary>>,
#[serde(rename = "sourceAddress")]
pub source_address: Box<models::fulfillment_inbound_2024_03_20::Address>,
/// Current status of the inbound plan. Possible values: `ACTIVE`, `VOIDED`, `SHIPPED`, `ERRORED`.
#[serde(rename = "status")]
pub status: String,
}
impl InboundPlan {
/// Inbound plan containing details of the inbound workflow.
pub fn new(created_at: String, inbound_plan_id: String, last_updated_at: String, marketplace_ids: Vec<String>, name: String, source_address: models::fulfillment_inbound_2024_03_20::Address, status: String) -> InboundPlan {
InboundPlan {
created_at,
inbound_plan_id,
last_updated_at,
marketplace_ids,
name,
packing_options: None,
placement_options: None,
shipments: None,
source_address: Box::new(source_address),
status,
}
}
}