Skip to content

Commit afcf41b

Browse files
Merge pull request #166 from izanger/main
Add IAP Offer Codes support
2 parents 93118ad + 07242a1 commit afcf41b

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

appstoreserverlibrary/models/JWSRenewalInfoDecodedPayload.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class JWSRenewalInfoDecodedPayload(AttrsRawValueAware):
9393

9494
offerType: Optional[OfferType] = OfferType.create_main_attr('rawOfferType')
9595
"""
96-
The type of the subscription offer.
96+
The type of subscription offer.
9797
9898
https://developer.apple.com/documentation/appstoreserverapi/offertype
9999
"""
@@ -105,7 +105,7 @@ class JWSRenewalInfoDecodedPayload(AttrsRawValueAware):
105105

106106
offerIdentifier: Optional[str] = attr.ib(default=None)
107107
"""
108-
The identifier that contains the promo code or the promotional offer identifier.
108+
The offer code or the promotional offer identifier.
109109
110110
https://developer.apple.com/documentation/appstoreserverapi/offeridentifier
111111
"""
@@ -159,7 +159,7 @@ class JWSRenewalInfoDecodedPayload(AttrsRawValueAware):
159159

160160
offerDiscountType: Optional[OfferDiscountType] = OfferDiscountType.create_main_attr('rawOfferDiscountType')
161161
"""
162-
The payment mode of the discount offer.
162+
The payment mode you configure for the offer.
163163
164164
https://developer.apple.com/documentation/appstoreserverapi/offerdiscounttype
165165
"""

appstoreserverlibrary/models/JWSTransactionDecodedPayload.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class JWSTransactionDecodedPayload(AttrsRawValueAware):
132132

133133
revocationReason: Optional[RevocationReason] = RevocationReason.create_main_attr('rawRevocationReason')
134134
"""
135-
The reason that the App Store refunded the transaction or revoked it from family sharing.
135+
The reason that the App Store refunded the transaction or revoked it from Family Sharing.
136136
137137
https://developer.apple.com/documentation/appstoreserverapi/revocationreason
138138
"""
@@ -170,7 +170,7 @@ class JWSTransactionDecodedPayload(AttrsRawValueAware):
170170

171171
offerIdentifier: Optional[str] = attr.ib(default=None)
172172
"""
173-
The identifier that contains the promo code or the promotional offer identifier.
173+
The identifier that contains the offer code or the promotional offer identifier.
174174
175175
https://developer.apple.com/documentation/appstoreserverapi/offeridentifier
176176
"""
@@ -229,7 +229,7 @@ class JWSTransactionDecodedPayload(AttrsRawValueAware):
229229

230230
offerDiscountType: Optional[OfferDiscountType] = OfferDiscountType.create_main_attr('rawOfferDiscountType')
231231
"""
232-
The payment mode you configure for an introductory offer, promotional offer, or offer code on an auto-renewable subscription.
232+
The payment mode you configure for the offer.
233233
234234
https://developer.apple.com/documentation/appstoreserverapi/offerdiscounttype
235235
"""

appstoreserverlibrary/models/OfferDiscountType.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66

77
class OfferDiscountType(str, Enum, metaclass=AppStoreServerLibraryEnumMeta):
88
"""
9-
The payment mode you configure for an introductory offer, promotional offer, or offer code on an auto-renewable subscription.
9+
The payment mode for a discount offer on an In-App Purchase.
1010
1111
https://developer.apple.com/documentation/appstoreserverapi/offerdiscounttype
1212
"""
1313
FREE_TRIAL = "FREE_TRIAL"
1414
PAY_AS_YOU_GO = "PAY_AS_YOU_GO"
15-
PAY_UP_FRONT = "PAY_UP_FRONT"
15+
PAY_UP_FRONT = "PAY_UP_FRONT"
16+
ONE_TIME = "ONE_TIME"

appstoreserverlibrary/models/OfferType.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
class OfferType(IntEnum, metaclass=AppStoreServerLibraryEnumMeta):
88
"""
9-
The type of subscription offer.
9+
The type of offer.
1010
1111
https://developer.apple.com/documentation/appstoreserverapi/offertype
1212
"""
1313
INTRODUCTORY_OFFER = 1
1414
PROMOTIONAL_OFFER = 2
15-
SUBSCRIPTION_OFFER_CODE = 3
15+
OFFER_CODE = 3
1616
WIN_BACK_OFFER = 4

0 commit comments

Comments
 (0)