amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Amazon Shipping API
 *
 * The Amazon Shipping API is designed to support outbound shipping use cases both for orders originating on Amazon-owned marketplaces as well as external channels/marketplaces. With these APIs, you can request shipping rates, create shipments, cancel shipments, and track shipments.
 *
 * The version of the OpenAPI document: v2
 * Contact: swa-api-core@amazon.com
 * Generated by: https://openapi-generator.tech
 */

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

/// AccessPoint : Access point details
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AccessPoint {
    /// Unique identifier for the access point
    #[serde(rename = "accessPointId", skip_serializing_if = "Option::is_none")]
    pub access_point_id: Option<String>,
    /// Name of entity (store/hub etc) where this access point is located
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Timezone of access point
    #[serde(rename = "timezone", skip_serializing_if = "Option::is_none")]
    pub timezone: Option<String>,
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<models::shipping_v2::AccessPointType>,
    #[serde(rename = "accessibilityAttributes", skip_serializing_if = "Option::is_none")]
    pub accessibility_attributes: Option<Box<models::shipping_v2::AccessibilityAttributes>>,
    #[serde(rename = "address", skip_serializing_if = "Option::is_none")]
    pub address: Option<Box<models::shipping_v2::Address>>,
    /// Exception operating hours for Access Point
    #[serde(rename = "exceptionOperatingHours", skip_serializing_if = "Option::is_none")]
    pub exception_operating_hours: Option<Vec<models::shipping_v2::ExceptionOperatingHours>>,
    /// Assistance type enum for Access point i.e. STAFF_ASSISTED or SELF_ASSISTED
    #[serde(rename = "assistanceType", skip_serializing_if = "Option::is_none")]
    pub assistance_type: Option<AssistanceType>,
    /// The score of access point, based on proximity to postal code and sorting preference. This can be used to sort access point results on shipper's end.
    #[serde(rename = "score", skip_serializing_if = "Option::is_none")]
    pub score: Option<String>,
    /// Map of day of the week to operating hours of that day
    #[serde(rename = "standardOperatingHours", skip_serializing_if = "Option::is_none")]
    pub standard_operating_hours: Option<std::collections::HashMap<String, models::shipping_v2::OperatingHours>>,
}

impl AccessPoint {
    /// Access point details
    pub fn new() -> AccessPoint {
        AccessPoint {
            access_point_id: None,
            name: None,
            timezone: None,
            r#type: None,
            accessibility_attributes: None,
            address: None,
            exception_operating_hours: None,
            assistance_type: None,
            score: None,
            standard_operating_hours: None,
        }
    }
}
/// Assistance type enum for Access point i.e. STAFF_ASSISTED or SELF_ASSISTED
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AssistanceType {
    #[serde(rename = "STAFF_ASSISTED")]
    StaffAssisted,
    #[serde(rename = "SELF_ASSISTED")]
    SelfAssisted,
}

impl Default for AssistanceType {
    fn default() -> AssistanceType {
        Self::StaffAssisted
    }
}