• 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

37.5
/src/main/java/com/adyen/model/marketpayconfiguration/NotificationConfigurationDetails.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.NotificationEventConfiguration;
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
 * NotificationConfigurationDetails
36
 */
37
@JsonPropertyOrder({
38
  NotificationConfigurationDetails.JSON_PROPERTY_ACTIVE,
39
  NotificationConfigurationDetails.JSON_PROPERTY_API_VERSION,
40
  NotificationConfigurationDetails.JSON_PROPERTY_DESCRIPTION,
41
  NotificationConfigurationDetails.JSON_PROPERTY_EVENT_CONFIGS,
42
  NotificationConfigurationDetails.JSON_PROPERTY_HMAC_SIGNATURE_KEY,
43
  NotificationConfigurationDetails.JSON_PROPERTY_NOTIFICATION_ID,
44
  NotificationConfigurationDetails.JSON_PROPERTY_NOTIFY_PASSWORD,
45
  NotificationConfigurationDetails.JSON_PROPERTY_NOTIFY_U_R_L,
46
  NotificationConfigurationDetails.JSON_PROPERTY_NOTIFY_USERNAME,
47
  NotificationConfigurationDetails.JSON_PROPERTY_SSL_PROTOCOL
48
})
49

50
public class NotificationConfigurationDetails {
51
  public static final String JSON_PROPERTY_ACTIVE = "active";
52
  private Boolean active;
53

54
  public static final String JSON_PROPERTY_API_VERSION = "apiVersion";
55
  private Integer apiVersion;
56

57
  public static final String JSON_PROPERTY_DESCRIPTION = "description";
58
  private String description;
59

60
  public static final String JSON_PROPERTY_EVENT_CONFIGS = "eventConfigs";
61
  private List<NotificationEventConfiguration> eventConfigs = null;
1✔
62

63
  public static final String JSON_PROPERTY_HMAC_SIGNATURE_KEY = "hmacSignatureKey";
64
  private String hmacSignatureKey;
65

66
  public static final String JSON_PROPERTY_NOTIFICATION_ID = "notificationId";
67
  private Long notificationId;
68

69
  public static final String JSON_PROPERTY_NOTIFY_PASSWORD = "notifyPassword";
70
  private String notifyPassword;
71

72
  public static final String JSON_PROPERTY_NOTIFY_U_R_L = "notifyURL";
73
  private String notifyURL;
74

75
  public static final String JSON_PROPERTY_NOTIFY_USERNAME = "notifyUsername";
76
  private String notifyUsername;
77

78
  /**
79
   * The SSL protocol employed by the endpoint. &gt;Permitted values: &#x60;TLSv12&#x60;, &#x60;TLSv13&#x60;.
80
   */
81
  public enum SslProtocolEnum {
1✔
82
    TLSV12("TLSv12"),
1✔
83
    
84
    TLSV13("TLSv13");
1✔
85

86
    private String value;
87

88
    SslProtocolEnum(String value) {
1✔
89
      this.value = value;
1✔
90
    }
1✔
91

92
    @JsonValue
93
    public String getValue() {
94
      return value;
1✔
95
    }
96

97
    @Override
98
    public String toString() {
99
      return String.valueOf(value);
×
100
    }
101

102
    @JsonCreator
103
    public static SslProtocolEnum fromValue(String value) {
104
      for (SslProtocolEnum b : SslProtocolEnum.values()) {
1✔
105
        if (b.value.equals(value)) {
1✔
106
          return b;
1✔
107
        }
108
      }
109
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
110
    }
111
  }
112

113
  public static final String JSON_PROPERTY_SSL_PROTOCOL = "sslProtocol";
114
  private SslProtocolEnum sslProtocol;
115

116
  public NotificationConfigurationDetails() { 
1✔
117
  }
1✔
118

119
  public NotificationConfigurationDetails active(Boolean active) {
120
    this.active = active;
×
121
    return this;
×
122
  }
123

124
   /**
125
   * Indicates whether the notification subscription is active.
126
   * @return active
127
  **/
128
  @ApiModelProperty(value = "Indicates whether the notification subscription is active.")
129
  @JsonProperty(JSON_PROPERTY_ACTIVE)
130
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
131

132
  public Boolean getActive() {
133
    return active;
1✔
134
  }
135

136

137
  @JsonProperty(JSON_PROPERTY_ACTIVE)
138
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
139
  public void setActive(Boolean active) {
140
    this.active = active;
1✔
141
  }
1✔
142

143

144
  public NotificationConfigurationDetails apiVersion(Integer apiVersion) {
145
    this.apiVersion = apiVersion;
×
146
    return this;
×
147
  }
148

149
   /**
150
   * The version of the notification to which you are subscribing. To make sure that your integration can properly process the notification, subscribe to the same version as the API that you&#39;re using.
151
   * @return apiVersion
152
  **/
153
  @ApiModelProperty(value = "The version of the notification to which you are subscribing. To make sure that your integration can properly process the notification, subscribe to the same version as the API that you're using.")
154
  @JsonProperty(JSON_PROPERTY_API_VERSION)
155
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
156

157
  public Integer getApiVersion() {
158
    return apiVersion;
1✔
159
  }
160

161

162
  @JsonProperty(JSON_PROPERTY_API_VERSION)
163
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
164
  public void setApiVersion(Integer apiVersion) {
165
    this.apiVersion = apiVersion;
×
166
  }
×
167

168

169
  public NotificationConfigurationDetails description(String description) {
170
    this.description = description;
×
171
    return this;
×
172
  }
173

174
   /**
175
   * A description of the notification subscription configuration.
176
   * @return description
177
  **/
178
  @ApiModelProperty(value = "A description of the notification subscription configuration.")
179
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
180
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
181

182
  public String getDescription() {
183
    return description;
1✔
184
  }
185

186

187
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
188
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
189
  public void setDescription(String description) {
190
    this.description = description;
1✔
191
  }
1✔
192

193

194
  public NotificationConfigurationDetails eventConfigs(List<NotificationEventConfiguration> eventConfigs) {
195
    this.eventConfigs = eventConfigs;
×
196
    return this;
×
197
  }
198

199
  public NotificationConfigurationDetails addEventConfigsItem(NotificationEventConfiguration eventConfigsItem) {
200
    if (this.eventConfigs == null) {
×
201
      this.eventConfigs = new ArrayList<>();
×
202
    }
203
    this.eventConfigs.add(eventConfigsItem);
×
204
    return this;
×
205
  }
206

207
   /**
208
   * Contains objects that define event types and their subscription settings.
209
   * @return eventConfigs
210
  **/
211
  @ApiModelProperty(value = "Contains objects that define event types and their subscription settings.")
212
  @JsonProperty(JSON_PROPERTY_EVENT_CONFIGS)
213
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
214

215
  public List<NotificationEventConfiguration> getEventConfigs() {
216
    return eventConfigs;
1✔
217
  }
218

219

220
  @JsonProperty(JSON_PROPERTY_EVENT_CONFIGS)
221
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
222
  public void setEventConfigs(List<NotificationEventConfiguration> eventConfigs) {
223
    this.eventConfigs = eventConfigs;
1✔
224
  }
1✔
225

226

227
  public NotificationConfigurationDetails hmacSignatureKey(String hmacSignatureKey) {
228
    this.hmacSignatureKey = hmacSignatureKey;
×
229
    return this;
×
230
  }
231

232
   /**
233
   * A string with which to salt the notification(s) before hashing. If this field is provided, a hash value will be included under the notification header &#x60;HmacSignature&#x60; and the hash protocol will be included under the notification header &#x60;Protocol&#x60;. A notification body along with its &#x60;hmacSignatureKey&#x60; and &#x60;Protocol&#x60; can be used to calculate a hash value; matching this hash value with the &#x60;HmacSignature&#x60; will ensure that the notification body has not been tampered with or corrupted.  &gt;Must be a 32-byte hex-encoded string (i.e. a string containing 64 hexadecimal characters; e.g. \&quot;b0ea55c2fe60d4d1d605e9c385e0e7f7e6cafbb939ce07010f31a327a0871f27\&quot;).  The omission of this field will preclude the provision of the &#x60;HmacSignature&#x60; and &#x60;Protocol&#x60; headers in notification(s).
234
   * @return hmacSignatureKey
235
  **/
236
  @ApiModelProperty(value = "A string with which to salt the notification(s) before hashing. If this field is provided, a hash value will be included under the notification header `HmacSignature` and the hash protocol will be included under the notification header `Protocol`. A notification body along with its `hmacSignatureKey` and `Protocol` can be used to calculate a hash value; matching this hash value with the `HmacSignature` will ensure that the notification body has not been tampered with or corrupted.  >Must be a 32-byte hex-encoded string (i.e. a string containing 64 hexadecimal characters; e.g. \"b0ea55c2fe60d4d1d605e9c385e0e7f7e6cafbb939ce07010f31a327a0871f27\").  The omission of this field will preclude the provision of the `HmacSignature` and `Protocol` headers in notification(s).")
237
  @JsonProperty(JSON_PROPERTY_HMAC_SIGNATURE_KEY)
238
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
239

240
  public String getHmacSignatureKey() {
241
    return hmacSignatureKey;
1✔
242
  }
243

244

245
  @JsonProperty(JSON_PROPERTY_HMAC_SIGNATURE_KEY)
246
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
247
  public void setHmacSignatureKey(String hmacSignatureKey) {
248
    this.hmacSignatureKey = hmacSignatureKey;
×
249
  }
×
250

251

252
  public NotificationConfigurationDetails notificationId(Long notificationId) {
253
    this.notificationId = notificationId;
×
254
    return this;
×
255
  }
256

257
   /**
258
   * Adyen-generated ID for the entry, returned in the response when you create a notification configuration. Required when updating an existing configuration using [&#x60;/updateNotificationConfiguration&#x60;](https://docs.adyen.com/api-explorer/#/NotificationConfigurationService/latest/post/updateNotificationConfiguration).
259
   * @return notificationId
260
  **/
261
  @ApiModelProperty(value = "Adyen-generated ID for the entry, returned in the response when you create a notification configuration. Required when updating an existing configuration using [`/updateNotificationConfiguration`](https://docs.adyen.com/api-explorer/#/NotificationConfigurationService/latest/post/updateNotificationConfiguration).")
262
  @JsonProperty(JSON_PROPERTY_NOTIFICATION_ID)
263
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
264

265
  public Long getNotificationId() {
266
    return notificationId;
1✔
267
  }
268

269

270
  @JsonProperty(JSON_PROPERTY_NOTIFICATION_ID)
271
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
272
  public void setNotificationId(Long notificationId) {
273
    this.notificationId = notificationId;
1✔
274
  }
1✔
275

276

277
  public NotificationConfigurationDetails notifyPassword(String notifyPassword) {
278
    this.notifyPassword = notifyPassword;
×
279
    return this;
×
280
  }
281

282
   /**
283
   * The password to use when accessing the notifyURL with the specified username.
284
   * @return notifyPassword
285
  **/
286
  @ApiModelProperty(value = "The password to use when accessing the notifyURL with the specified username.")
287
  @JsonProperty(JSON_PROPERTY_NOTIFY_PASSWORD)
288
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
289

290
  public String getNotifyPassword() {
291
    return notifyPassword;
1✔
292
  }
293

294

295
  @JsonProperty(JSON_PROPERTY_NOTIFY_PASSWORD)
296
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
297
  public void setNotifyPassword(String notifyPassword) {
298
    this.notifyPassword = notifyPassword;
1✔
299
  }
1✔
300

301

302
  public NotificationConfigurationDetails notifyURL(String notifyURL) {
303
    this.notifyURL = notifyURL;
×
304
    return this;
×
305
  }
306

307
   /**
308
   * The URL to which the notifications are to be sent.
309
   * @return notifyURL
310
  **/
311
  @ApiModelProperty(value = "The URL to which the notifications are to be sent.")
312
  @JsonProperty(JSON_PROPERTY_NOTIFY_U_R_L)
313
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
314

315
  public String getNotifyURL() {
316
    return notifyURL;
1✔
317
  }
318

319

320
  @JsonProperty(JSON_PROPERTY_NOTIFY_U_R_L)
321
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
322
  public void setNotifyURL(String notifyURL) {
323
    this.notifyURL = notifyURL;
1✔
324
  }
1✔
325

326

327
  public NotificationConfigurationDetails notifyUsername(String notifyUsername) {
328
    this.notifyUsername = notifyUsername;
×
329
    return this;
×
330
  }
331

332
   /**
333
   * The username to use when accessing the notifyURL.
334
   * @return notifyUsername
335
  **/
336
  @ApiModelProperty(value = "The username to use when accessing the notifyURL.")
337
  @JsonProperty(JSON_PROPERTY_NOTIFY_USERNAME)
338
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
339

340
  public String getNotifyUsername() {
341
    return notifyUsername;
1✔
342
  }
343

344

345
  @JsonProperty(JSON_PROPERTY_NOTIFY_USERNAME)
346
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
347
  public void setNotifyUsername(String notifyUsername) {
348
    this.notifyUsername = notifyUsername;
1✔
349
  }
1✔
350

351

352
  public NotificationConfigurationDetails sslProtocol(SslProtocolEnum sslProtocol) {
353
    this.sslProtocol = sslProtocol;
×
354
    return this;
×
355
  }
356

357
   /**
358
   * The SSL protocol employed by the endpoint. &gt;Permitted values: &#x60;TLSv12&#x60;, &#x60;TLSv13&#x60;.
359
   * @return sslProtocol
360
  **/
361
  @ApiModelProperty(value = "The SSL protocol employed by the endpoint. >Permitted values: `TLSv12`, `TLSv13`.")
362
  @JsonProperty(JSON_PROPERTY_SSL_PROTOCOL)
363
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
364

365
  public SslProtocolEnum getSslProtocol() {
366
    return sslProtocol;
1✔
367
  }
368

369

370
  @JsonProperty(JSON_PROPERTY_SSL_PROTOCOL)
371
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
372
  public void setSslProtocol(SslProtocolEnum sslProtocol) {
373
    this.sslProtocol = sslProtocol;
1✔
374
  }
1✔
375

376

377
  /**
378
   * Return true if this NotificationConfigurationDetails object is equal to o.
379
   */
380
  @Override
381
  public boolean equals(Object o) {
382
    if (this == o) {
×
383
      return true;
×
384
    }
385
    if (o == null || getClass() != o.getClass()) {
×
386
      return false;
×
387
    }
388
    NotificationConfigurationDetails notificationConfigurationDetails = (NotificationConfigurationDetails) o;
×
389
    return Objects.equals(this.active, notificationConfigurationDetails.active) &&
×
390
        Objects.equals(this.apiVersion, notificationConfigurationDetails.apiVersion) &&
×
391
        Objects.equals(this.description, notificationConfigurationDetails.description) &&
×
392
        Objects.equals(this.eventConfigs, notificationConfigurationDetails.eventConfigs) &&
×
393
        Objects.equals(this.hmacSignatureKey, notificationConfigurationDetails.hmacSignatureKey) &&
×
394
        Objects.equals(this.notificationId, notificationConfigurationDetails.notificationId) &&
×
395
        Objects.equals(this.notifyPassword, notificationConfigurationDetails.notifyPassword) &&
×
396
        Objects.equals(this.notifyURL, notificationConfigurationDetails.notifyURL) &&
×
397
        Objects.equals(this.notifyUsername, notificationConfigurationDetails.notifyUsername) &&
×
398
        Objects.equals(this.sslProtocol, notificationConfigurationDetails.sslProtocol);
×
399
  }
400

401
  @Override
402
  public int hashCode() {
403
    return Objects.hash(active, apiVersion, description, eventConfigs, hmacSignatureKey, notificationId, notifyPassword, notifyURL, notifyUsername, sslProtocol);
×
404
  }
405

406
  @Override
407
  public String toString() {
408
    StringBuilder sb = new StringBuilder();
×
409
    sb.append("class NotificationConfigurationDetails {\n");
×
410
    sb.append("    active: ").append(toIndentedString(active)).append("\n");
×
411
    sb.append("    apiVersion: ").append(toIndentedString(apiVersion)).append("\n");
×
412
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
413
    sb.append("    eventConfigs: ").append(toIndentedString(eventConfigs)).append("\n");
×
414
    sb.append("    hmacSignatureKey: ").append(toIndentedString(hmacSignatureKey)).append("\n");
×
415
    sb.append("    notificationId: ").append(toIndentedString(notificationId)).append("\n");
×
416
    sb.append("    notifyPassword: ").append(toIndentedString(notifyPassword)).append("\n");
×
417
    sb.append("    notifyURL: ").append(toIndentedString(notifyURL)).append("\n");
×
418
    sb.append("    notifyUsername: ").append(toIndentedString(notifyUsername)).append("\n");
×
419
    sb.append("    sslProtocol: ").append(toIndentedString(sslProtocol)).append("\n");
×
420
    sb.append("}");
×
421
    return sb.toString();
×
422
  }
423

424
  /**
425
   * Convert the given object to string with each line indented by 4 spaces
426
   * (except the first line).
427
   */
428
  private String toIndentedString(Object o) {
429
    if (o == null) {
×
430
      return "null";
×
431
    }
432
    return o.toString().replace("\n", "\n    ");
×
433
  }
434

435
/**
436
   * Create an instance of NotificationConfigurationDetails given an JSON string
437
   *
438
   * @param jsonString JSON string
439
   * @return An instance of NotificationConfigurationDetails
440
   * @throws JsonProcessingException if the JSON string is invalid with respect to NotificationConfigurationDetails
441
   */
442
  public static NotificationConfigurationDetails fromJson(String jsonString) throws JsonProcessingException {
443
    return JSON.getMapper().readValue(jsonString, NotificationConfigurationDetails.class);
×
444
  }
445
/**
446
  * Convert an instance of NotificationConfigurationDetails to an JSON string
447
  *
448
  * @return JSON string
449
  */
450
  public String toJson() throws JsonProcessingException {
451
    return JSON.getMapper().writeValueAsString(this);
×
452
  }
453
}
454

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