1 | package pl.zankowski.iextrading4j.client.sse.request.stocks; | |
2 | ||
3 | import pl.zankowski.iextrading4j.api.stocks.Quote; | |
4 | import pl.zankowski.iextrading4j.client.sse.manager.SseRequest; | |
5 | import pl.zankowski.iextrading4j.client.sse.manager.SseRequestBuilder; | |
6 | import pl.zankowski.iextrading4j.client.sse.request.AbstractSymbolSseRequestBuilder; | |
7 | ||
8 | import javax.ws.rs.core.GenericType; | |
9 | import java.util.List; | |
10 | ||
11 | public class QuoteSseRequestBuilder extends AbstractSymbolSseRequestBuilder<List<Quote>, QuoteSseRequestBuilder> { | |
12 | ||
13 | private QuoteInterval quoteInterval; | |
14 | private boolean noUTP; | |
15 | ||
16 | public QuoteSseRequestBuilder withQuoteInterval(final QuoteInterval quoteInterval) { | |
17 | this.quoteInterval = quoteInterval; | |
18 |
1
1. withQuoteInterval : replaced return value with null for pl/zankowski/iextrading4j/client/sse/request/stocks/QuoteSseRequestBuilder::withQuoteInterval → KILLED |
return this; |
19 | } | |
20 | | |
21 | public QuoteSseRequestBuilder withNoUTP() { | |
22 | this.noUTP = true; | |
23 |
1
1. withNoUTP : replaced return value with null for pl/zankowski/iextrading4j/client/sse/request/stocks/QuoteSseRequestBuilder::withNoUTP → KILLED |
return this; |
24 | } | |
25 | ||
26 | @Override | |
27 | public SseRequest<List<Quote>> build() { | |
28 |
1
1. build : replaced return value with null for pl/zankowski/iextrading4j/client/sse/request/stocks/QuoteSseRequestBuilder::build → KILLED |
return SseRequestBuilder.<List<Quote>>builder() |
29 |
1
1. build : negated conditional → KILLED |
.withPath(noUTP ? "/stocksUSNoUTP{interval}" : "/stocksUS{interval}") |
30 | .addPathParam("interval", quoteInterval.getName()) | |
31 | .withResponse(new GenericType<List<Quote>>() {}) | |
32 | .addQueryParam(SYMBOL_PARAM, getSymbol()) | |
33 | .addQueryParam(NO_SNAPSHOT_PARAM, isNoSnapshot()) | |
34 | .build(); | |
35 | } | |
36 | ||
37 | } | |
Mutations | ||
18 |
1.1 |
|
23 |
1.1 |
|
28 |
1.1 |
|
29 |
1.1 |