amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Selling Partner API for Merchant Fulfillment
 *
 * With the Selling Partner API for Merchant Fulfillment, you can build applications that sellers can use to purchase shipping for non-Prime and Prime orders using Amazon's Buy Shipping Services.
 *
 * The version of the OpenAPI document: v0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// DangerousGoodsDetails : Details related to any dangerous goods or items that are shipped.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DangerousGoodsDetails {
    /// The specific UNID of the item being shipped.
    #[serde(rename = "UnitedNationsRegulatoryId", skip_serializing_if = "Option::is_none")]
    pub united_nations_regulatory_id: Option<String>,
    /// The specific regulatory class of the shipped item.
    #[serde(rename = "TransportationRegulatoryClass", skip_serializing_if = "Option::is_none")]
    pub transportation_regulatory_class: Option<String>,
    /// The specific packaging group of the item being shipped.
    #[serde(rename = "PackingGroup", skip_serializing_if = "Option::is_none")]
    pub packing_group: Option<PackingGroup>,
    /// The specific packing instruction of the item being shipped.
    #[serde(rename = "PackingInstruction", skip_serializing_if = "Option::is_none")]
    pub packing_instruction: Option<PackingInstruction>,
}

impl DangerousGoodsDetails {
    /// Details related to any dangerous goods or items that are shipped.
    pub fn new() -> DangerousGoodsDetails {
        DangerousGoodsDetails {
            united_nations_regulatory_id: None,
            transportation_regulatory_class: None,
            packing_group: None,
            packing_instruction: None,
        }
    }
}
/// The specific packaging group of the item being shipped.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum PackingGroup {
    #[serde(rename = "I")]
    I,
    #[serde(rename = "II")]
    Ii,
    #[serde(rename = "III")]
    Iii,
}

impl Default for PackingGroup {
    fn default() -> PackingGroup {
        Self::I
    }
}
/// The specific packing instruction of the item being shipped.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum PackingInstruction {
    #[serde(rename = "PI965_SECTION_IA")]
    Pi965SectionIa,
    #[serde(rename = "PI965_SECTION_IB")]
    Pi965SectionIb,
    #[serde(rename = "PI965_SECTION_II")]
    Pi965SectionIi,
    #[serde(rename = "PI966_SECTION_I")]
    Pi966SectionI,
    #[serde(rename = "PI966_SECTION_II")]
    Pi966SectionIi,
    #[serde(rename = "PI967_SECTION_I")]
    Pi967SectionI,
    #[serde(rename = "PI967_SECTION_II")]
    Pi967SectionIi,
    #[serde(rename = "PI968_SECTION_IA")]
    Pi968SectionIa,
    #[serde(rename = "PI968_SECTION_IB")]
    Pi968SectionIb,
    #[serde(rename = "PI969_SECTION_I")]
    Pi969SectionI,
    #[serde(rename = "PI969_SECTION_II")]
    Pi969SectionIi,
    #[serde(rename = "PI970_SECTION_I")]
    Pi970SectionI,
    #[serde(rename = "PI970_SECTION_II")]
    Pi970SectionIi,
}

impl Default for PackingInstruction {
    fn default() -> PackingInstruction {
        Self::Pi965SectionIa
    }
}