1
1
package appstore
2
2
3
+ // NotificationType is type
4
+ // https://developer.apple.com/documentation/appstoreservernotifications/notification_type
3
5
// https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Subscriptions.html#//apple_ref/doc/uid/TP40008267-CH7-SW16
4
6
type NotificationType string
5
7
8
+ // list of NotificationType
6
9
const (
7
10
// Initial purchase of the subscription.
8
11
NotificationTypeInitialBuy NotificationType = "INITIAL_BUY"
@@ -29,8 +32,10 @@ const (
29
32
NotificationTypeDidRenew NotificationType = "DID_RENEW"
30
33
)
31
34
35
+ // NotificationEnvironment is type
32
36
type NotificationEnvironment string
33
37
38
+ // list of NotificationEnvironment
34
39
const (
35
40
NotificationSandbox NotificationEnvironment = "Sandbox"
36
41
NotificationProduction NotificationEnvironment = "PROD"
@@ -72,6 +77,8 @@ type NotificationUnifiedReceipt struct {
72
77
PendingRenewalInfo []PendingRenewalInfo `json:"pending_renewal_info,omitempty"`
73
78
}
74
79
80
+ // SubscriptionNotification is struct for
81
+ // https://developer.apple.com/documentation/appstoreservernotifications/responsebody
75
82
type SubscriptionNotification struct {
76
83
Environment NotificationEnvironment `json:"environment"`
77
84
NotificationType NotificationType `json:"notification_type"`
@@ -110,6 +117,11 @@ type SubscriptionNotification struct {
110
117
// Deprecated: see details: https://developer.apple.com/documentation/appstoreservernotifications/ .
111
118
LatestExpiredReceiptInfo NotificationReceipt `json:"latest_expired_receipt_info"`
112
119
120
+ // BID is the app bundle ID
121
+ BID string `json:"bid,omitempty"`
122
+ // BVRS is the app bundle version
123
+ BVRS string `json:"bvrs,omitempty"`
124
+
113
125
// Posted only if the notification_type is CANCEL.
114
126
CancellationDate
115
127
}
0 commit comments