From 07242a133791a1d38f4fdb1ce70e57654afd306e Mon Sep 17 00:00:00 2001 From: Ian Zanger <22856937+izanger@users.noreply.github.com> Date: Tue, 4 Nov 2025 17:43:46 -0800 Subject: [PATCH] Add IAP Offer Codes support --- .../models/JWSRenewalInfoDecodedPayload.py | 6 +++--- .../models/JWSTransactionDecodedPayload.py | 6 +++--- appstoreserverlibrary/models/OfferDiscountType.py | 5 +++-- appstoreserverlibrary/models/OfferType.py | 4 ++-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/appstoreserverlibrary/models/JWSRenewalInfoDecodedPayload.py b/appstoreserverlibrary/models/JWSRenewalInfoDecodedPayload.py index 8a2d9ca6..5d537022 100644 --- a/appstoreserverlibrary/models/JWSRenewalInfoDecodedPayload.py +++ b/appstoreserverlibrary/models/JWSRenewalInfoDecodedPayload.py @@ -93,7 +93,7 @@ class JWSRenewalInfoDecodedPayload(AttrsRawValueAware): offerType: Optional[OfferType] = OfferType.create_main_attr('rawOfferType') """ - The type of the subscription offer. + The type of subscription offer. https://developer.apple.com/documentation/appstoreserverapi/offertype """ @@ -105,7 +105,7 @@ class JWSRenewalInfoDecodedPayload(AttrsRawValueAware): offerIdentifier: Optional[str] = attr.ib(default=None) """ - The identifier that contains the promo code or the promotional offer identifier. + The offer code or the promotional offer identifier. https://developer.apple.com/documentation/appstoreserverapi/offeridentifier """ @@ -159,7 +159,7 @@ class JWSRenewalInfoDecodedPayload(AttrsRawValueAware): offerDiscountType: Optional[OfferDiscountType] = OfferDiscountType.create_main_attr('rawOfferDiscountType') """ - The payment mode of the discount offer. + The payment mode you configure for the offer. https://developer.apple.com/documentation/appstoreserverapi/offerdiscounttype """ diff --git a/appstoreserverlibrary/models/JWSTransactionDecodedPayload.py b/appstoreserverlibrary/models/JWSTransactionDecodedPayload.py index 38fd0a6f..bbed834d 100644 --- a/appstoreserverlibrary/models/JWSTransactionDecodedPayload.py +++ b/appstoreserverlibrary/models/JWSTransactionDecodedPayload.py @@ -132,7 +132,7 @@ class JWSTransactionDecodedPayload(AttrsRawValueAware): revocationReason: Optional[RevocationReason] = RevocationReason.create_main_attr('rawRevocationReason') """ - The reason that the App Store refunded the transaction or revoked it from family sharing. + The reason that the App Store refunded the transaction or revoked it from Family Sharing. https://developer.apple.com/documentation/appstoreserverapi/revocationreason """ @@ -170,7 +170,7 @@ class JWSTransactionDecodedPayload(AttrsRawValueAware): offerIdentifier: Optional[str] = attr.ib(default=None) """ - The identifier that contains the promo code or the promotional offer identifier. + The identifier that contains the offer code or the promotional offer identifier. https://developer.apple.com/documentation/appstoreserverapi/offeridentifier """ @@ -229,7 +229,7 @@ class JWSTransactionDecodedPayload(AttrsRawValueAware): offerDiscountType: Optional[OfferDiscountType] = OfferDiscountType.create_main_attr('rawOfferDiscountType') """ - The payment mode you configure for an introductory offer, promotional offer, or offer code on an auto-renewable subscription. + The payment mode you configure for the offer. https://developer.apple.com/documentation/appstoreserverapi/offerdiscounttype """ diff --git a/appstoreserverlibrary/models/OfferDiscountType.py b/appstoreserverlibrary/models/OfferDiscountType.py index ea7cff5d..a383ca94 100644 --- a/appstoreserverlibrary/models/OfferDiscountType.py +++ b/appstoreserverlibrary/models/OfferDiscountType.py @@ -6,10 +6,11 @@ class OfferDiscountType(str, Enum, metaclass=AppStoreServerLibraryEnumMeta): """ - The payment mode you configure for an introductory offer, promotional offer, or offer code on an auto-renewable subscription. + The payment mode for a discount offer on an In-App Purchase. https://developer.apple.com/documentation/appstoreserverapi/offerdiscounttype """ FREE_TRIAL = "FREE_TRIAL" PAY_AS_YOU_GO = "PAY_AS_YOU_GO" - PAY_UP_FRONT = "PAY_UP_FRONT" \ No newline at end of file + PAY_UP_FRONT = "PAY_UP_FRONT" + ONE_TIME = "ONE_TIME" \ No newline at end of file diff --git a/appstoreserverlibrary/models/OfferType.py b/appstoreserverlibrary/models/OfferType.py index a66fd83e..48a5df66 100644 --- a/appstoreserverlibrary/models/OfferType.py +++ b/appstoreserverlibrary/models/OfferType.py @@ -6,11 +6,11 @@ class OfferType(IntEnum, metaclass=AppStoreServerLibraryEnumMeta): """ - The type of subscription offer. + The type of offer. https://developer.apple.com/documentation/appstoreserverapi/offertype """ INTRODUCTORY_OFFER = 1 PROMOTIONAL_OFFER = 2 - SUBSCRIPTION_OFFER_CODE = 3 + OFFER_CODE = 3 WIN_BACK_OFFER = 4