Skip to content

Commit 58e2ee3

Browse files
committed
feat: support 1.12
1 parent f782b71 commit 58e2ee3

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ func main() {
223223

224224
# Support
225225

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

228228
# License
229229

model.go

+18-14
Original file line numberDiff line numberDiff line change
@@ -87,20 +87,23 @@ type ConsumptionRequestBody struct {
8787

8888
// JWSRenewalInfoDecodedPayload https://developer.apple.com/documentation/appstoreserverapi/jwsrenewalinfodecodedpayload
8989
type JWSRenewalInfoDecodedPayload struct {
90-
AutoRenewProductId string `json:"autoRenewProductId"`
91-
AutoRenewStatus int32 `json:"autoRenewStatus"`
92-
Environment Environment `json:"environment"`
93-
ExpirationIntent int32 `json:"expirationIntent"`
94-
GracePeriodExpiresDate int64 `json:"gracePeriodExpiresDate"`
95-
IsInBillingRetryPeriod *bool `json:"isInBillingRetryPeriod"`
96-
OfferIdentifier string `json:"offerIdentifier"`
97-
OfferType int32 `json:"offerType"`
98-
OriginalTransactionId string `json:"originalTransactionId"`
99-
PriceIncreaseStatus *int32 `json:"priceIncreaseStatus"`
100-
ProductId string `json:"productId"`
101-
RecentSubscriptionStartDate int64 `json:"recentSubscriptionStartDate"`
102-
RenewalDate int64 `json:"renewalDate"`
103-
SignedDate int64 `json:"signedDate"`
90+
AutoRenewProductId string `json:"autoRenewProductId"`
91+
AutoRenewStatus int32 `json:"autoRenewStatus"`
92+
Environment Environment `json:"environment"`
93+
ExpirationIntent int32 `json:"expirationIntent"`
94+
GracePeriodExpiresDate int64 `json:"gracePeriodExpiresDate"`
95+
IsInBillingRetryPeriod *bool `json:"isInBillingRetryPeriod"`
96+
OfferIdentifier string `json:"offerIdentifier"`
97+
OfferType int32 `json:"offerType"`
98+
OriginalTransactionId string `json:"originalTransactionId"`
99+
PriceIncreaseStatus *int32 `json:"priceIncreaseStatus"`
100+
ProductId string `json:"productId"`
101+
RecentSubscriptionStartDate int64 `json:"recentSubscriptionStartDate"`
102+
RenewalDate int64 `json:"renewalDate"`
103+
SignedDate int64 `json:"signedDate"`
104+
RenewalPrice int64 `json:"renewalPrice,omitempty"`
105+
Currency string `json:"currency,omitempty"`
106+
OfferDiscountType OfferDiscountType `json:"offerDiscountType,omitempty"`
104107
}
105108

106109
func (J JWSRenewalInfoDecodedPayload) Valid() error {
@@ -231,6 +234,7 @@ const (
231234
NotificationTypeV2RenewalExtended NotificationTypeV2 = "RENEWAL_EXTENDED"
232235
NotificationTypeV2Revoke NotificationTypeV2 = "REVOKE"
233236
NotificationTypeV2Subscribed NotificationTypeV2 = "SUBSCRIBED"
237+
NotificationTypeV2OneTimeCharge NotificationTypeV2 = "ONE_TIME_CHARGE"
234238
)
235239

236240
// SubtypeV2 is type

store.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const (
2222

2323
PathTransactionInfo = "/inApps/v1/transactions/{transactionId}"
2424
PathLookUp = "/inApps/v1/lookup/{orderId}"
25-
PathTransactionHistory = "/inApps/v1/history/{originalTransactionId}"
25+
PathTransactionHistory = "/inApps/v2/history/{originalTransactionId}"
2626
PathRefundHistory = "/inApps/v2/refund/lookup/{originalTransactionId}"
2727
PathGetALLSubscriptionStatus = "/inApps/v1/subscriptions/{originalTransactionId}"
2828
PathConsumptionInfo = "/inApps/v1/transactions/consumption/{originalTransactionId}"

0 commit comments

Comments
 (0)