diff --git a/CHANGELOG.md b/CHANGELOG.md index b8e6ef6696..7fbcd02170 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log All notable changes to this project will be documented in this file. +## [3.3.4] - 2020-08-27 + +### Added + +- Added support to no UTP SSE quotes [[#97](https://github.com/WojciechZankowski/iextrading4j/pull/97)] [@lucasbaizer2](https://github.com/lucasbaizer2) +- Added ```symbol``` to Dividens + ## [3.3.3] - 2020-06-01 ### Changed @@ -370,4 +377,5 @@ All notable changes to this project will be documented in this file. [3.3.0]: https://github.com/WojciechZankowski/iextrading4j/compare/IT4J_RELEASE_3_2_8...IT4J_RELEASE_3_3_0 [3.3.1]: https://github.com/WojciechZankowski/iextrading4j/compare/IT4J_RELEASE_3_3_0...IT4J_RELEASE_3_3_1 [3.3.2]: https://github.com/WojciechZankowski/iextrading4j/compare/IT4J_RELEASE_3_3_1...IT4J_RELEASE_3_3_2 -[3.3.3]: https://github.com/WojciechZankowski/iextrading4j/compare/IT4J_RELEASE_3_3_2...IT4J_RELEASE_3_3_3 \ No newline at end of file +[3.3.3]: https://github.com/WojciechZankowski/iextrading4j/compare/IT4J_RELEASE_3_3_2...IT4J_RELEASE_3_3_3 +[3.3.3]: https://github.com/WojciechZankowski/iextrading4j/compare/IT4J_RELEASE_3_3_3...IT4J_RELEASE_3_3_4 \ No newline at end of file diff --git a/README.md b/README.md index 15ddd804d2..42129f3e52 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Maven: pl.zankowski iextrading4j-all - 3.3.3 + 3.3.4 ``` @@ -41,14 +41,14 @@ Gradle: ``` dependencies { - compile 'pl.zankowski:iextrading4j-all:3.3.3' + compile 'pl.zankowski:iextrading4j-all:3.3.4' } ``` Library is up to: * IEX Trading API version [1.24] - 09.11.2018 -* IEX Cloud API version [1.0] - 03.11.2019 +* IEX Cloud API version [1.0] - 11.08.2020 Supported versions: Java SE 8, Java SE 9, Java SE 10, Java SE 11, Java SE 12 diff --git a/iextrading4j-acceptance/pom.xml b/iextrading4j-acceptance/pom.xml index a4b036871a..ac5905ea34 100644 --- a/iextrading4j-acceptance/pom.xml +++ b/iextrading4j-acceptance/pom.xml @@ -5,7 +5,7 @@ iextrading4j pl.zankowski - 3.3.3 + 3.3.4 4.0.0 diff --git a/iextrading4j-acceptance/src/test/java/pl/zankowski/iextrading4j/test/acceptance/v1/AlternativeAcceptanceTest.java b/iextrading4j-acceptance/src/test/java/pl/zankowski/iextrading4j/test/acceptance/v1/AlternativeAcceptanceTest.java index 6e51686556..a87ec20044 100644 --- a/iextrading4j-acceptance/src/test/java/pl/zankowski/iextrading4j/test/acceptance/v1/AlternativeAcceptanceTest.java +++ b/iextrading4j-acceptance/src/test/java/pl/zankowski/iextrading4j/test/acceptance/v1/AlternativeAcceptanceTest.java @@ -1,5 +1,6 @@ package pl.zankowski.iextrading4j.test.acceptance.v1; +import org.junit.Ignore; import org.junit.Test; import pl.zankowski.iextrading4j.api.alternative.CeoCompensation; import pl.zankowski.iextrading4j.api.alternative.CryptoPrice; @@ -53,6 +54,7 @@ public void cryptoBookTest() { assertThat(book).isNotNull(); } + @Ignore("Message received from IEX Trading: The requested data requires permission to access.") @Test public void dailySentimentTest() { final Sentiment result = cloudClient.executeRequest(new DailySentimentRequestBuilder() @@ -62,6 +64,7 @@ public void dailySentimentTest() { assertThat(result).isNotNull(); } + @Ignore("Message received from IEX Trading: The requested data requires permission to access.") @Test public void manualDailySentimentTest() { final List result = cloudClient.executeRequest(new SentimentRequestBuilder() @@ -72,6 +75,7 @@ public void manualDailySentimentTest() { assertThat(result).isNotNull(); } + @Ignore("Message received from IEX Trading: The requested data requires permission to access.") @Test public void minuteSentimentTest() { final List result = cloudClient.executeRequest(new SentimentRequestBuilder() diff --git a/iextrading4j-all/pom.xml b/iextrading4j-all/pom.xml index 12e9ce0539..6b0827a83a 100644 --- a/iextrading4j-all/pom.xml +++ b/iextrading4j-all/pom.xml @@ -5,7 +5,7 @@ iextrading4j pl.zankowski - 3.3.3 + 3.3.4 4.0.0 diff --git a/iextrading4j-api/pom.xml b/iextrading4j-api/pom.xml index 3ff1d7d102..b19bfb2fe6 100644 --- a/iextrading4j-api/pom.xml +++ b/iextrading4j-api/pom.xml @@ -5,7 +5,7 @@ iextrading4j pl.zankowski - 3.3.3 + 3.3.4 4.0.0 diff --git a/iextrading4j-api/src/main/java/pl/zankowski/iextrading4j/api/stocks/v1/Dividends.java b/iextrading4j-api/src/main/java/pl/zankowski/iextrading4j/api/stocks/v1/Dividends.java index 523320ab65..38225cfc4a 100644 --- a/iextrading4j-api/src/main/java/pl/zankowski/iextrading4j/api/stocks/v1/Dividends.java +++ b/iextrading4j-api/src/main/java/pl/zankowski/iextrading4j/api/stocks/v1/Dividends.java @@ -4,18 +4,20 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.google.common.base.MoreObjects; -import com.google.common.base.Objects; import java.io.Serializable; import java.math.BigDecimal; import java.time.LocalDate; +import java.util.Objects; +import java.util.StringJoiner; -@JsonPropertyOrder({"exDate", "paymentDate", "recordDate", "declaredDate", +@JsonPropertyOrder({"symbol", "exDate", "paymentDate", "recordDate", "declaredDate", "amount", "flag", "currency", "description", "frequency", "date"}) public class Dividends implements Serializable { private static final long serialVersionUID = -8671643610377057386L; + private final String symbol; private final LocalDate exDate; private final LocalDate paymentDate; private final LocalDate recordDate; @@ -29,6 +31,7 @@ public class Dividends implements Serializable { @JsonCreator public Dividends( + @JsonProperty("symbol") final String symbol, @JsonProperty("exDate") final LocalDate exDate, @JsonProperty("paymentDate") final LocalDate paymentDate, @JsonProperty("recordDate") final LocalDate recordDate, @@ -39,6 +42,7 @@ public Dividends( @JsonProperty("description") final String description, @JsonProperty("frequency") final String frequency, @JsonProperty("date") final LocalDate date) { + this.symbol = symbol; this.exDate = exDate; this.paymentDate = paymentDate; this.recordDate = recordDate; @@ -51,6 +55,10 @@ public Dividends( this.date = date; } + public String getSymbol() { + return symbol; + } + public LocalDate getExDate() { return exDate; } @@ -100,36 +108,39 @@ public boolean equals(final Object o) { return false; } final Dividends dividends = (Dividends) o; - return Objects.equal(exDate, dividends.exDate) && - Objects.equal(paymentDate, dividends.paymentDate) && - Objects.equal(recordDate, dividends.recordDate) && - Objects.equal(declaredDate, dividends.declaredDate) && - Objects.equal(amount, dividends.amount) && - Objects.equal(flag, dividends.flag) && - Objects.equal(currency, dividends.currency) && - Objects.equal(description, dividends.description) && - Objects.equal(frequency, dividends.frequency) && - Objects.equal(date, dividends.date); + return Objects.equals(symbol, dividends.symbol) && + Objects.equals(exDate, dividends.exDate) && + Objects.equals(paymentDate, dividends.paymentDate) && + Objects.equals(recordDate, dividends.recordDate) && + Objects.equals(declaredDate, dividends.declaredDate) && + Objects.equals(amount, dividends.amount) && + Objects.equals(flag, dividends.flag) && + Objects.equals(currency, dividends.currency) && + Objects.equals(description, dividends.description) && + Objects.equals(frequency, dividends.frequency) && + Objects.equals(date, dividends.date); } @Override public int hashCode() { - return Objects.hashCode(exDate, paymentDate, recordDate, declaredDate, amount, flag, currency, description, frequency, date); + return Objects.hash(symbol, exDate, paymentDate, recordDate, declaredDate, + amount, flag, currency, description, frequency, date); } @Override public String toString() { - return MoreObjects.toStringHelper(this) - .add("exDate", exDate) - .add("paymentDate", paymentDate) - .add("recordDate", recordDate) - .add("declaredDate", declaredDate) - .add("amount", amount) - .add("flag", flag) - .add("currency", currency) - .add("description", description) - .add("frequency", frequency) - .add("date", date) + return new StringJoiner(", ", Dividends.class.getSimpleName() + "[", "]") + .add("symbol='" + symbol + "'") + .add("exDate=" + exDate) + .add("paymentDate=" + paymentDate) + .add("recordDate=" + recordDate) + .add("declaredDate=" + declaredDate) + .add("amount=" + amount) + .add("flag='" + flag + "'") + .add("currency='" + currency + "'") + .add("description='" + description + "'") + .add("frequency='" + frequency + "'") + .add("date=" + date) .toString(); } } diff --git a/iextrading4j-api/src/test/java/pl/zankowski/iextrading4j/api/stocks/v1/DividendsTest.java b/iextrading4j-api/src/test/java/pl/zankowski/iextrading4j/api/stocks/v1/DividendsTest.java index 8815e33f2d..b7cd398a7c 100644 --- a/iextrading4j-api/src/test/java/pl/zankowski/iextrading4j/api/stocks/v1/DividendsTest.java +++ b/iextrading4j-api/src/test/java/pl/zankowski/iextrading4j/api/stocks/v1/DividendsTest.java @@ -16,6 +16,7 @@ public class DividendsTest { @Test public void constructor() { + final String symbol = fixture.create(String.class); final LocalDate exDate = fixture.create(LocalDate.class); final LocalDate paymentDate = fixture.create(LocalDate.class); final LocalDate recordDate = fixture.create(LocalDate.class); @@ -27,9 +28,10 @@ public void constructor() { final String frequency = fixture.create(String.class); final LocalDate date = fixture.create(LocalDate.class); - final Dividends dividends = new Dividends(exDate, paymentDate, recordDate, declaredDate, amount, + final Dividends dividends = new Dividends(symbol, exDate, paymentDate, recordDate, declaredDate, amount, flag, currency, description, frequency, date); + assertThat(dividends.getSymbol()).isEqualTo(symbol); assertThat(dividends.getExDate()).isEqualTo(exDate); assertThat(dividends.getPaymentDate()).isEqualTo(paymentDate); assertThat(dividends.getRecordDate()).isEqualTo(recordDate); diff --git a/iextrading4j-client/pom.xml b/iextrading4j-client/pom.xml index 48cce61bde..245969cf92 100644 --- a/iextrading4j-client/pom.xml +++ b/iextrading4j-client/pom.xml @@ -5,7 +5,7 @@ iextrading4j pl.zankowski - 3.3.3 + 3.3.4 4.0.0 diff --git a/iextrading4j-mutation/pom.xml b/iextrading4j-mutation/pom.xml index 4c55902594..6cad97c2df 100644 --- a/iextrading4j-mutation/pom.xml +++ b/iextrading4j-mutation/pom.xml @@ -5,7 +5,7 @@ iextrading4j pl.zankowski - 3.3.3 + 3.3.4 4.0.0 diff --git a/iextrading4j-samples/pom.xml b/iextrading4j-samples/pom.xml index ec95d29ccc..d1c035cbbc 100644 --- a/iextrading4j-samples/pom.xml +++ b/iextrading4j-samples/pom.xml @@ -5,7 +5,7 @@ iextrading4j pl.zankowski - 3.3.3 + 3.3.4 4.0.0 @@ -15,7 +15,7 @@ pl.zankowski iextrading4j-client - 3.3.3 + 3.3.4 diff --git a/iextrading4j-test/pom.xml b/iextrading4j-test/pom.xml index 2abeaec619..bb64c71a94 100644 --- a/iextrading4j-test/pom.xml +++ b/iextrading4j-test/pom.xml @@ -5,7 +5,7 @@ iextrading4j pl.zankowski - 3.3.3 + 3.3.4 4.0.0 diff --git a/iextrading4j-test/src/test/java/pl/zankowski/iextrading4j/test/rest/v1/stock/DividendsServiceTest.java b/iextrading4j-test/src/test/java/pl/zankowski/iextrading4j/test/rest/v1/stock/DividendsServiceTest.java index 3251121c3e..dd5e9e0809 100644 --- a/iextrading4j-test/src/test/java/pl/zankowski/iextrading4j/test/rest/v1/stock/DividendsServiceTest.java +++ b/iextrading4j-test/src/test/java/pl/zankowski/iextrading4j/test/rest/v1/stock/DividendsServiceTest.java @@ -35,6 +35,7 @@ public void dividendsServiceTest() { .build()); final Dividends dividends = dividendsList.get(0); + assertThat(dividends.getSymbol()).isEqualTo("AAPL"); assertThat(dividends.getExDate()).isEqualTo(LocalDate.of(2019, 5, 10)); assertThat(dividends.getPaymentDate()).isEqualTo(LocalDate.of(2019, 5, 16)); assertThat(dividends.getRecordDate()).isEqualTo(LocalDate.of(2019, 5, 13)); diff --git a/iextrading4j-test/src/test/resources/__files/rest/v1/stock/DividendsResponse.json b/iextrading4j-test/src/test/resources/__files/rest/v1/stock/DividendsResponse.json index 14cd965791..debccce776 100644 --- a/iextrading4j-test/src/test/resources/__files/rest/v1/stock/DividendsResponse.json +++ b/iextrading4j-test/src/test/resources/__files/rest/v1/stock/DividendsResponse.json @@ -1,5 +1,6 @@ [ { + "symbol": "AAPL", "exDate": "2019-05-10", "paymentDate": "2019-05-16", "recordDate": "2019-05-13", diff --git a/pom.xml b/pom.xml index 887fec5391..a2250ec319 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ pl.zankowski iextrading4j pom - 3.3.3 + 3.3.4 IEXTrading4j Open source IEX Trading REST and WebSocket API library @@ -75,7 +75,7 @@ pl.zankowski iextrading4j-api - 3.3.3 + 3.3.4 @@ -83,19 +83,19 @@ iextrading4j-api test-jar test - 3.3.3 + 3.3.4 pl.zankowski iextrading4j-client - 3.3.3 + 3.3.4 pl.zankowski iextrading4j-samples - 3.3.3 + 3.3.4 @@ -310,6 +310,9 @@ org.apache.maven.plugins maven-javadoc-plugin ${maven.javadoc.plugin} + + ${maven.compiler.source} + attach-javadocs