package pl.zankowski.iextrading4j.api.refdata;

import com.google.common.base.MoreObjects;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Objects;

public abstract class DailyList implements Serializable {

    private final String recordId;
    private final LocalDateTime dailyListTimestamp;

    public DailyList(final String recordId, final LocalDateTime dailyListTimestamp) {
        this.recordId = recordId;
        this.dailyListTimestamp = dailyListTimestamp;
    }

    public String getRecordId() {
        return recordId;
    }

    public LocalDateTime getDailyListTimestamp() {
        return dailyListTimestamp;
    }

    @Override
    public boolean equals(final Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        final DailyList dailyList = (DailyList) o;
        return Objects.equals(recordId, dailyList.recordId) &&
                Objects.equals(dailyListTimestamp, dailyList.dailyListTimestamp);
    }

    @Override
    public int hashCode() {
        return Objects.hash(recordId, dailyListTimestamp);
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(this)
                .add("recordId", recordId)
                .add("dailyListTimestamp", dailyListTimestamp)
                .toString();
    }
}

@@ -41,16 +41,182 @@
 fdata;%0A%0A
+import com.fasterxml.jackson.annotation.JsonCreator;%0Aimport com.fasterxml.jackson.annotation.JsonProperty;%0Aimport com.fasterxml.jackson.annotation.JsonPropertyOrder;%0A
 import c
@@ -250,16 +250,16 @@
 bjects;%0A
-
 %0Aimport 
@@ -339,16 +339,71 @@
 jects;%0A%0A
+@JsonPropertyOrder(%7B%22recordId%22, %22dailyListTimestamp%22%7D)%0A
 public a
@@ -541,16 +541,33 @@
 stamp;%0A%0A
+    @JsonCreator%0A
     publ
@@ -583,30 +583,117 @@
 ist(
-final String recordId,
+%0A            @JsonProperty(%22RecordID%22) final String recordId,%0A            @JsonProperty(%22DailyListTimestamp%22)
  fin

Introduce NextDayExDate daily list