Fixed environmental constants

This commit is contained in:
Junpei Tsuji
2018-02-28 14:29:41 +09:00
parent 50e40fdccb
commit 659dd4b8ca
2 changed files with 10 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ type Environment string
const ( const (
Sandbox Environment = "Sandbox" Sandbox Environment = "Sandbox"
Production Environment = "PROD" Production Environment = "Production"
) )
type ( type (

View File

@@ -16,6 +16,13 @@ const (
NotificationTypeDidChangeRenewalPreference NotificationType = "DID_CHANGE_RENEWAL_PREFERENCE" NotificationTypeDidChangeRenewalPreference NotificationType = "DID_CHANGE_RENEWAL_PREFERENCE"
) )
type NotificationEnvironment string
const (
NotificationSandbox NotificationEnvironment = "Sandbox"
NotificationProduction NotificationEnvironment = "PROD"
)
type NotificationExpiresDate struct { type NotificationExpiresDate struct {
ExpiresDateMS string `json:"expires_date"` ExpiresDateMS string `json:"expires_date"`
ExpiresDateUTC string `json:"expires_date_formatted"` ExpiresDateUTC string `json:"expires_date_formatted"`
@@ -44,8 +51,8 @@ type NotificationReceipt struct {
} }
type SubscriptionNotification struct { type SubscriptionNotification struct {
Environment Environment `json:"environment"` Environment NotificationEnvironment `json:"environment"`
NotificationType NotificationType `json:"notification_type"` NotificationType NotificationType `json:"notification_type"`
// Not show in raw notify body // Not show in raw notify body
Password string `json:"password"` Password string `json:"password"`