amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * 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};

/// PlacementOption : Contains information pertaining to the placement of the contents of an inbound plan and the related costs.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PlacementOption {
    /// Discount for the offered option.
    #[serde(rename = "discounts")]
    pub discounts: Vec<models::fulfillment_inbound_2024_03_20::Incentive>,
    /// The expiration date of the placement option. 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>,
    /// The fee for the offered option.
    #[serde(rename = "fees")]
    pub fees: Vec<models::fulfillment_inbound_2024_03_20::Incentive>,
    /// The identifier of a placement option. A placement option represents the shipment splits and destinations of SKUs.
    #[serde(rename = "placementOptionId")]
    pub placement_option_id: String,
    /// Shipment ids.
    #[serde(rename = "shipmentIds")]
    pub shipment_ids: Vec<String>,
    /// The status of a placement option. Possible values: `OFFERED`, `ACCEPTED`, `EXPIRED`.
    #[serde(rename = "status")]
    pub status: String,
}

impl PlacementOption {
    /// Contains information pertaining to the placement of the contents of an inbound plan and the related costs.
    pub fn new(discounts: Vec<models::fulfillment_inbound_2024_03_20::Incentive>, fees: Vec<models::fulfillment_inbound_2024_03_20::Incentive>, placement_option_id: String, shipment_ids: Vec<String>, status: String) -> PlacementOption {
        PlacementOption {
            discounts,
            expiration: None,
            fees,
            placement_option_id,
            shipment_ids,
            status,
        }
    }
}