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

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

16 Oct 2023 09:08AM CUT 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

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

32

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

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

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

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

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

57
  /**
58
   * The new status of the account. &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 CloseAccountResponse() { 
×
100
  }
×
101

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

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

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

119

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

126

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

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

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

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

152

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

159

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

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

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

177

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

184

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

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

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

202

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

209

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

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

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

227

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

234

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

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

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

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

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

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