• 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/marketpayconfiguration/TestNotificationConfigurationResponse.java
1
/*
2
 * Notification Configuration 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 Notification Configuration API provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed.  For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/notifications). ## 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 Notification Configuration 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/Notification/v6/createNotificationConfiguration ```
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.marketpayconfiguration;
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.marketpayconfiguration.ErrorFieldType;
21
import com.adyen.model.marketpayconfiguration.ExchangeMessage;
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
 * TestNotificationConfigurationResponse
37
 */
38
@JsonPropertyOrder({
39
  TestNotificationConfigurationResponse.JSON_PROPERTY_ERROR_MESSAGES,
40
  TestNotificationConfigurationResponse.JSON_PROPERTY_EVENT_TYPES,
41
  TestNotificationConfigurationResponse.JSON_PROPERTY_EXCHANGE_MESSAGES,
42
  TestNotificationConfigurationResponse.JSON_PROPERTY_INVALID_FIELDS,
43
  TestNotificationConfigurationResponse.JSON_PROPERTY_NOTIFICATION_ID,
44
  TestNotificationConfigurationResponse.JSON_PROPERTY_OK_MESSAGES,
45
  TestNotificationConfigurationResponse.JSON_PROPERTY_PSP_REFERENCE,
46
  TestNotificationConfigurationResponse.JSON_PROPERTY_RESULT_CODE
47
})
48

49
public class TestNotificationConfigurationResponse {
50
  public static final String JSON_PROPERTY_ERROR_MESSAGES = "errorMessages";
51
  private List<String> errorMessages = null;
×
52

53
  /**
54
   * Gets or Sets eventTypes
55
   */
56
  public enum EventTypesEnum {
×
57
    ACCOUNT_CLOSED("ACCOUNT_CLOSED"),
×
58
    
59
    ACCOUNT_CREATED("ACCOUNT_CREATED"),
×
60
    
61
    ACCOUNT_FUNDS_BELOW_THRESHOLD("ACCOUNT_FUNDS_BELOW_THRESHOLD"),
×
62
    
63
    ACCOUNT_HOLDER_CREATED("ACCOUNT_HOLDER_CREATED"),
×
64
    
65
    ACCOUNT_HOLDER_LIMIT_REACHED("ACCOUNT_HOLDER_LIMIT_REACHED"),
×
66
    
67
    ACCOUNT_HOLDER_MIGRATED("ACCOUNT_HOLDER_MIGRATED"),
×
68
    
69
    ACCOUNT_HOLDER_PAYOUT("ACCOUNT_HOLDER_PAYOUT"),
×
70
    
71
    ACCOUNT_HOLDER_STATUS_CHANGE("ACCOUNT_HOLDER_STATUS_CHANGE"),
×
72
    
73
    ACCOUNT_HOLDER_STORE_STATUS_CHANGE("ACCOUNT_HOLDER_STORE_STATUS_CHANGE"),
×
74
    
75
    ACCOUNT_HOLDER_UPCOMING_DEADLINE("ACCOUNT_HOLDER_UPCOMING_DEADLINE"),
×
76
    
77
    ACCOUNT_HOLDER_UPDATED("ACCOUNT_HOLDER_UPDATED"),
×
78
    
79
    ACCOUNT_HOLDER_VERIFICATION("ACCOUNT_HOLDER_VERIFICATION"),
×
80
    
81
    ACCOUNT_UPDATED("ACCOUNT_UPDATED"),
×
82
    
83
    BENEFICIARY_SETUP("BENEFICIARY_SETUP"),
×
84
    
85
    COMPENSATE_NEGATIVE_BALANCE("COMPENSATE_NEGATIVE_BALANCE"),
×
86
    
87
    DIRECT_DEBIT_INITIATED("DIRECT_DEBIT_INITIATED"),
×
88
    
89
    FUNDS_MIGRATED("FUNDS_MIGRATED"),
×
90
    
91
    PAYMENT_FAILURE("PAYMENT_FAILURE"),
×
92
    
93
    PENDING_CREDIT("PENDING_CREDIT"),
×
94
    
95
    REFUND_FUNDS_TRANSFER("REFUND_FUNDS_TRANSFER"),
×
96
    
97
    REPORT_AVAILABLE("REPORT_AVAILABLE"),
×
98
    
99
    SCHEDULED_REFUNDS("SCHEDULED_REFUNDS"),
×
100
    
101
    SCORE_SIGNAL_TRIGGERED("SCORE_SIGNAL_TRIGGERED"),
×
102
    
103
    TRANSFER_FUNDS("TRANSFER_FUNDS"),
×
104
    
105
    TRANSFER_NOT_PAIDOUT_TRANSFERS("TRANSFER_NOT_PAIDOUT_TRANSFERS");
×
106

107
    private String value;
108

109
    EventTypesEnum(String value) {
×
110
      this.value = value;
×
111
    }
×
112

113
    @JsonValue
114
    public String getValue() {
115
      return value;
×
116
    }
117

118
    @Override
119
    public String toString() {
120
      return String.valueOf(value);
×
121
    }
122

123
    @JsonCreator
124
    public static EventTypesEnum fromValue(String value) {
125
      for (EventTypesEnum b : EventTypesEnum.values()) {
×
126
        if (b.value.equals(value)) {
×
127
          return b;
×
128
        }
129
      }
130
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
131
    }
132
  }
133

134
  public static final String JSON_PROPERTY_EVENT_TYPES = "eventTypes";
135
  private List<EventTypesEnum> eventTypes = null;
×
136

137
  public static final String JSON_PROPERTY_EXCHANGE_MESSAGES = "exchangeMessages";
138
  private List<ExchangeMessage> exchangeMessages = null;
×
139

140
  public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields";
141
  private List<ErrorFieldType> invalidFields = null;
×
142

143
  public static final String JSON_PROPERTY_NOTIFICATION_ID = "notificationId";
144
  private Long notificationId;
145

146
  public static final String JSON_PROPERTY_OK_MESSAGES = "okMessages";
147
  private List<String> okMessages = null;
×
148

149
  public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference";
150
  private String pspReference;
151

152
  public static final String JSON_PROPERTY_RESULT_CODE = "resultCode";
153
  private String resultCode;
154

155
  public TestNotificationConfigurationResponse() { 
×
156
  }
×
157

158
  public TestNotificationConfigurationResponse errorMessages(List<String> errorMessages) {
159
    this.errorMessages = errorMessages;
×
160
    return this;
×
161
  }
162

163
  public TestNotificationConfigurationResponse addErrorMessagesItem(String errorMessagesItem) {
164
    if (this.errorMessages == null) {
×
165
      this.errorMessages = new ArrayList<>();
×
166
    }
167
    this.errorMessages.add(errorMessagesItem);
×
168
    return this;
×
169
  }
170

171
   /**
172
   * Any error messages encountered.
173
   * @return errorMessages
174
  **/
175
  @ApiModelProperty(value = "Any error messages encountered.")
176
  @JsonProperty(JSON_PROPERTY_ERROR_MESSAGES)
177
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
178

179
  public List<String> getErrorMessages() {
180
    return errorMessages;
×
181
  }
182

183

184
  @JsonProperty(JSON_PROPERTY_ERROR_MESSAGES)
185
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
186
  public void setErrorMessages(List<String> errorMessages) {
187
    this.errorMessages = errorMessages;
×
188
  }
×
189

190

191
  public TestNotificationConfigurationResponse eventTypes(List<EventTypesEnum> eventTypes) {
192
    this.eventTypes = eventTypes;
×
193
    return this;
×
194
  }
195

196
  public TestNotificationConfigurationResponse addEventTypesItem(EventTypesEnum eventTypesItem) {
197
    if (this.eventTypes == null) {
×
198
      this.eventTypes = new ArrayList<>();
×
199
    }
200
    this.eventTypes.add(eventTypesItem);
×
201
    return this;
×
202
  }
203

204
   /**
205
   * The event types that were tested. &gt;Permitted values: &#x60;ACCOUNT_HOLDER_CREATED&#x60;, &#x60;ACCOUNT_CREATED&#x60;, &#x60;ACCOUNT_UPDATED&#x60;, &#x60;ACCOUNT_HOLDER_UPDATED&#x60;, &#x60;ACCOUNT_HOLDER_STATUS_CHANGE&#x60;, &#x60;ACCOUNT_HOLDER_STORE_STATUS_CHANGE&#x60; &#x60;ACCOUNT_HOLDER_VERIFICATION&#x60;, &#x60;ACCOUNT_HOLDER_LIMIT_REACHED&#x60;, &#x60;ACCOUNT_HOLDER_PAYOUT&#x60;, &#x60;PAYMENT_FAILURE&#x60;, &#x60;SCHEDULED_REFUNDS&#x60;, &#x60;REPORT_AVAILABLE&#x60;, &#x60;TRANSFER_FUNDS&#x60;, &#x60;BENEFICIARY_SETUP&#x60;, &#x60;COMPENSATE_NEGATIVE_BALANCE&#x60;.
206
   * @return eventTypes
207
  **/
208
  @ApiModelProperty(value = "The event types that were tested. >Permitted values: `ACCOUNT_HOLDER_CREATED`, `ACCOUNT_CREATED`, `ACCOUNT_UPDATED`, `ACCOUNT_HOLDER_UPDATED`, `ACCOUNT_HOLDER_STATUS_CHANGE`, `ACCOUNT_HOLDER_STORE_STATUS_CHANGE` `ACCOUNT_HOLDER_VERIFICATION`, `ACCOUNT_HOLDER_LIMIT_REACHED`, `ACCOUNT_HOLDER_PAYOUT`, `PAYMENT_FAILURE`, `SCHEDULED_REFUNDS`, `REPORT_AVAILABLE`, `TRANSFER_FUNDS`, `BENEFICIARY_SETUP`, `COMPENSATE_NEGATIVE_BALANCE`.")
209
  @JsonProperty(JSON_PROPERTY_EVENT_TYPES)
210
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
211

212
  public List<EventTypesEnum> getEventTypes() {
213
    return eventTypes;
×
214
  }
215

216

217
  @JsonProperty(JSON_PROPERTY_EVENT_TYPES)
218
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
219
  public void setEventTypes(List<EventTypesEnum> eventTypes) {
220
    this.eventTypes = eventTypes;
×
221
  }
×
222

223

224
  public TestNotificationConfigurationResponse exchangeMessages(List<ExchangeMessage> exchangeMessages) {
225
    this.exchangeMessages = exchangeMessages;
×
226
    return this;
×
227
  }
228

229
  public TestNotificationConfigurationResponse addExchangeMessagesItem(ExchangeMessage exchangeMessagesItem) {
230
    if (this.exchangeMessages == null) {
×
231
      this.exchangeMessages = new ArrayList<>();
×
232
    }
233
    this.exchangeMessages.add(exchangeMessagesItem);
×
234
    return this;
×
235
  }
236

237
   /**
238
   * The notification message and related response messages.
239
   * @return exchangeMessages
240
  **/
241
  @ApiModelProperty(value = "The notification message and related response messages.")
242
  @JsonProperty(JSON_PROPERTY_EXCHANGE_MESSAGES)
243
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
244

245
  public List<ExchangeMessage> getExchangeMessages() {
246
    return exchangeMessages;
×
247
  }
248

249

250
  @JsonProperty(JSON_PROPERTY_EXCHANGE_MESSAGES)
251
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
252
  public void setExchangeMessages(List<ExchangeMessage> exchangeMessages) {
253
    this.exchangeMessages = exchangeMessages;
×
254
  }
×
255

256

257
  public TestNotificationConfigurationResponse invalidFields(List<ErrorFieldType> invalidFields) {
258
    this.invalidFields = invalidFields;
×
259
    return this;
×
260
  }
261

262
  public TestNotificationConfigurationResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) {
263
    if (this.invalidFields == null) {
×
264
      this.invalidFields = new ArrayList<>();
×
265
    }
266
    this.invalidFields.add(invalidFieldsItem);
×
267
    return this;
×
268
  }
269

270
   /**
271
   * Contains field validation errors that would prevent requests from being processed.
272
   * @return invalidFields
273
  **/
274
  @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.")
275
  @JsonProperty(JSON_PROPERTY_INVALID_FIELDS)
276
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
277

278
  public List<ErrorFieldType> getInvalidFields() {
279
    return invalidFields;
×
280
  }
281

282

283
  @JsonProperty(JSON_PROPERTY_INVALID_FIELDS)
284
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
285
  public void setInvalidFields(List<ErrorFieldType> invalidFields) {
286
    this.invalidFields = invalidFields;
×
287
  }
×
288

289

290
  public TestNotificationConfigurationResponse notificationId(Long notificationId) {
291
    this.notificationId = notificationId;
×
292
    return this;
×
293
  }
294

295
   /**
296
   * The ID of the notification subscription configuration.
297
   * @return notificationId
298
  **/
299
  @ApiModelProperty(required = true, value = "The ID of the notification subscription configuration.")
300
  @JsonProperty(JSON_PROPERTY_NOTIFICATION_ID)
301
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
302

303
  public Long getNotificationId() {
304
    return notificationId;
×
305
  }
306

307

308
  @JsonProperty(JSON_PROPERTY_NOTIFICATION_ID)
309
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
310
  public void setNotificationId(Long notificationId) {
311
    this.notificationId = notificationId;
×
312
  }
×
313

314

315
  public TestNotificationConfigurationResponse okMessages(List<String> okMessages) {
316
    this.okMessages = okMessages;
×
317
    return this;
×
318
  }
319

320
  public TestNotificationConfigurationResponse addOkMessagesItem(String okMessagesItem) {
321
    if (this.okMessages == null) {
×
322
      this.okMessages = new ArrayList<>();
×
323
    }
324
    this.okMessages.add(okMessagesItem);
×
325
    return this;
×
326
  }
327

328
   /**
329
   * A list of messages describing the testing steps.
330
   * @return okMessages
331
  **/
332
  @ApiModelProperty(value = "A list of messages describing the testing steps.")
333
  @JsonProperty(JSON_PROPERTY_OK_MESSAGES)
334
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
335

336
  public List<String> getOkMessages() {
337
    return okMessages;
×
338
  }
339

340

341
  @JsonProperty(JSON_PROPERTY_OK_MESSAGES)
342
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
343
  public void setOkMessages(List<String> okMessages) {
344
    this.okMessages = okMessages;
×
345
  }
×
346

347

348
  public TestNotificationConfigurationResponse pspReference(String pspReference) {
349
    this.pspReference = pspReference;
×
350
    return this;
×
351
  }
352

353
   /**
354
   * The reference of a request. Can be used to uniquely identify the request.
355
   * @return pspReference
356
  **/
357
  @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.")
358
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
359
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
360

361
  public String getPspReference() {
362
    return pspReference;
×
363
  }
364

365

366
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
367
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
368
  public void setPspReference(String pspReference) {
369
    this.pspReference = pspReference;
×
370
  }
×
371

372

373
  public TestNotificationConfigurationResponse resultCode(String resultCode) {
374
    this.resultCode = resultCode;
×
375
    return this;
×
376
  }
377

378
   /**
379
   * The result code.
380
   * @return resultCode
381
  **/
382
  @ApiModelProperty(value = "The result code.")
383
  @JsonProperty(JSON_PROPERTY_RESULT_CODE)
384
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
385

386
  public String getResultCode() {
387
    return resultCode;
×
388
  }
389

390

391
  @JsonProperty(JSON_PROPERTY_RESULT_CODE)
392
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
393
  public void setResultCode(String resultCode) {
394
    this.resultCode = resultCode;
×
395
  }
×
396

397

398
  /**
399
   * Return true if this TestNotificationConfigurationResponse object is equal to o.
400
   */
401
  @Override
402
  public boolean equals(Object o) {
403
    if (this == o) {
×
404
      return true;
×
405
    }
406
    if (o == null || getClass() != o.getClass()) {
×
407
      return false;
×
408
    }
409
    TestNotificationConfigurationResponse testNotificationConfigurationResponse = (TestNotificationConfigurationResponse) o;
×
410
    return Objects.equals(this.errorMessages, testNotificationConfigurationResponse.errorMessages) &&
×
411
        Objects.equals(this.eventTypes, testNotificationConfigurationResponse.eventTypes) &&
×
412
        Objects.equals(this.exchangeMessages, testNotificationConfigurationResponse.exchangeMessages) &&
×
413
        Objects.equals(this.invalidFields, testNotificationConfigurationResponse.invalidFields) &&
×
414
        Objects.equals(this.notificationId, testNotificationConfigurationResponse.notificationId) &&
×
415
        Objects.equals(this.okMessages, testNotificationConfigurationResponse.okMessages) &&
×
416
        Objects.equals(this.pspReference, testNotificationConfigurationResponse.pspReference) &&
×
417
        Objects.equals(this.resultCode, testNotificationConfigurationResponse.resultCode);
×
418
  }
419

420
  @Override
421
  public int hashCode() {
422
    return Objects.hash(errorMessages, eventTypes, exchangeMessages, invalidFields, notificationId, okMessages, pspReference, resultCode);
×
423
  }
424

425
  @Override
426
  public String toString() {
427
    StringBuilder sb = new StringBuilder();
×
428
    sb.append("class TestNotificationConfigurationResponse {\n");
×
429
    sb.append("    errorMessages: ").append(toIndentedString(errorMessages)).append("\n");
×
430
    sb.append("    eventTypes: ").append(toIndentedString(eventTypes)).append("\n");
×
431
    sb.append("    exchangeMessages: ").append(toIndentedString(exchangeMessages)).append("\n");
×
432
    sb.append("    invalidFields: ").append(toIndentedString(invalidFields)).append("\n");
×
433
    sb.append("    notificationId: ").append(toIndentedString(notificationId)).append("\n");
×
434
    sb.append("    okMessages: ").append(toIndentedString(okMessages)).append("\n");
×
435
    sb.append("    pspReference: ").append(toIndentedString(pspReference)).append("\n");
×
436
    sb.append("    resultCode: ").append(toIndentedString(resultCode)).append("\n");
×
437
    sb.append("}");
×
438
    return sb.toString();
×
439
  }
440

441
  /**
442
   * Convert the given object to string with each line indented by 4 spaces
443
   * (except the first line).
444
   */
445
  private String toIndentedString(Object o) {
446
    if (o == null) {
×
447
      return "null";
×
448
    }
449
    return o.toString().replace("\n", "\n    ");
×
450
  }
451

452
/**
453
   * Create an instance of TestNotificationConfigurationResponse given an JSON string
454
   *
455
   * @param jsonString JSON string
456
   * @return An instance of TestNotificationConfigurationResponse
457
   * @throws JsonProcessingException if the JSON string is invalid with respect to TestNotificationConfigurationResponse
458
   */
459
  public static TestNotificationConfigurationResponse fromJson(String jsonString) throws JsonProcessingException {
460
    return JSON.getMapper().readValue(jsonString, TestNotificationConfigurationResponse.class);
×
461
  }
462
/**
463
  * Convert an instance of TestNotificationConfigurationResponse to an JSON string
464
  *
465
  * @return JSON string
466
  */
467
  public String toJson() throws JsonProcessingException {
468
    return JSON.getMapper().writeValueAsString(this);
×
469
  }
470
}
471

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