Skip to content

Commit 7d19697

Browse files
committed
feat(api): add more fields to JWSTransaction
1 parent 07cf82b commit 7d19697

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

model.go

+11
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,14 @@ const (
132132
NonRenewable IAPType = "Non-Renewing Subscription"
133133
)
134134

135+
type OfferDiscountType string
136+
137+
const (
138+
OfferDiscountTypeFreeTrial OfferDiscountType = "FREE_TRIAL"
139+
OfferDiscountTypePayAsYouGo OfferDiscountType = "PAY_AS_YOU_GO"
140+
OfferDiscountTypePayUpFront OfferDiscountType = "PAY_UP_FRONT"
141+
)
142+
135143
// JWSTransaction https://developer.apple.com/documentation/appstoreserverapi/jwstransaction
136144
type JWSTransaction struct {
137145
TransactionID string `json:"transactionId,omitempty"`
@@ -157,6 +165,9 @@ type JWSTransaction struct {
157165
StorefrontId string `json:"storefrontId,omitempty"`
158166
TransactionReason TransactionReason `json:"transactionReason,omitempty"`
159167
Environment Environment `json:"environment,omitempty"`
168+
Price int32 `json:"price,omitempty"`
169+
Currency string `json:"currency,omitempty"`
170+
OfferDiscountType OfferDiscountType `json:"offerDiscountType,omitempty"`
160171
}
161172

162173
func (J JWSTransaction) Valid() error {

0 commit comments

Comments
 (0)