diff --git a/models/JWSTransactionDecodedPayload.ts b/models/JWSTransactionDecodedPayload.ts index 2a644db..cdca270 100644 --- a/models/JWSTransactionDecodedPayload.ts +++ b/models/JWSTransactionDecodedPayload.ts @@ -3,6 +3,7 @@ import { DecodedSignedData } from "./DecodedSignedData" import { Environment, EnvironmentValidator } from "./Environment" import { InAppOwnershipType, InAppOwnershipTypeValidator } from "./InAppOwnershipType" +import { OfferDiscountType, OfferDiscountTypeValidator } from "./OfferDiscountType" import { OfferType, OfferTypeValidator } from "./OfferType" import { RevocationReason, RevocationReasonValidator } from "./RevocationReason" import { TransactionReason, TransactionReasonValidator } from "./TransactionReason" @@ -176,6 +177,27 @@ export interface JWSTransactionDecodedPayload extends DecodedSignedData { * {@link https://developer.apple.com/documentation/appstoreserverapi/transactionreason transactionReason} **/ transactionReason?: TransactionReason + + /** + * The three-letter ISO 4217 currency code for the price of the product. + * + * {@link https://developer.apple.com/documentation/appstoreserverapi/currency currency} + **/ + currency?: string + + /** + * The price of the in-app purchase or subscription offer that you configured in App Store Connect, as an integer. + * + * {@link https://developer.apple.com/documentation/appstoreserverapi/price price} + **/ + price?: number + + /** + * The payment mode you configure for an introductory offer, promotional offer, or offer code on an auto-renewable subscription. + * + * {@link https://developer.apple.com/documentation/appstoreserverapi/offerdiscounttype offerDiscountType} + **/ + offerDiscountType?: OfferDiscountType } @@ -186,6 +208,7 @@ export class JWSTransactionDecodedPayloadValidator implements Validator { + validate(obj: any): obj is OfferDiscountType { + return Object.values(OfferDiscountType).includes(obj) + } +}