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
/*
* 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};
/// PackingOption : A packing option contains a set of pack groups plus additional information about the packing option, such as any discounts or fees if it's selected.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PackingOption {
/// Discount for the offered option.
#[serde(rename = "discounts")]
pub discounts: Vec<models::fulfillment_inbound_2024_03_20::Incentive>,
/// The time at which this packing option is no longer valid. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) datetime format with pattern `yyyy-MM-ddTHH:mm:ss.sssZ`.
#[serde(rename = "expiration", skip_serializing_if = "Option::is_none")]
pub expiration: Option<String>,
/// Fee for the offered option.
#[serde(rename = "fees")]
pub fees: Vec<models::fulfillment_inbound_2024_03_20::Incentive>,
/// Packing group IDs.
#[serde(rename = "packingGroups")]
pub packing_groups: Vec<String>,
/// Identifier of a packing option.
#[serde(rename = "packingOptionId")]
pub packing_option_id: String,
/// The status of the packing option. Possible values: `OFFERED`, `ACCEPTED`, `EXPIRED`.
#[serde(rename = "status")]
pub status: String,
/// A list of possible configurations for this option.
#[serde(rename = "supportedConfigurations")]
pub supported_configurations: Vec<models::fulfillment_inbound_2024_03_20::PackingConfiguration>,
/// **This field is deprecated**. Use the `shippingRequirements` property under `supportedConfigurations` instead. List of supported shipping modes.
#[serde(rename = "supportedShippingConfigurations")]
pub supported_shipping_configurations: Vec<models::fulfillment_inbound_2024_03_20::ShippingConfiguration>,
}
impl PackingOption {
/// A packing option contains a set of pack groups plus additional information about the packing option, such as any discounts or fees if it's selected.
pub fn new(discounts: Vec<models::fulfillment_inbound_2024_03_20::Incentive>, fees: Vec<models::fulfillment_inbound_2024_03_20::Incentive>, packing_groups: Vec<String>, packing_option_id: String, status: String, supported_configurations: Vec<models::fulfillment_inbound_2024_03_20::PackingConfiguration>, supported_shipping_configurations: Vec<models::fulfillment_inbound_2024_03_20::ShippingConfiguration>) -> PackingOption {
PackingOption {
discounts,
expiration: None,
fees,
packing_groups,
packing_option_id,
status,
supported_configurations,
supported_shipping_configurations,
}
}
}