• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Adyen / adyen-java-api-library / #2703

16 Oct 2023 09:08AM UTC coverage: 12.568%. First build
#2703

push

web-flow
Merge 5bb3765b7 into fe719ccb3

6014 of 6014 new or added lines in 86 files covered. (100.0%)

11852 of 94302 relevant lines covered (12.57%)

0.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

33.8
/src/main/java/com/adyen/model/marketpaywebhooks/AccountHolderStatus.java
1
/*
2
 * Classic Platforms - Notifications
3
 *
4
 * The version of the OpenAPI document: 6
5
 * 
6
 *
7
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8
 * https://openapi-generator.tech
9
 * Do not edit the class manually.
10
 */
11

12

13
package com.adyen.model.marketpaywebhooks;
14

15
import java.util.Objects;
16
import java.util.Arrays;
17
import java.util.Map;
18
import java.util.HashMap;
19
import com.adyen.model.marketpaywebhooks.AccountEvent;
20
import com.adyen.model.marketpaywebhooks.AccountPayoutState;
21
import com.adyen.model.marketpaywebhooks.AccountProcessingState;
22
import com.fasterxml.jackson.annotation.JsonInclude;
23
import com.fasterxml.jackson.annotation.JsonProperty;
24
import com.fasterxml.jackson.annotation.JsonCreator;
25
import com.fasterxml.jackson.annotation.JsonTypeName;
26
import com.fasterxml.jackson.annotation.JsonValue;
27
import io.swagger.annotations.ApiModel;
28
import io.swagger.annotations.ApiModelProperty;
29
import java.util.ArrayList;
30
import java.util.List;
31
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
32
import com.fasterxml.jackson.core.JsonProcessingException;
33

34

35
/**
36
 * AccountHolderStatus
37
 */
38
@JsonPropertyOrder({
39
  AccountHolderStatus.JSON_PROPERTY_EVENTS,
40
  AccountHolderStatus.JSON_PROPERTY_PAYOUT_STATE,
41
  AccountHolderStatus.JSON_PROPERTY_PROCESSING_STATE,
42
  AccountHolderStatus.JSON_PROPERTY_STATUS,
43
  AccountHolderStatus.JSON_PROPERTY_STATUS_REASON
44
})
45

46
public class AccountHolderStatus {
47
  public static final String JSON_PROPERTY_EVENTS = "events";
48
  private List<AccountEvent> events = null;
1✔
49

50
  public static final String JSON_PROPERTY_PAYOUT_STATE = "payoutState";
51
  private AccountPayoutState payoutState;
52

53
  public static final String JSON_PROPERTY_PROCESSING_STATE = "processingState";
54
  private AccountProcessingState processingState;
55

56
  /**
57
   * The status of the account holder. &gt;Permitted values: &#x60;Active&#x60;, &#x60;Inactive&#x60;, &#x60;Suspended&#x60;, &#x60;Closed&#x60;.
58
   */
59
  public enum StatusEnum {
1✔
60
    ACTIVE("Active"),
1✔
61
    
62
    CLOSED("Closed"),
1✔
63
    
64
    INACTIVE("Inactive"),
1✔
65
    
66
    SUSPENDED("Suspended");
1✔
67

68
    private String value;
69

70
    StatusEnum(String value) {
1✔
71
      this.value = value;
1✔
72
    }
1✔
73

74
    @JsonValue
75
    public String getValue() {
76
      return value;
×
77
    }
78

79
    @Override
80
    public String toString() {
81
      return String.valueOf(value);
×
82
    }
83

84
    @JsonCreator
85
    public static StatusEnum fromValue(String value) {
86
      for (StatusEnum b : StatusEnum.values()) {
1✔
87
        if (b.value.equals(value)) {
1✔
88
          return b;
1✔
89
        }
90
      }
91
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
92
    }
93
  }
94

95
  public static final String JSON_PROPERTY_STATUS = "status";
96
  private StatusEnum status;
97

98
  public static final String JSON_PROPERTY_STATUS_REASON = "statusReason";
99
  private String statusReason;
100

101
  public AccountHolderStatus() { 
1✔
102
  }
1✔
103

104
  public AccountHolderStatus events(List<AccountEvent> events) {
105
    this.events = events;
×
106
    return this;
×
107
  }
108

109
  public AccountHolderStatus addEventsItem(AccountEvent eventsItem) {
110
    if (this.events == null) {
×
111
      this.events = new ArrayList<>();
×
112
    }
113
    this.events.add(eventsItem);
×
114
    return this;
×
115
  }
116

117
   /**
118
   * A list of events scheduled for the account holder.
119
   * @return events
120
  **/
121
  @ApiModelProperty(value = "A list of events scheduled for the account holder.")
122
  @JsonProperty(JSON_PROPERTY_EVENTS)
123
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
124

125
  public List<AccountEvent> getEvents() {
126
    return events;
×
127
  }
128

129

130
  @JsonProperty(JSON_PROPERTY_EVENTS)
131
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
132
  public void setEvents(List<AccountEvent> events) {
133
    this.events = events;
1✔
134
  }
1✔
135

136

137
  public AccountHolderStatus payoutState(AccountPayoutState payoutState) {
138
    this.payoutState = payoutState;
×
139
    return this;
×
140
  }
141

142
   /**
143
   * Get payoutState
144
   * @return payoutState
145
  **/
146
  @ApiModelProperty(value = "")
147
  @JsonProperty(JSON_PROPERTY_PAYOUT_STATE)
148
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
149

150
  public AccountPayoutState getPayoutState() {
151
    return payoutState;
×
152
  }
153

154

155
  @JsonProperty(JSON_PROPERTY_PAYOUT_STATE)
156
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
157
  public void setPayoutState(AccountPayoutState payoutState) {
158
    this.payoutState = payoutState;
1✔
159
  }
1✔
160

161

162
  public AccountHolderStatus processingState(AccountProcessingState processingState) {
163
    this.processingState = processingState;
×
164
    return this;
×
165
  }
166

167
   /**
168
   * Get processingState
169
   * @return processingState
170
  **/
171
  @ApiModelProperty(value = "")
172
  @JsonProperty(JSON_PROPERTY_PROCESSING_STATE)
173
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
174

175
  public AccountProcessingState getProcessingState() {
176
    return processingState;
×
177
  }
178

179

180
  @JsonProperty(JSON_PROPERTY_PROCESSING_STATE)
181
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
182
  public void setProcessingState(AccountProcessingState processingState) {
183
    this.processingState = processingState;
1✔
184
  }
1✔
185

186

187
  public AccountHolderStatus status(StatusEnum status) {
188
    this.status = status;
×
189
    return this;
×
190
  }
191

192
   /**
193
   * The status of the account holder. &gt;Permitted values: &#x60;Active&#x60;, &#x60;Inactive&#x60;, &#x60;Suspended&#x60;, &#x60;Closed&#x60;.
194
   * @return status
195
  **/
196
  @ApiModelProperty(required = true, value = "The status of the account holder. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`.")
197
  @JsonProperty(JSON_PROPERTY_STATUS)
198
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
199

200
  public StatusEnum getStatus() {
201
    return status;
×
202
  }
203

204

205
  @JsonProperty(JSON_PROPERTY_STATUS)
206
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
207
  public void setStatus(StatusEnum status) {
208
    this.status = status;
1✔
209
  }
1✔
210

211

212
  public AccountHolderStatus statusReason(String statusReason) {
213
    this.statusReason = statusReason;
×
214
    return this;
×
215
  }
216

217
   /**
218
   * The reason why the status was assigned to the account holder.
219
   * @return statusReason
220
  **/
221
  @ApiModelProperty(value = "The reason why the status was assigned to the account holder.")
222
  @JsonProperty(JSON_PROPERTY_STATUS_REASON)
223
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
224

225
  public String getStatusReason() {
226
    return statusReason;
×
227
  }
228

229

230
  @JsonProperty(JSON_PROPERTY_STATUS_REASON)
231
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
232
  public void setStatusReason(String statusReason) {
233
    this.statusReason = statusReason;
1✔
234
  }
1✔
235

236

237
  /**
238
   * Return true if this AccountHolderStatus object is equal to o.
239
   */
240
  @Override
241
  public boolean equals(Object o) {
242
    if (this == o) {
×
243
      return true;
×
244
    }
245
    if (o == null || getClass() != o.getClass()) {
×
246
      return false;
×
247
    }
248
    AccountHolderStatus accountHolderStatus = (AccountHolderStatus) o;
×
249
    return Objects.equals(this.events, accountHolderStatus.events) &&
×
250
        Objects.equals(this.payoutState, accountHolderStatus.payoutState) &&
×
251
        Objects.equals(this.processingState, accountHolderStatus.processingState) &&
×
252
        Objects.equals(this.status, accountHolderStatus.status) &&
×
253
        Objects.equals(this.statusReason, accountHolderStatus.statusReason);
×
254
  }
255

256
  @Override
257
  public int hashCode() {
258
    return Objects.hash(events, payoutState, processingState, status, statusReason);
×
259
  }
260

261
  @Override
262
  public String toString() {
263
    StringBuilder sb = new StringBuilder();
×
264
    sb.append("class AccountHolderStatus {\n");
×
265
    sb.append("    events: ").append(toIndentedString(events)).append("\n");
×
266
    sb.append("    payoutState: ").append(toIndentedString(payoutState)).append("\n");
×
267
    sb.append("    processingState: ").append(toIndentedString(processingState)).append("\n");
×
268
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
×
269
    sb.append("    statusReason: ").append(toIndentedString(statusReason)).append("\n");
×
270
    sb.append("}");
×
271
    return sb.toString();
×
272
  }
273

274
  /**
275
   * Convert the given object to string with each line indented by 4 spaces
276
   * (except the first line).
277
   */
278
  private String toIndentedString(Object o) {
279
    if (o == null) {
×
280
      return "null";
×
281
    }
282
    return o.toString().replace("\n", "\n    ");
×
283
  }
284

285
/**
286
   * Create an instance of AccountHolderStatus given an JSON string
287
   *
288
   * @param jsonString JSON string
289
   * @return An instance of AccountHolderStatus
290
   * @throws JsonProcessingException if the JSON string is invalid with respect to AccountHolderStatus
291
   */
292
  public static AccountHolderStatus fromJson(String jsonString) throws JsonProcessingException {
293
    return JSON.getMapper().readValue(jsonString, AccountHolderStatus.class);
×
294
  }
295
/**
296
  * Convert an instance of AccountHolderStatus to an JSON string
297
  *
298
  * @return JSON string
299
  */
300
  public String toJson() throws JsonProcessingException {
301
    return JSON.getMapper().writeValueAsString(this);
×
302
  }
303
}
304

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc