amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * The Selling Partner API for Amazon Warehousing and Distribution
 *
 * The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.
 *
 * The version of the OpenAPI document: 2024-05-09
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// InboundEligibility : Represents the eligibility status of the inbound packages.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InboundEligibility {
    /// If there are order level eligibility issues, then this list will contain those error codes and descriptions.
    #[serde(rename = "ineligibilityReasons", skip_serializing_if = "Option::is_none")]
    pub ineligibility_reasons: Option<Vec<models::awd_2024_05_09::OrderIneligibilityReason>>,
    /// Details on SKU eligibility for each inbound package.
    #[serde(rename = "packagesToInbound")]
    pub packages_to_inbound: Vec<models::awd_2024_05_09::SkuEligibility>,
    /// Timestamp when the eligibility check is performed.
    #[serde(rename = "previewedAt")]
    pub previewed_at: String,
    #[serde(rename = "status")]
    pub status: models::awd_2024_05_09::InboundEligibilityStatus,
}

impl InboundEligibility {
    /// Represents the eligibility status of the inbound packages.
    pub fn new(packages_to_inbound: Vec<models::awd_2024_05_09::SkuEligibility>, previewed_at: String, status: models::awd_2024_05_09::InboundEligibilityStatus) -> InboundEligibility {
        InboundEligibility {
            ineligibility_reasons: None,
            packages_to_inbound,
            previewed_at,
            status,
        }
    }
}