amazon_spapi/models/notifications/subscription.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/// Subscription : Information about the subscription.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Subscription {
17 /// The subscription identifier generated when the subscription is created.
18 #[serde(rename = "subscriptionId")]
19 pub subscription_id: String,
20 /// The version of the payload object to be used in the notification.
21 #[serde(rename = "payloadVersion")]
22 pub payload_version: String,
23 /// The identifier for the destination where notifications will be delivered.
24 #[serde(rename = "destinationId")]
25 pub destination_id: String,
26 #[serde(rename = "processingDirective", skip_serializing_if = "Option::is_none")]
27 pub processing_directive: Option<Box<models::notifications::ProcessingDirective>>,
28}
29
30impl Subscription {
31 /// Information about the subscription.
32 pub fn new(subscription_id: String, payload_version: String, destination_id: String) -> Subscription {
33 Subscription {
34 subscription_id,
35 payload_version,
36 destination_id,
37 processing_directive: None,
38 }
39 }
40}
41