Skip to main content

app_store_server_library/models/
app_data.rs

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