• 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

65.38
/src/main/java/com/adyen/model/marketpayconfiguration/NotificationEventConfiguration.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.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 com.fasterxml.jackson.annotation.JsonPropertyOrder;
28
import com.fasterxml.jackson.core.JsonProcessingException;
29

30

31
/**
32
 * NotificationEventConfiguration
33
 */
34
@JsonPropertyOrder({
35
  NotificationEventConfiguration.JSON_PROPERTY_EVENT_TYPE,
36
  NotificationEventConfiguration.JSON_PROPERTY_INCLUDE_MODE
37
})
38

39
public class NotificationEventConfiguration {
40
  /**
41
   * The type of event.  Possible values: **ACCOUNT_CLOSED**, **ACCOUNT_CREATED**, **ACCOUNT_FUNDS_BELOW_THRESHOLD**, **ACCOUNT_HOLDER_CREATED**, **ACCOUNT_HOLDER_LIMIT_REACHED**, **ACCOUNT_HOLDER_PAYOUT**, **ACCOUNT_HOLDER_STATUS_CHANGE**, **ACCOUNT_HOLDER_STORE_STATUS_CHANGE**, **ACCOUNT_HOLDER_UPCOMING_DEADLINE**, **ACCOUNT_HOLDER_UPDATED**, **ACCOUNT_HOLDER_VERIFICATION**, **ACCOUNT_UPDATED**, **BENEFICIARY_SETUP**, **COMPENSATE_NEGATIVE_BALANCE**, **DIRECT_DEBIT_INITIATED**, **PAYMENT_FAILURE**, **REFUND_FUNDS_TRANSFER**, **REPORT_AVAILABLE**, **SCHEDULED_REFUNDS**, **TRANSFER_FUNDS**.
42
   */
43
  public enum EventTypeEnum {
1✔
44
    ACCOUNT_CLOSED("ACCOUNT_CLOSED"),
1✔
45
    
46
    ACCOUNT_CREATED("ACCOUNT_CREATED"),
1✔
47
    
48
    ACCOUNT_FUNDS_BELOW_THRESHOLD("ACCOUNT_FUNDS_BELOW_THRESHOLD"),
1✔
49
    
50
    ACCOUNT_HOLDER_CREATED("ACCOUNT_HOLDER_CREATED"),
1✔
51
    
52
    ACCOUNT_HOLDER_LIMIT_REACHED("ACCOUNT_HOLDER_LIMIT_REACHED"),
1✔
53
    
54
    ACCOUNT_HOLDER_MIGRATED("ACCOUNT_HOLDER_MIGRATED"),
1✔
55
    
56
    ACCOUNT_HOLDER_PAYOUT("ACCOUNT_HOLDER_PAYOUT"),
1✔
57
    
58
    ACCOUNT_HOLDER_STATUS_CHANGE("ACCOUNT_HOLDER_STATUS_CHANGE"),
1✔
59
    
60
    ACCOUNT_HOLDER_STORE_STATUS_CHANGE("ACCOUNT_HOLDER_STORE_STATUS_CHANGE"),
1✔
61
    
62
    ACCOUNT_HOLDER_UPCOMING_DEADLINE("ACCOUNT_HOLDER_UPCOMING_DEADLINE"),
1✔
63
    
64
    ACCOUNT_HOLDER_UPDATED("ACCOUNT_HOLDER_UPDATED"),
1✔
65
    
66
    ACCOUNT_HOLDER_VERIFICATION("ACCOUNT_HOLDER_VERIFICATION"),
1✔
67
    
68
    ACCOUNT_UPDATED("ACCOUNT_UPDATED"),
1✔
69
    
70
    BENEFICIARY_SETUP("BENEFICIARY_SETUP"),
1✔
71
    
72
    COMPENSATE_NEGATIVE_BALANCE("COMPENSATE_NEGATIVE_BALANCE"),
1✔
73
    
74
    DIRECT_DEBIT_INITIATED("DIRECT_DEBIT_INITIATED"),
1✔
75
    
76
    FUNDS_MIGRATED("FUNDS_MIGRATED"),
1✔
77
    
78
    PAYMENT_FAILURE("PAYMENT_FAILURE"),
1✔
79
    
80
    PENDING_CREDIT("PENDING_CREDIT"),
1✔
81
    
82
    REFUND_FUNDS_TRANSFER("REFUND_FUNDS_TRANSFER"),
1✔
83
    
84
    REPORT_AVAILABLE("REPORT_AVAILABLE"),
1✔
85
    
86
    SCHEDULED_REFUNDS("SCHEDULED_REFUNDS"),
1✔
87
    
88
    SCORE_SIGNAL_TRIGGERED("SCORE_SIGNAL_TRIGGERED"),
1✔
89
    
90
    TRANSFER_FUNDS("TRANSFER_FUNDS"),
1✔
91
    
92
    TRANSFER_NOT_PAIDOUT_TRANSFERS("TRANSFER_NOT_PAIDOUT_TRANSFERS");
1✔
93

94
    private String value;
95

96
    EventTypeEnum(String value) {
1✔
97
      this.value = value;
1✔
98
    }
1✔
99

100
    @JsonValue
101
    public String getValue() {
102
      return value;
1✔
103
    }
104

105
    @Override
106
    public String toString() {
107
      return String.valueOf(value);
×
108
    }
109

110
    @JsonCreator
111
    public static EventTypeEnum fromValue(String value) {
112
      for (EventTypeEnum b : EventTypeEnum.values()) {
1✔
113
        if (b.value.equals(value)) {
1✔
114
          return b;
1✔
115
        }
116
      }
117
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
118
    }
119
  }
120

121
  public static final String JSON_PROPERTY_EVENT_TYPE = "eventType";
122
  private EventTypeEnum eventType;
123

124
  /**
125
   * Indicates whether the specified `eventType` is sent to your webhook endpoint. Possible values: * **INCLUDE**: Send the specified `eventType`. * **EXCLUDE**: Send all event types except the specified `eventType` and other event types with the `includeMode` set to **EXCLUDE**.
126
   */
127
  public enum IncludeModeEnum {
1✔
128
    EXCLUDE("EXCLUDE"),
1✔
129
    
130
    INCLUDE("INCLUDE");
1✔
131

132
    private String value;
133

134
    IncludeModeEnum(String value) {
1✔
135
      this.value = value;
1✔
136
    }
1✔
137

138
    @JsonValue
139
    public String getValue() {
140
      return value;
1✔
141
    }
142

143
    @Override
144
    public String toString() {
145
      return String.valueOf(value);
×
146
    }
147

148
    @JsonCreator
149
    public static IncludeModeEnum fromValue(String value) {
150
      for (IncludeModeEnum b : IncludeModeEnum.values()) {
1✔
151
        if (b.value.equals(value)) {
1✔
152
          return b;
1✔
153
        }
154
      }
155
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
156
    }
157
  }
158

159
  public static final String JSON_PROPERTY_INCLUDE_MODE = "includeMode";
160
  private IncludeModeEnum includeMode;
161

162
  public NotificationEventConfiguration() { 
1✔
163
  }
1✔
164

165
  public NotificationEventConfiguration eventType(EventTypeEnum eventType) {
166
    this.eventType = eventType;
×
167
    return this;
×
168
  }
169

170
   /**
171
   * The type of event.  Possible values: **ACCOUNT_CLOSED**, **ACCOUNT_CREATED**, **ACCOUNT_FUNDS_BELOW_THRESHOLD**, **ACCOUNT_HOLDER_CREATED**, **ACCOUNT_HOLDER_LIMIT_REACHED**, **ACCOUNT_HOLDER_PAYOUT**, **ACCOUNT_HOLDER_STATUS_CHANGE**, **ACCOUNT_HOLDER_STORE_STATUS_CHANGE**, **ACCOUNT_HOLDER_UPCOMING_DEADLINE**, **ACCOUNT_HOLDER_UPDATED**, **ACCOUNT_HOLDER_VERIFICATION**, **ACCOUNT_UPDATED**, **BENEFICIARY_SETUP**, **COMPENSATE_NEGATIVE_BALANCE**, **DIRECT_DEBIT_INITIATED**, **PAYMENT_FAILURE**, **REFUND_FUNDS_TRANSFER**, **REPORT_AVAILABLE**, **SCHEDULED_REFUNDS**, **TRANSFER_FUNDS**.
172
   * @return eventType
173
  **/
174
  @ApiModelProperty(required = true, value = "The type of event.  Possible values: **ACCOUNT_CLOSED**, **ACCOUNT_CREATED**, **ACCOUNT_FUNDS_BELOW_THRESHOLD**, **ACCOUNT_HOLDER_CREATED**, **ACCOUNT_HOLDER_LIMIT_REACHED**, **ACCOUNT_HOLDER_PAYOUT**, **ACCOUNT_HOLDER_STATUS_CHANGE**, **ACCOUNT_HOLDER_STORE_STATUS_CHANGE**, **ACCOUNT_HOLDER_UPCOMING_DEADLINE**, **ACCOUNT_HOLDER_UPDATED**, **ACCOUNT_HOLDER_VERIFICATION**, **ACCOUNT_UPDATED**, **BENEFICIARY_SETUP**, **COMPENSATE_NEGATIVE_BALANCE**, **DIRECT_DEBIT_INITIATED**, **PAYMENT_FAILURE**, **REFUND_FUNDS_TRANSFER**, **REPORT_AVAILABLE**, **SCHEDULED_REFUNDS**, **TRANSFER_FUNDS**.")
175
  @JsonProperty(JSON_PROPERTY_EVENT_TYPE)
176
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
177

178
  public EventTypeEnum getEventType() {
179
    return eventType;
1✔
180
  }
181

182

183
  @JsonProperty(JSON_PROPERTY_EVENT_TYPE)
184
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
185
  public void setEventType(EventTypeEnum eventType) {
186
    this.eventType = eventType;
1✔
187
  }
1✔
188

189

190
  public NotificationEventConfiguration includeMode(IncludeModeEnum includeMode) {
191
    this.includeMode = includeMode;
×
192
    return this;
×
193
  }
194

195
   /**
196
   * Indicates whether the specified `eventType` is sent to your webhook endpoint. Possible values: * **INCLUDE**: Send the specified `eventType`. * **EXCLUDE**: Send all event types except the specified `eventType` and other event types with the `includeMode` set to **EXCLUDE**.
197
   * @return includeMode
198
  **/
199
  @ApiModelProperty(required = true, value = "Indicates whether the specified `eventType` is sent to your webhook endpoint. Possible values: * **INCLUDE**: Send the specified `eventType`. * **EXCLUDE**: Send all event types except the specified `eventType` and other event types with the `includeMode` set to **EXCLUDE**.")
200
  @JsonProperty(JSON_PROPERTY_INCLUDE_MODE)
201
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
202

203
  public IncludeModeEnum getIncludeMode() {
204
    return includeMode;
1✔
205
  }
206

207

208
  @JsonProperty(JSON_PROPERTY_INCLUDE_MODE)
209
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
210
  public void setIncludeMode(IncludeModeEnum includeMode) {
211
    this.includeMode = includeMode;
1✔
212
  }
1✔
213

214

215
  /**
216
   * Return true if this NotificationEventConfiguration object is equal to o.
217
   */
218
  @Override
219
  public boolean equals(Object o) {
220
    if (this == o) {
×
221
      return true;
×
222
    }
223
    if (o == null || getClass() != o.getClass()) {
×
224
      return false;
×
225
    }
226
    NotificationEventConfiguration notificationEventConfiguration = (NotificationEventConfiguration) o;
×
227
    return Objects.equals(this.eventType, notificationEventConfiguration.eventType) &&
×
228
        Objects.equals(this.includeMode, notificationEventConfiguration.includeMode);
×
229
  }
230

231
  @Override
232
  public int hashCode() {
233
    return Objects.hash(eventType, includeMode);
×
234
  }
235

236
  @Override
237
  public String toString() {
238
    StringBuilder sb = new StringBuilder();
×
239
    sb.append("class NotificationEventConfiguration {\n");
×
240
    sb.append("    eventType: ").append(toIndentedString(eventType)).append("\n");
×
241
    sb.append("    includeMode: ").append(toIndentedString(includeMode)).append("\n");
×
242
    sb.append("}");
×
243
    return sb.toString();
×
244
  }
245

246
  /**
247
   * Convert the given object to string with each line indented by 4 spaces
248
   * (except the first line).
249
   */
250
  private String toIndentedString(Object o) {
251
    if (o == null) {
×
252
      return "null";
×
253
    }
254
    return o.toString().replace("\n", "\n    ");
×
255
  }
256

257
/**
258
   * Create an instance of NotificationEventConfiguration given an JSON string
259
   *
260
   * @param jsonString JSON string
261
   * @return An instance of NotificationEventConfiguration
262
   * @throws JsonProcessingException if the JSON string is invalid with respect to NotificationEventConfiguration
263
   */
264
  public static NotificationEventConfiguration fromJson(String jsonString) throws JsonProcessingException {
265
    return JSON.getMapper().readValue(jsonString, NotificationEventConfiguration.class);
×
266
  }
267
/**
268
  * Convert an instance of NotificationEventConfiguration to an JSON string
269
  *
270
  * @return JSON string
271
  */
272
  public String toJson() throws JsonProcessingException {
273
    return JSON.getMapper().writeValueAsString(this);
×
274
  }
275
}
276

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