amazon_spapi/models/notifications/create_subscription_request.rs
1/*
2 * Selling Partner API for Notifications
3 *
4 * The Selling Partner API for Notifications lets you subscribe to notifications that are relevant to a selling partner's business. Using this API you can create a destination to receive notifications, subscribe to notifications, delete notification subscriptions, and more. For more information, refer to the [Notifications Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/notifications-api-v1-use-case-guide).
5 *
6 * The version of the OpenAPI document: v1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// CreateSubscriptionRequest : The request schema for the `createSubscription` operation.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CreateSubscriptionRequest {
17 /// The version of the payload object to be used in the notification.
18 #[serde(rename = "payloadVersion")]
19 pub payload_version: String,
20 /// The identifier for the destination where notifications will be delivered.
21 #[serde(rename = "destinationId")]
22 pub destination_id: String,
23 #[serde(rename = "processingDirective", skip_serializing_if = "Option::is_none")]
24 pub processing_directive: Option<Box<models::notifications::ProcessingDirective>>,
25}
26
27impl CreateSubscriptionRequest {
28 /// The request schema for the `createSubscription` operation.
29 pub fn new(payload_version: String, destination_id: String) -> CreateSubscriptionRequest {
30 CreateSubscriptionRequest {
31 payload_version,
32 destination_id,
33 processing_directive: None,
34 }
35 }
36}
37