amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * The Selling Partner API for third party application integrations.
 *
 * With the AppIntegrations API v2024-04-01, you can send notifications to Amazon Selling Partners and display the notifications in Seller Central.
 *
 * The version of the OpenAPI document: 2024-04-01
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// DeleteNotificationsRequest : The request for the `deleteNotifications` operation.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DeleteNotificationsRequest {
    /// The unique identifier of the notification template you used to onboard your application.
    #[serde(rename = "templateId")]
    pub template_id: String,
    /// The unique identifier that maps each notification status to a reason code.
    #[serde(rename = "deletionReason")]
    pub deletion_reason: DeletionReason,
}

impl DeleteNotificationsRequest {
    /// The request for the `deleteNotifications` operation.
    pub fn new(template_id: String, deletion_reason: DeletionReason) -> DeleteNotificationsRequest {
        DeleteNotificationsRequest {
            template_id,
            deletion_reason,
        }
    }
}
/// The unique identifier that maps each notification status to a reason code.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum DeletionReason {
    #[serde(rename = "INCORRECT_CONTENT")]
    IncorrectContent,
    #[serde(rename = "INCORRECT_RECIPIENT")]
    IncorrectRecipient,
}

impl Default for DeletionReason {
    fn default() -> DeletionReason {
        Self::IncorrectContent
    }
}