1 | package pl.zankowski.iextrading4j.client.rest.request.account; | |
2 | ||
3 | import com.google.common.base.MoreObjects; | |
4 | import com.google.common.base.Objects; | |
5 | import pl.zankowski.iextrading4j.client.rest.manager.PostEntity; | |
6 | import pl.zankowski.iextrading4j.client.rest.manager.RestRequest; | |
7 | import pl.zankowski.iextrading4j.client.rest.manager.RestRequestBuilder; | |
8 | import pl.zankowski.iextrading4j.client.rest.request.AbstractRequestFilterBuilder; | |
9 | import pl.zankowski.iextrading4j.client.rest.request.IEXCloudV1RestRequest; | |
10 | ||
11 | import javax.ws.rs.core.GenericType; | |
12 | ||
13 | public class PayAsYouGoRequestBuilder extends AbstractRequestFilterBuilder<String, PayAsYouGoRequestBuilder> | |
14 | implements IEXCloudV1RestRequest<String> { | |
15 | ||
16 | private boolean allow = false; | |
17 | ||
18 | public PayAsYouGoRequestBuilder withDisallowed() { | |
19 | this.allow = false; | |
20 |
1
1. withDisallowed : replaced return value with null for pl/zankowski/iextrading4j/client/rest/request/account/PayAsYouGoRequestBuilder::withDisallowed → KILLED |
return this; |
21 | } | |
22 | ||
23 | public PayAsYouGoRequestBuilder withAllowed() { | |
24 | this.allow = true; | |
25 |
1
1. withAllowed : replaced return value with null for pl/zankowski/iextrading4j/client/rest/request/account/PayAsYouGoRequestBuilder::withAllowed → KILLED |
return this; |
26 | } | |
27 | ||
28 | @Override | |
29 | public RestRequest<String> build() { | |
30 |
1
1. build : replaced return value with null for pl/zankowski/iextrading4j/client/rest/request/account/PayAsYouGoRequestBuilder::build → KILLED |
return RestRequestBuilder.<String>builder() |
31 | .withPath("/account/payasyougo").post() | |
32 | .withRequest(new PayAsYouGoPostEntity(allow)) | |
33 | .withResponse(new GenericType<String>() { | |
34 | }) | |
35 | .withSecretToken() | |
36 | .addQueryParam(getFilterParams()) | |
37 | .build(); | |
38 | } | |
39 | ||
40 | static class PayAsYouGoPostEntity extends PostEntity { | |
41 | ||
42 | private static final long serialVersionUID = 8560191976863485871L; | |
43 | ||
44 | private boolean allow; | |
45 | ||
46 | public PayAsYouGoPostEntity(final boolean allow) { | |
47 | this.allow = allow; | |
48 | } | |
49 | ||
50 | public boolean isAllow() { | |
51 |
2
1. isAllow : replaced boolean return with false for pl/zankowski/iextrading4j/client/rest/request/account/PayAsYouGoRequestBuilder$PayAsYouGoPostEntity::isAllow → KILLED 2. isAllow : replaced boolean return with true for pl/zankowski/iextrading4j/client/rest/request/account/PayAsYouGoRequestBuilder$PayAsYouGoPostEntity::isAllow → KILLED |
return allow; |
52 | } | |
53 | ||
54 | @Override | |
55 | public boolean equals(final Object o) { | |
56 |
1
1. equals : negated conditional → NO_COVERAGE |
if (this == o) { |
57 |
1
1. equals : replaced boolean return with false for pl/zankowski/iextrading4j/client/rest/request/account/PayAsYouGoRequestBuilder$PayAsYouGoPostEntity::equals → NO_COVERAGE |
return true; |
58 | } | |
59 |
2
1. equals : negated conditional → NO_COVERAGE 2. equals : negated conditional → NO_COVERAGE |
if (o == null || getClass() != o.getClass()) { |
60 |
1
1. equals : replaced boolean return with true for pl/zankowski/iextrading4j/client/rest/request/account/PayAsYouGoRequestBuilder$PayAsYouGoPostEntity::equals → NO_COVERAGE |
return false; |
61 | } | |
62 |
1
1. equals : negated conditional → NO_COVERAGE |
if (!super.equals(o)) { |
63 |
1
1. equals : replaced boolean return with true for pl/zankowski/iextrading4j/client/rest/request/account/PayAsYouGoRequestBuilder$PayAsYouGoPostEntity::equals → NO_COVERAGE |
return false; |
64 | } | |
65 | final PayAsYouGoPostEntity that = (PayAsYouGoPostEntity) o; | |
66 |
2
1. equals : negated conditional → NO_COVERAGE 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/client/rest/request/account/PayAsYouGoRequestBuilder$PayAsYouGoPostEntity::equals → NO_COVERAGE |
return allow == that.allow; |
67 | } | |
68 | ||
69 | @Override | |
70 | public int hashCode() { | |
71 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/client/rest/request/account/PayAsYouGoRequestBuilder$PayAsYouGoPostEntity::hashCode → NO_COVERAGE |
return Objects.hashCode(super.hashCode(), allow); |
72 | } | |
73 | ||
74 | @Override | |
75 | public String toString() { | |
76 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/client/rest/request/account/PayAsYouGoRequestBuilder$PayAsYouGoPostEntity::toString → NO_COVERAGE |
return MoreObjects.toStringHelper(this) |
77 | .add("allow", allow) | |
78 | .toString(); | |
79 | } | |
80 | ||
81 | } | |
82 | ||
83 | ||
84 | } | |
Mutations | ||
20 |
1.1 |
|
25 |
1.1 |
|
30 |
1.1 |
|
51 |
1.1 2.2 |
|
56 |
1.1 |
|
57 |
1.1 |
|
59 |
1.1 2.2 |
|
60 |
1.1 |
|
62 |
1.1 |
|
63 |
1.1 |
|
66 |
1.1 2.2 |
|
71 |
1.1 |
|
76 |
1.1 |