Skip to content

Commit

Permalink
feat: support 1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
richzw committed Jun 24, 2024
1 parent f782b71 commit 58e2ee3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func main() {

# Support

App Store Server API [1.11+](https://developer.apple.com/documentation/appstoreserverapi)
App Store Server API [1.12+](https://developer.apple.com/documentation/appstoreserverapi)

# License

Expand Down
32 changes: 18 additions & 14 deletions model.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,23 @@ type ConsumptionRequestBody struct {

// JWSRenewalInfoDecodedPayload https://developer.apple.com/documentation/appstoreserverapi/jwsrenewalinfodecodedpayload
type JWSRenewalInfoDecodedPayload struct {
AutoRenewProductId string `json:"autoRenewProductId"`
AutoRenewStatus int32 `json:"autoRenewStatus"`
Environment Environment `json:"environment"`
ExpirationIntent int32 `json:"expirationIntent"`
GracePeriodExpiresDate int64 `json:"gracePeriodExpiresDate"`
IsInBillingRetryPeriod *bool `json:"isInBillingRetryPeriod"`
OfferIdentifier string `json:"offerIdentifier"`
OfferType int32 `json:"offerType"`
OriginalTransactionId string `json:"originalTransactionId"`
PriceIncreaseStatus *int32 `json:"priceIncreaseStatus"`
ProductId string `json:"productId"`
RecentSubscriptionStartDate int64 `json:"recentSubscriptionStartDate"`
RenewalDate int64 `json:"renewalDate"`
SignedDate int64 `json:"signedDate"`
AutoRenewProductId string `json:"autoRenewProductId"`
AutoRenewStatus int32 `json:"autoRenewStatus"`
Environment Environment `json:"environment"`
ExpirationIntent int32 `json:"expirationIntent"`
GracePeriodExpiresDate int64 `json:"gracePeriodExpiresDate"`
IsInBillingRetryPeriod *bool `json:"isInBillingRetryPeriod"`
OfferIdentifier string `json:"offerIdentifier"`
OfferType int32 `json:"offerType"`
OriginalTransactionId string `json:"originalTransactionId"`
PriceIncreaseStatus *int32 `json:"priceIncreaseStatus"`
ProductId string `json:"productId"`
RecentSubscriptionStartDate int64 `json:"recentSubscriptionStartDate"`
RenewalDate int64 `json:"renewalDate"`
SignedDate int64 `json:"signedDate"`
RenewalPrice int64 `json:"renewalPrice,omitempty"`
Currency string `json:"currency,omitempty"`
OfferDiscountType OfferDiscountType `json:"offerDiscountType,omitempty"`
}

func (J JWSRenewalInfoDecodedPayload) Valid() error {
Expand Down Expand Up @@ -231,6 +234,7 @@ const (
NotificationTypeV2RenewalExtended NotificationTypeV2 = "RENEWAL_EXTENDED"
NotificationTypeV2Revoke NotificationTypeV2 = "REVOKE"
NotificationTypeV2Subscribed NotificationTypeV2 = "SUBSCRIBED"
NotificationTypeV2OneTimeCharge NotificationTypeV2 = "ONE_TIME_CHARGE"
)

// SubtypeV2 is type
Expand Down
2 changes: 1 addition & 1 deletion store.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const (

PathTransactionInfo = "/inApps/v1/transactions/{transactionId}"
PathLookUp = "/inApps/v1/lookup/{orderId}"
PathTransactionHistory = "/inApps/v1/history/{originalTransactionId}"
PathTransactionHistory = "/inApps/v2/history/{originalTransactionId}"
PathRefundHistory = "/inApps/v2/refund/lookup/{originalTransactionId}"
PathGetALLSubscriptionStatus = "/inApps/v1/subscriptions/{originalTransactionId}"
PathConsumptionInfo = "/inApps/v1/transactions/consumption/{originalTransactionId}"
Expand Down

0 comments on commit 58e2ee3

Please sign in to comment.