@@ -29,6 +29,9 @@ public class JWSRenewalInfoDecodedPayload implements DecodedSignedData {
29
29
private static final String SERIALIZED_NAME_ENVIRONMENT = "environment" ;
30
30
private static final String SERIALIZED_NAME_RECENT_SUBSCRIPTION_START_DATE = "recentSubscriptionStartDate" ;
31
31
private static final String SERIALIZED_NAME_RENEWAL_DATE = "renewalDate" ;
32
+ private static final String SERIALIZED_NAME_RENEWAL_PRICE = "renewalPrice" ;
33
+ private static final String SERIALIZED_NAME_CURRENCY = "currency" ;
34
+ private static final String SERIALIZED_NAME_OFFER_DISCOUNT_TYPE = "offerDiscountType" ;
32
35
@ JsonProperty (SERIALIZED_NAME_EXPIRATION_INTENT )
33
36
private Integer expirationIntent ;
34
37
@ JsonProperty (SERIALIZED_NAME_ORIGINAL_TRANSACTION_ID )
@@ -61,6 +64,12 @@ public class JWSRenewalInfoDecodedPayload implements DecodedSignedData {
61
64
@ JsonProperty (SERIALIZED_NAME_RENEWAL_DATE )
62
65
@ JsonDeserialize (using =XcodeCompatibleTimestampDeserializer .class )
63
66
private Long renewalDate ;
67
+ @ JsonProperty (SERIALIZED_NAME_RENEWAL_PRICE )
68
+ private Long renewalPrice ;
69
+ @ JsonProperty (SERIALIZED_NAME_CURRENCY )
70
+ private String currency ;
71
+ @ JsonProperty (SERIALIZED_NAME_OFFER_DISCOUNT_TYPE )
72
+ private String offerDiscountType ;
64
73
@ JsonAnySetter
65
74
private Map <String , Object > unknownFields ;
66
75
@@ -389,6 +398,73 @@ public void setRenewalDate(Long renewalDate) {
389
398
this .renewalDate = renewalDate ;
390
399
}
391
400
401
+ public JWSRenewalInfoDecodedPayload renewalPrice (Long renewalPrice ) {
402
+ this .renewalPrice = renewalPrice ;
403
+ return this ;
404
+ }
405
+
406
+ /**
407
+ * The renewal price, in milliunits, of the auto-renewable subscription that renews at the next billing period.
408
+ *
409
+ * @return renewalPrice
410
+ * @see <a href="https://developer.apple.com/documentation/appstoreserverapi/renewalprice">renewalPrice</a>
411
+ **/
412
+ public Long getRenewalPrice () {
413
+ return renewalPrice ;
414
+ }
415
+
416
+ public void setRenewalPrice (Long renewalPrice ) {
417
+ this .renewalPrice = renewalPrice ;
418
+ }
419
+
420
+ public JWSRenewalInfoDecodedPayload currency (String currency ) {
421
+ this .currency = currency ;
422
+ return this ;
423
+ }
424
+
425
+ /**
426
+ * The currency code for the renewalPrice of the subscription.
427
+ *
428
+ * @return currency
429
+ * @see <a href="https://developer.apple.com/documentation/appstoreserverapi/currency">currency</a>
430
+ **/
431
+ public String getCurrency () {
432
+ return this .currency ;
433
+ }
434
+
435
+ public void setCurrency (String currency ) {
436
+ this .currency = currency ;
437
+ }
438
+
439
+ public JWSRenewalInfoDecodedPayload offerDiscountType (OfferDiscountType offerDiscountType ) {
440
+ this .offerDiscountType = offerDiscountType != null ? offerDiscountType .getValue () : null ;
441
+ return this ;
442
+ }
443
+
444
+ /**
445
+ * The payment mode of the discount offer.
446
+ *
447
+ * @return offerDiscountType
448
+ * @see <a href="https://developer.apple.com/documentation/appstoreserverapi/offerdiscounttype">offerDiscountType</a>
449
+ **/
450
+ public OfferDiscountType getOfferDiscountType () {
451
+ return offerDiscountType != null ? OfferDiscountType .fromValue (offerDiscountType ) : null ;
452
+ }
453
+
454
+ /**
455
+ * @see #getOfferDiscountType()
456
+ */
457
+ public String getRawOfferDiscountType () {
458
+ return offerDiscountType ;
459
+ }
460
+
461
+ public void setOfferDiscountType (OfferDiscountType offerDiscountType ) {
462
+ this .offerDiscountType = offerDiscountType != null ? offerDiscountType .getValue () : null ;
463
+ }
464
+
465
+ public void setRawOfferDiscountType (String rawOfferDiscountType ) {
466
+ this .offerDiscountType = rawOfferDiscountType ;
467
+ }
392
468
393
469
public JWSRenewalInfoDecodedPayload unknownFields (Map <String , Object > unknownFields ) {
394
470
this .unknownFields = unknownFields ;
@@ -431,12 +507,15 @@ public boolean equals(Object o) {
431
507
Objects .equals (this .environment , jwSRenewalInfoDecodedPayload .environment ) &&
432
508
Objects .equals (this .recentSubscriptionStartDate , jwSRenewalInfoDecodedPayload .recentSubscriptionStartDate ) &&
433
509
Objects .equals (this .renewalDate , jwSRenewalInfoDecodedPayload .renewalDate ) &&
510
+ Objects .equals (this .renewalPrice , jwSRenewalInfoDecodedPayload .renewalPrice ) &&
511
+ Objects .equals (this .currency , jwSRenewalInfoDecodedPayload .currency ) &&
512
+ Objects .equals (this .offerDiscountType , jwSRenewalInfoDecodedPayload .offerDiscountType ) &&
434
513
Objects .equals (this .unknownFields , jwSRenewalInfoDecodedPayload .unknownFields );
435
514
}
436
515
437
516
@ Override
438
517
public int hashCode () {
439
- return Objects .hash (expirationIntent , originalTransactionId , autoRenewProductId , productId , autoRenewStatus , isInBillingRetryPeriod , priceIncreaseStatus , gracePeriodExpiresDate , offerType , offerIdentifier , signedDate , environment , recentSubscriptionStartDate , renewalDate , unknownFields );
518
+ return Objects .hash (expirationIntent , originalTransactionId , autoRenewProductId , productId , autoRenewStatus , isInBillingRetryPeriod , priceIncreaseStatus , gracePeriodExpiresDate , offerType , offerIdentifier , signedDate , environment , recentSubscriptionStartDate , renewalDate , renewalPrice , currency , offerDiscountType , unknownFields );
440
519
}
441
520
442
521
@ Override
@@ -456,6 +535,9 @@ public String toString() {
456
535
", environment='" + environment + '\'' +
457
536
", recentSubscriptionStartDate=" + recentSubscriptionStartDate +
458
537
", renewalDate=" + renewalDate +
538
+ ", renewalPrice=" + renewalPrice +
539
+ ", currency='" + currency + '\'' +
540
+ ", offerDiscountType='" + offerDiscountType + '\'' +
459
541
", unknownFields=" + unknownFields +
460
542
'}' ;
461
543
}
0 commit comments