1 | package pl.zankowski.iextrading4j.api.corporate; | |
2 | ||
3 | import com.fasterxml.jackson.annotation.JsonCreator; | |
4 | import com.fasterxml.jackson.annotation.JsonProperty; | |
5 | ||
6 | import java.math.BigDecimal; | |
7 | import java.time.LocalDate; | |
8 | import java.util.Objects; | |
9 | import java.util.StringJoiner; | |
10 | ||
11 | public class AdvancedBonus extends CorporateData { | |
12 | ||
13 | private static final long serialVersionUID = -6477438186877377186L; | |
14 | ||
15 | private final LocalDate recordDate; | |
16 | private final LocalDate paymentDate; | |
17 | private final String resultSecurityType; | |
18 | private final String currency; | |
19 | private final BigDecimal lapsedPremium; | |
20 | ||
21 | @JsonCreator | |
22 | public AdvancedBonus( | |
23 | @JsonProperty("symbol") final String symbol, | |
24 | @JsonProperty("id") final String id, | |
25 | @JsonProperty("key") final String key, | |
26 | @JsonProperty("subkey") final String subkey, | |
27 | @JsonProperty("updated") final Long updated, | |
28 | @JsonProperty("refid") final String refid, | |
29 | @JsonProperty("source") final String source, | |
30 | @JsonProperty("date") final Long date, | |
31 | @JsonProperty("created") final LocalDate created, | |
32 | @JsonProperty("lastUpdated") final LocalDate lastUpdated, | |
33 | @JsonProperty("notes") final String notes, | |
34 | @JsonProperty("figi") final String figi, | |
35 | @JsonProperty("parValue") final BigDecimal parValue, | |
36 | @JsonProperty("parValueCurrency") final String parValueCurrency, | |
37 | @JsonProperty("exDate") final LocalDate exDate, | |
38 | @JsonProperty("recordDate") final LocalDate recordDate, | |
39 | @JsonProperty("paymentDate") final LocalDate paymentDate, | |
40 | @JsonProperty("fromFactor") final BigDecimal fromFactor, | |
41 | @JsonProperty("toFactor") final BigDecimal toFactor, | |
42 | @JsonProperty("ratio") final BigDecimal ratio, | |
43 | @JsonProperty("description") final String description, | |
44 | @JsonProperty("flag") final String flag, | |
45 | @JsonProperty("securityType") final String securityType, | |
46 | @JsonProperty("resultSecurityType") final String resultSecurityType, | |
47 | @JsonProperty("currency") final String currency, | |
48 | @JsonProperty("countryCode") final String countryCode, | |
49 | @JsonProperty("lapsedPremium") final BigDecimal lapsedPremium) { | |
50 | super(symbol, id, key, subkey, updated, refid, source, date, created, lastUpdated, notes, figi, parValue, | |
51 | parValueCurrency, description, flag, securityType, fromFactor, toFactor, ratio, exDate, countryCode); | |
52 | this.recordDate = recordDate; | |
53 | this.paymentDate = paymentDate; | |
54 | this.resultSecurityType = resultSecurityType; | |
55 | this.currency = currency; | |
56 | this.lapsedPremium = lapsedPremium; | |
57 | } | |
58 | ||
59 | public LocalDate getRecordDate() { | |
60 |
1
1. getRecordDate : replaced return value with null for pl/zankowski/iextrading4j/api/corporate/AdvancedBonus::getRecordDate → KILLED |
return recordDate; |
61 | } | |
62 | ||
63 | public LocalDate getPaymentDate() { | |
64 |
1
1. getPaymentDate : replaced return value with null for pl/zankowski/iextrading4j/api/corporate/AdvancedBonus::getPaymentDate → KILLED |
return paymentDate; |
65 | } | |
66 | ||
67 | public String getResultSecurityType() { | |
68 |
1
1. getResultSecurityType : replaced return value with "" for pl/zankowski/iextrading4j/api/corporate/AdvancedBonus::getResultSecurityType → KILLED |
return resultSecurityType; |
69 | } | |
70 | ||
71 | public String getCurrency() { | |
72 |
1
1. getCurrency : replaced return value with "" for pl/zankowski/iextrading4j/api/corporate/AdvancedBonus::getCurrency → KILLED |
return currency; |
73 | } | |
74 | ||
75 | public BigDecimal getLapsedPremium() { | |
76 |
1
1. getLapsedPremium : replaced return value with null for pl/zankowski/iextrading4j/api/corporate/AdvancedBonus::getLapsedPremium → KILLED |
return lapsedPremium; |
77 | } | |
78 | ||
79 | @Override | |
80 | public boolean equals(final Object o) { | |
81 |
1
1. equals : negated conditional → KILLED |
if (this == o) { |
82 |
1
1. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/corporate/AdvancedBonus::equals → KILLED |
return true; |
83 | } | |
84 |
2
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED |
if (o == null || getClass() != o.getClass()) { |
85 |
1
1. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/corporate/AdvancedBonus::equals → KILLED |
return false; |
86 | } | |
87 |
1
1. equals : negated conditional → KILLED |
if (!super.equals(o)) { |
88 |
1
1. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/corporate/AdvancedBonus::equals → KILLED |
return false; |
89 | } | |
90 | final AdvancedBonus that = (AdvancedBonus) o; | |
91 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/corporate/AdvancedBonus::equals → KILLED |
return Objects.equals(recordDate, that.recordDate) && |
92 |
1
1. equals : negated conditional → KILLED |
Objects.equals(paymentDate, that.paymentDate) && |
93 |
1
1. equals : negated conditional → KILLED |
Objects.equals(resultSecurityType, that.resultSecurityType) && |
94 |
1
1. equals : negated conditional → KILLED |
Objects.equals(currency, that.currency) && |
95 |
1
1. equals : negated conditional → KILLED |
Objects.equals(lapsedPremium, that.lapsedPremium); |
96 | } | |
97 | ||
98 | @Override | |
99 | public int hashCode() { | |
100 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/corporate/AdvancedBonus::hashCode → KILLED |
return Objects.hash(super.hashCode(), recordDate, paymentDate, resultSecurityType, currency, lapsedPremium); |
101 | } | |
102 | ||
103 | @Override | |
104 | public String toString() { | |
105 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/corporate/AdvancedBonus::toString → KILLED |
return new StringJoiner(", ", AdvancedBonus.class.getSimpleName() + "[", "]") |
106 | .add("recordDate=" + recordDate) | |
107 | .add("paymentDate=" + paymentDate) | |
108 | .add("resultSecurityType='" + resultSecurityType + "'") | |
109 | .add("currency='" + currency + "'") | |
110 | .add("countryCode='" + getCountryCode() + "'") | |
111 | .add("lapsedPremium=" + lapsedPremium) | |
112 | .add("refid='" + getRefid() + "'") | |
113 | .add("source='" + getSource() + "'") | |
114 | .add("date=" + getDate()) | |
115 | .add("created=" + getCreated()) | |
116 | .add("lastUpdated=" + getLastUpdated()) | |
117 | .add("notes='" + getNotes() + "'") | |
118 | .add("figi='" + getFigi() + "'") | |
119 | .add("description='" + getDescription() + "'") | |
120 | .add("flag='" + getFlag() + "'") | |
121 | .add("securityType='" + getSecurityType() + "'") | |
122 | .add("fromFactor=" + getFromFactor()) | |
123 | .add("toFactor=" + getToFactor()) | |
124 | .add("ratio=" + getRatio()) | |
125 | .add("parValue=" + getParValue()) | |
126 | .add("parValueCurrency='" + getParValueCurrency() + "'") | |
127 | .add("exDate=" + getExDate()) | |
128 | .add("symbol='" + getSymbol() + "'") | |
129 | .add("id='" + getId() + "'") | |
130 | .add("key='" + getKey() + "'") | |
131 | .add("subkey='" + getSubkey() + "'") | |
132 | .add("updated=" + getUpdated()) | |
133 | .toString(); | |
134 | } | |
135 | } | |
Mutations | ||
60 |
1.1 |
|
64 |
1.1 |
|
68 |
1.1 |
|
72 |
1.1 |
|
76 |
1.1 |
|
81 |
1.1 |
|
82 |
1.1 |
|
84 |
1.1 2.2 |
|
85 |
1.1 |
|
87 |
1.1 |
|
88 |
1.1 |
|
91 |
1.1 2.2 |
|
92 |
1.1 |
|
93 |
1.1 |
|
94 |
1.1 |
|
95 |
1.1 |
|
100 |
1.1 |
|
105 |
1.1 |