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};

/// CreateNotificationRequest : The request for the `createNotification` operation.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateNotificationRequest {
    /// The unique identifier of the notification template you used to onboard your application.
    #[serde(rename = "templateId")]
    pub template_id: String,
    /// The dynamic parameters required by the notification templated specified by `templateId`.
    #[serde(rename = "notificationParameters")]
    pub notification_parameters: std::collections::HashMap<String, serde_json::Value>,
    /// An encrypted marketplace identifier for the posted notification.
    #[serde(rename = "marketplaceId", skip_serializing_if = "Option::is_none")]
    pub marketplace_id: Option<String>,
}

impl CreateNotificationRequest {
    /// The request for the `createNotification` operation.
    pub fn new(template_id: String, notification_parameters: std::collections::HashMap<String, serde_json::Value>) -> CreateNotificationRequest {
        CreateNotificationRequest {
            template_id,
            notification_parameters,
            marketplace_id: None,
        }
    }
}