amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Selling Partner APIs for Fulfillment Outbound
 *
 * The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon's fulfillment network. You can get information on both potential and existing fulfillment orders.
 *
 * The version of the OpenAPI document: 2020-07-01
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// DropOffLocation : The preferred location to leave packages at the destination address.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DropOffLocation {
    /// Specifies the preferred location to leave the package at the destination address.
    #[serde(rename = "type")]
    pub r#type: Type,
    /// Additional information about the drop-off location that can vary depending on the type of drop-off location specified in the `type` field. If the `type` is set to `FALLBACK_NEIGHBOR_DELIVERY`, the `attributes` object should include the exact keys `neighborName` and `houseNumber` to provide the name and house number of the designated neighbor.
    #[serde(rename = "attributes", skip_serializing_if = "Option::is_none")]
    pub attributes: Option<std::collections::HashMap<String, String>>,
}

impl DropOffLocation {
    /// The preferred location to leave packages at the destination address.
    pub fn new(r#type: Type) -> DropOffLocation {
        DropOffLocation {
            r#type,
            attributes: None,
        }
    }
}
/// Specifies the preferred location to leave the package at the destination address.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "FRONT_DOOR")]
    FrontDoor,
    #[serde(rename = "DELIVERY_BOX")]
    DeliveryBox,
    #[serde(rename = "GAS_METER_BOX")]
    GasMeterBox,
    #[serde(rename = "BICYCLE_BASKET")]
    BicycleBasket,
    #[serde(rename = "GARAGE")]
    Garage,
    #[serde(rename = "RECEPTIONIST")]
    Receptionist,
    #[serde(rename = "FALLBACK_NEIGHBOR_DELIVERY")]
    FallbackNeighborDelivery,
    #[serde(rename = "DO_NOT_LEAVE_UNATTENDED")]
    DoNotLeaveUnattended,
}

impl Default for Type {
    fn default() -> Type {
        Self::FrontDoor
    }
}