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

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

22 Sep 2023 11:24AM UTC coverage: 12.611%. First build
#2661

push

web-flow
Merge 251f6ff51 into 9e36e9c01

9262 of 9262 new or added lines in 142 files covered. (100.0%)

11033 of 87486 relevant lines covered (12.61%)

0.13 hits per line

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

0.0
/src/main/java/com/adyen/model/marketpayaccount/AccountHolderStatus.java
1
/*
2
 * Account API
3
 * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead.  The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them.  For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example:   ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ```  Alternatively, you can use the username and password to connect to the API using basic authentication. For example:  ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints).  ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number.  For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ```
4
 *
5
 * The version of the OpenAPI document: 6
6
 * 
7
 *
8
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
 * https://openapi-generator.tech
10
 * Do not edit the class manually.
11
 */
12

13

14
package com.adyen.model.marketpayaccount;
15

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

35

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

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

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

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

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

69
    private String value;
70

71
    StatusEnum(String value) {
×
72
      this.value = value;
×
73
    }
×
74

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

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

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

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

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

102
  public AccountHolderStatus() { 
×
103
  }
×
104

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

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

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

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

130

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

137

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

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

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

155

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

162

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

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

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

180

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

187

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

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

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

205

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

212

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

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

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

230

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

237

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

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

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

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

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

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