diff --git a/src/main/java/com/trynoice/api/subscription/payload/GiftCardResponse.java b/src/main/java/com/trynoice/api/subscription/payload/GiftCardResponse.java index 33b943b..c656ba7 100644 --- a/src/main/java/com/trynoice/api/subscription/payload/GiftCardResponse.java +++ b/src/main/java/com/trynoice/api/subscription/payload/GiftCardResponse.java @@ -25,7 +25,8 @@ public class GiftCardResponse { private int hourCredits; @Schema(required = true, description = "whether the gift card has been redeemed.") - private boolean isRedeemed; + @NonNull + private Boolean isRedeemed; @Schema(type = "integer", format = "int64", description = "optional epoch millis when the gift card expires.") private OffsetDateTime expiresAt; diff --git a/src/test/java/com/trynoice/api/subscription/SubscriptionServiceTest.java b/src/test/java/com/trynoice/api/subscription/SubscriptionServiceTest.java index cad3264..c48f4b5 100644 --- a/src/test/java/com/trynoice/api/subscription/SubscriptionServiceTest.java +++ b/src/test/java/com/trynoice/api/subscription/SubscriptionServiceTest.java @@ -357,7 +357,7 @@ void getGiftCard_withValidCode() { val response = assertDoesNotThrow(() -> service.getGiftCard(2L, code)); assertEquals(card.getCode(), response.getCode()); assertEquals(card.getHourCredits(), response.getHourCredits()); - assertEquals(card.isRedeemed(), response.isRedeemed()); + assertEquals(card.isRedeemed(), response.getIsRedeemed()); assertEquals(card.getExpiresAt(), response.getExpiresAt()); }