Skip to content

Commit af0761a

Browse files
committed
[java][booking][03_preserve_object] Preserve Tax object
1 parent 1497419 commit af0761a

File tree

1 file changed

+2
-4
lines changed
  • examples/java/java-booking-03_preserve_whole_object/src/main/java/tv/codely/booking

1 file changed

+2
-4
lines changed

examples/java/java-booking-03_preserve_whole_object/src/main/java/tv/codely/booking/Booking.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ public final class Booking {
1212
private final BookingType bookingType;
1313
private final DiscountType discountType;
1414
private final DiscountValue discountValue;
15-
private final TaxType taxType;
16-
private final TaxValue taxValue;
15+
private final Tax tax;
1716

1817
public Booking(
1918
BookingId id,
@@ -32,8 +31,7 @@ public Booking(
3231
this.bookingType = bookingType;
3332
this.discountType = discount.type();
3433
this.discountValue = discount.value();
35-
this.taxType = tax.type();
36-
this.taxValue = tax.value();
34+
this.tax = tax;
3735
}
3836

3937
public BookingStatus statusFor(LocalDateTime date) {

0 commit comments

Comments
 (0)