Skip to main content

app_store_server_library/primitives/
app_data.rs

1use crate::primitives::environment::Environment;
2use serde::{Deserialize, Serialize};
3
4/// App data that appears in version 2 notifications.
5///
6/// [appData](https://developer.apple.com/documentation/appstoreservernotifications/appdata)
7#[derive(Debug, Clone, Deserialize, Serialize, Hash, PartialEq, Eq)]
8#[serde(rename_all = "camelCase")]
9pub struct AppData {
10    /// The unique identifier of the app that the notification applies to.
11    /// This property is available for apps that users download from the App Store.
12    /// It isn't present in the sandbox environment.
13    ///
14    /// [appAppleId](https://developer.apple.com/documentation/appstoreservernotifications/appappleid)
15    pub app_apple_id: Option<i64>,
16
17    /// The bundle identifier of the app.
18    ///
19    /// [bundleId](https://developer.apple.com/documentation/appstoreservernotifications/bundleid)
20    pub bundle_id: Option<String>,
21
22    /// The server environment that the notification applies to, either sandbox or production.
23    ///
24    /// [environment](https://developer.apple.com/documentation/appstoreservernotifications/environment)
25    pub environment: Option<Environment>,
26
27    /// App transaction information signed by the App Store, in JSON Web Signature (JWS) format.
28    ///
29    /// [signedAppTransactionInfo](https://developer.apple.com/documentation/appstoreservernotifications/signedapptransactioninfo)
30    pub signed_app_transaction_info: Option<String>,
31}