1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
use crate::primitives::consumption_request_reason::ConsumptionRequestReason;
use crate::primitives::environment::Environment;
use crate::primitives::status::Status;
use serde::{Deserialize, Serialize};
/// The app metadata and the signed renewal and transaction information.
///
/// [data](https://developer.apple.com/documentation/appstoreservernotifications/data)
#[derive(Debug, Clone, Deserialize, Serialize, Hash)]
pub struct Data {
/// The server environment that the notification applies to, either sandbox or production.
///
/// [environment](https://developer.apple.com/documentation/appstoreservernotifications/environment)
pub environment: Option<Environment>,
/// The unique identifier of an app in the App Store.
///
/// [appAppleId](https://developer.apple.com/documentation/appstoreservernotifications/appappleid)
#[serde(rename = "appAppleId")]
pub app_apple_id: Option<i64>,
/// The bundle identifier of an app.
///
/// [bundleId](https://developer.apple.com/documentation/appstoreserverapi/bundleid)
#[serde(rename = "bundleId")]
pub bundle_id: Option<String>,
/// The version of the build that identifies an iteration of the bundle.
///
/// [bundleVersion](https://developer.apple.com/documentation/appstoreservernotifications/bundleversion)
#[serde(rename = "bundleVersion")]
pub bundle_version: Option<String>,
/// Transaction information signed by the App Store, in JSON Web Signature (JWS) format.
///
/// [JWSTransaction](https://developer.apple.com/documentation/appstoreserverapi/jwstransaction)
#[serde(rename = "signedTransactionInfo")]
pub signed_transaction_info: Option<String>,
/// Subscription renewal information, signed by the App Store, in JSON Web Signature (JWS) format.
///
/// [JWSRenewalInfo](https://developer.apple.com/documentation/appstoreserverapi/jwsrenewalinfo)
#[serde(rename = "signedRenewalInfo")]
pub signed_renewal_info: Option<String>,
/// The status of an auto-renewable subscription at the time the App Store signs the notification.
///
/// [JWSRenewalInfo](https://developer.apple.com/documentation/appstoreservernotifications/status)
#[serde(rename = "status")]
pub status: Option<Status>,
/// The reason the customer requested the refund.
///
/// [consumptionRequestReason](https://developer.apple.com/documentation/appstoreservernotifications/consumptionrequestreason)
#[serde(rename = "consumptionRequestReason")]
pub consumption_request_reason: Option<ConsumptionRequestReason>,
}