From 42f1b6352c2647b0735c08b74a879207e7c35ec5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armando=20Rodr=C3=ADguez?= <127134616+armando-rodriguez-cko@users.noreply.github.com> Date: Tue, 17 Dec 2024 11:10:12 +0100 Subject: [PATCH] Update product and add types in payments (#458) --- src/main/java/com/checkout/payments/Product.java | 7 +++++++ src/main/java/com/checkout/payments/ProductType.java | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/checkout/payments/Product.java b/src/main/java/com/checkout/payments/Product.java index ddb3cafa..967dc27a 100644 --- a/src/main/java/com/checkout/payments/Product.java +++ b/src/main/java/com/checkout/payments/Product.java @@ -5,11 +5,15 @@ import lombok.Builder; import lombok.Data; +import java.time.Instant; + @Data @Builder @AllArgsConstructor public final class Product { + private ProductType type; + private String name; private Long quantity; @@ -47,4 +51,7 @@ public final class Product { private String sku; + @SerializedName("service_ends_on") + private Instant serviceEndsOn; + } diff --git a/src/main/java/com/checkout/payments/ProductType.java b/src/main/java/com/checkout/payments/ProductType.java index db5413e2..f5c59d46 100644 --- a/src/main/java/com/checkout/payments/ProductType.java +++ b/src/main/java/com/checkout/payments/ProductType.java @@ -38,6 +38,12 @@ public enum ProductType { INVOICE, @SerializedName("pay_later") - PAY_LATER + PAY_LATER, + + @SerializedName("digital") + DIGITAL, + + @SerializedName("physical") + PHYSICAL, } \ No newline at end of file