|
19 | 19 | from appstoreserverlibrary.models.RevocationType import RevocationType |
20 | 20 | from appstoreserverlibrary.models.Status import Status |
21 | 21 | from appstoreserverlibrary.models.Subtype import Subtype |
| 22 | +from appstoreserverlibrary.models.TokenType import TokenType |
22 | 23 | from appstoreserverlibrary.models.TransactionReason import TransactionReason |
23 | 24 | from appstoreserverlibrary.models.Type import Type |
24 | 25 | from appstoreserverlibrary.models.AdvancedCommercePeriod import AdvancedCommercePeriod |
@@ -360,6 +361,9 @@ def check_environment_and_bundle_id(bundle_id: Optional[str], app_apple_id: Opti |
360 | 361 | self.assertEqual(1698148950000, notification.externalPurchaseToken.tokenCreationDate) |
361 | 362 | self.assertEqual(55555, notification.externalPurchaseToken.appAppleId) |
362 | 363 | self.assertEqual("com.example", notification.externalPurchaseToken.bundleId) |
| 364 | + self.assertEqual(TokenType.ACQUISITION, notification.externalPurchaseToken.tokenType) |
| 365 | + self.assertEqual("ACQUISITION", notification.externalPurchaseToken.rawTokenType) |
| 366 | + self.assertEqual(1698149000000, notification.externalPurchaseToken.tokenExpirationDate) |
363 | 367 |
|
364 | 368 | def test_external_purchase_token_sandbox_notification_decoding(self): |
365 | 369 | signed_external_purchase_token_notification = create_signed_data_from_json('tests/resources/models/signedExternalPurchaseTokenSandboxNotification.json') |
@@ -389,6 +393,9 @@ def check_environment_and_bundle_id(bundle_id: Optional[str], app_apple_id: Opti |
389 | 393 | self.assertEqual(1698148950000, notification.externalPurchaseToken.tokenCreationDate) |
390 | 394 | self.assertEqual(55555, notification.externalPurchaseToken.appAppleId) |
391 | 395 | self.assertEqual("com.example", notification.externalPurchaseToken.bundleId) |
| 396 | + self.assertEqual(TokenType.ACQUISITION, notification.externalPurchaseToken.tokenType) |
| 397 | + self.assertEqual("ACQUISITION", notification.externalPurchaseToken.rawTokenType) |
| 398 | + self.assertEqual(1698149000000, notification.externalPurchaseToken.tokenExpirationDate) |
392 | 399 |
|
393 | 400 | def test_realtime_request_decoding(self): |
394 | 401 | signed_realtime_request = create_signed_data_from_json('tests/resources/models/decodedRealtimeRequest.json') |
|
0 commit comments