• 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/CloseAccountResponse.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.ErrorFieldType;
21
import com.fasterxml.jackson.annotation.JsonInclude;
22
import com.fasterxml.jackson.annotation.JsonProperty;
23
import com.fasterxml.jackson.annotation.JsonCreator;
24
import com.fasterxml.jackson.annotation.JsonTypeName;
25
import com.fasterxml.jackson.annotation.JsonValue;
26
import io.swagger.annotations.ApiModel;
27
import io.swagger.annotations.ApiModelProperty;
28
import java.util.ArrayList;
29
import java.util.List;
30
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
31
import com.fasterxml.jackson.core.JsonProcessingException;
32

33

34
/**
35
 * CloseAccountResponse
36
 */
37
@JsonPropertyOrder({
38
  CloseAccountResponse.JSON_PROPERTY_ACCOUNT_CODE,
39
  CloseAccountResponse.JSON_PROPERTY_INVALID_FIELDS,
40
  CloseAccountResponse.JSON_PROPERTY_PSP_REFERENCE,
41
  CloseAccountResponse.JSON_PROPERTY_RESULT_CODE,
42
  CloseAccountResponse.JSON_PROPERTY_STATUS
43
})
44

45
public class CloseAccountResponse {
46
  public static final String JSON_PROPERTY_ACCOUNT_CODE = "accountCode";
47
  private String accountCode;
48

49
  public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields";
50
  private List<ErrorFieldType> invalidFields = null;
×
51

52
  public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference";
53
  private String pspReference;
54

55
  public static final String JSON_PROPERTY_RESULT_CODE = "resultCode";
56
  private String resultCode;
57

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

70
    private String value;
71

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

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

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

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

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

100
  public CloseAccountResponse() { 
×
101
  }
×
102

103
  public CloseAccountResponse accountCode(String accountCode) {
104
    this.accountCode = accountCode;
×
105
    return this;
×
106
  }
107

108
   /**
109
   * The account code of the account that is closed.
110
   * @return accountCode
111
  **/
112
  @ApiModelProperty(value = "The account code of the account that is closed.")
113
  @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE)
114
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
115

116
  public String getAccountCode() {
117
    return accountCode;
×
118
  }
119

120

121
  @JsonProperty(JSON_PROPERTY_ACCOUNT_CODE)
122
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
123
  public void setAccountCode(String accountCode) {
124
    this.accountCode = accountCode;
×
125
  }
×
126

127

128
  public CloseAccountResponse invalidFields(List<ErrorFieldType> invalidFields) {
129
    this.invalidFields = invalidFields;
×
130
    return this;
×
131
  }
132

133
  public CloseAccountResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) {
134
    if (this.invalidFields == null) {
×
135
      this.invalidFields = new ArrayList<>();
×
136
    }
137
    this.invalidFields.add(invalidFieldsItem);
×
138
    return this;
×
139
  }
140

141
   /**
142
   * Contains field validation errors that would prevent requests from being processed.
143
   * @return invalidFields
144
  **/
145
  @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.")
146
  @JsonProperty(JSON_PROPERTY_INVALID_FIELDS)
147
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
148

149
  public List<ErrorFieldType> getInvalidFields() {
150
    return invalidFields;
×
151
  }
152

153

154
  @JsonProperty(JSON_PROPERTY_INVALID_FIELDS)
155
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
156
  public void setInvalidFields(List<ErrorFieldType> invalidFields) {
157
    this.invalidFields = invalidFields;
×
158
  }
×
159

160

161
  public CloseAccountResponse pspReference(String pspReference) {
162
    this.pspReference = pspReference;
×
163
    return this;
×
164
  }
165

166
   /**
167
   * The reference of a request. Can be used to uniquely identify the request.
168
   * @return pspReference
169
  **/
170
  @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.")
171
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
172
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
173

174
  public String getPspReference() {
175
    return pspReference;
×
176
  }
177

178

179
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
180
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
181
  public void setPspReference(String pspReference) {
182
    this.pspReference = pspReference;
×
183
  }
×
184

185

186
  public CloseAccountResponse resultCode(String resultCode) {
187
    this.resultCode = resultCode;
×
188
    return this;
×
189
  }
190

191
   /**
192
   * The result code.
193
   * @return resultCode
194
  **/
195
  @ApiModelProperty(value = "The result code.")
196
  @JsonProperty(JSON_PROPERTY_RESULT_CODE)
197
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
198

199
  public String getResultCode() {
200
    return resultCode;
×
201
  }
202

203

204
  @JsonProperty(JSON_PROPERTY_RESULT_CODE)
205
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
206
  public void setResultCode(String resultCode) {
207
    this.resultCode = resultCode;
×
208
  }
×
209

210

211
  public CloseAccountResponse status(StatusEnum status) {
212
    this.status = status;
×
213
    return this;
×
214
  }
215

216
   /**
217
   * The new status of the account. &gt;Permitted values: &#x60;Active&#x60;, &#x60;Inactive&#x60;, &#x60;Suspended&#x60;, &#x60;Closed&#x60;.
218
   * @return status
219
  **/
220
  @ApiModelProperty(value = "The new status of the account. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`.")
221
  @JsonProperty(JSON_PROPERTY_STATUS)
222
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
223

224
  public StatusEnum getStatus() {
225
    return status;
×
226
  }
227

228

229
  @JsonProperty(JSON_PROPERTY_STATUS)
230
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
231
  public void setStatus(StatusEnum status) {
232
    this.status = status;
×
233
  }
×
234

235

236
  /**
237
   * Return true if this CloseAccountResponse object is equal to o.
238
   */
239
  @Override
240
  public boolean equals(Object o) {
241
    if (this == o) {
×
242
      return true;
×
243
    }
244
    if (o == null || getClass() != o.getClass()) {
×
245
      return false;
×
246
    }
247
    CloseAccountResponse closeAccountResponse = (CloseAccountResponse) o;
×
248
    return Objects.equals(this.accountCode, closeAccountResponse.accountCode) &&
×
249
        Objects.equals(this.invalidFields, closeAccountResponse.invalidFields) &&
×
250
        Objects.equals(this.pspReference, closeAccountResponse.pspReference) &&
×
251
        Objects.equals(this.resultCode, closeAccountResponse.resultCode) &&
×
252
        Objects.equals(this.status, closeAccountResponse.status);
×
253
  }
254

255
  @Override
256
  public int hashCode() {
257
    return Objects.hash(accountCode, invalidFields, pspReference, resultCode, status);
×
258
  }
259

260
  @Override
261
  public String toString() {
262
    StringBuilder sb = new StringBuilder();
×
263
    sb.append("class CloseAccountResponse {\n");
×
264
    sb.append("    accountCode: ").append(toIndentedString(accountCode)).append("\n");
×
265
    sb.append("    invalidFields: ").append(toIndentedString(invalidFields)).append("\n");
×
266
    sb.append("    pspReference: ").append(toIndentedString(pspReference)).append("\n");
×
267
    sb.append("    resultCode: ").append(toIndentedString(resultCode)).append("\n");
×
268
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
×
269
    sb.append("}");
×
270
    return sb.toString();
×
271
  }
272

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

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

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