Skip to content

Commit

Permalink
Merge pull request #268 from jaryf/jary
Browse files Browse the repository at this point in the history
feat(playstore): add pointer in DeveloperNotification
  • Loading branch information
takecy authored Mar 19, 2024
2 parents e6d4a84 + 94dcc4f commit 734cc17
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions playstore/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const (
// DeveloperNotification is sent by a Pub/Sub topic.
// Detailed description is following.
// https://developer.android.com/google/play/billing/rtdn-reference#json_specification
// Depreacated: use DeveloperNotificationV2 instead.
type DeveloperNotification struct {
Version string `json:"version"`
PackageName string `json:"packageName"`
Expand All @@ -48,6 +49,19 @@ type DeveloperNotification struct {
TestNotification TestNotification `json:"testNotification,omitempty"`
}

// DeveloperNotificationV2 is sent by a Pub/Sub topic.
// Detailed description is following.
// https://developer.android.com/google/play/billing/rtdn-reference#json_specification
type DeveloperNotificationV2 struct {
Version string `json:"version"`
PackageName string `json:"packageName"`
EventTimeMillis string `json:"eventTimeMillis"`
SubscriptionNotification *SubscriptionNotification `json:"subscriptionNotification,omitempty"`
OneTimeProductNotification *OneTimeProductNotification `json:"oneTimeProductNotification,omitempty"`
VoidedPurchaseNotification *VoidedPurchaseNotification `json:"voidedPurchaseNotification,omitempty"`
TestNotification *TestNotification `json:"testNotification,omitempty"`
}

// SubscriptionNotification has subscription status as notificationType, token and subscription id
// to confirm status by calling Google Android Publisher API.
type SubscriptionNotification struct {
Expand Down

0 comments on commit 734cc17

Please sign in to comment.