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

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

02 Oct 2023 02:08PM UTC coverage: 12.623%. First build
#2676

push

web-flow
Merge 8c2a459f7 into 9e36e9c01

9362 of 9362 new or added lines in 164 files covered. (100.0%)

11051 of 87544 relevant lines covered (12.62%)

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/checkout/ThreeDSRequestData.java
1
/*
2
 * Adyen Checkout API
3
 *
4
 * The version of the OpenAPI document: 70
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.checkout;
14

15
import java.util.Objects;
16
import java.util.Arrays;
17
import java.util.Map;
18
import java.util.HashMap;
19
import com.fasterxml.jackson.annotation.JsonInclude;
20
import com.fasterxml.jackson.annotation.JsonProperty;
21
import com.fasterxml.jackson.annotation.JsonCreator;
22
import com.fasterxml.jackson.annotation.JsonTypeName;
23
import com.fasterxml.jackson.annotation.JsonValue;
24
import io.swagger.annotations.ApiModel;
25
import io.swagger.annotations.ApiModelProperty;
26
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
27
import com.fasterxml.jackson.core.JsonProcessingException;
28

29

30
/**
31
 * ThreeDSRequestData
32
 */
33
@JsonPropertyOrder({
34
  ThreeDSRequestData.JSON_PROPERTY_CHALLENGE_WINDOW_SIZE,
35
  ThreeDSRequestData.JSON_PROPERTY_DATA_ONLY,
36
  ThreeDSRequestData.JSON_PROPERTY_NATIVE_THREE_D_S,
37
  ThreeDSRequestData.JSON_PROPERTY_THREE_D_S_VERSION
38
})
39

40
public class ThreeDSRequestData {
41
  /**
42
   * Dimensions of the 3DS2 challenge window to be displayed to the cardholder.  Possible values:  * **01** - size of 250x400  * **02** - size of 390x400 * **03** - size of 500x600 * **04** - size of 600x400 * **05** - Fullscreen
43
   */
44
  public enum ChallengeWindowSizeEnum {
×
45
    _01("01"),
×
46
    
47
    _02("02"),
×
48
    
49
    _03("03"),
×
50
    
51
    _04("04"),
×
52
    
53
    _05("05");
×
54

55
    private String value;
56

57
    ChallengeWindowSizeEnum(String value) {
×
58
      this.value = value;
×
59
    }
×
60

61
    @JsonValue
62
    public String getValue() {
63
      return value;
×
64
    }
65

66
    @Override
67
    public String toString() {
68
      return String.valueOf(value);
×
69
    }
70

71
    @JsonCreator
72
    public static ChallengeWindowSizeEnum fromValue(String value) {
73
      for (ChallengeWindowSizeEnum b : ChallengeWindowSizeEnum.values()) {
×
74
        if (b.value.equals(value)) {
×
75
          return b;
×
76
        }
77
      }
78
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
79
    }
80
  }
81

82
  public static final String JSON_PROPERTY_CHALLENGE_WINDOW_SIZE = "challengeWindowSize";
83
  private ChallengeWindowSizeEnum challengeWindowSize;
84

85
  /**
86
   * Flag for data only flow.
87
   */
88
  public enum DataOnlyEnum {
×
89
    FALSE("false"),
×
90
    
91
    TRUE("true");
×
92

93
    private String value;
94

95
    DataOnlyEnum(String value) {
×
96
      this.value = value;
×
97
    }
×
98

99
    @JsonValue
100
    public String getValue() {
101
      return value;
×
102
    }
103

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

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

120
  public static final String JSON_PROPERTY_DATA_ONLY = "dataOnly";
121
  private DataOnlyEnum dataOnly;
122

123
  /**
124
   * Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be used when available.  Possible values: * **preferred**: Use native 3D Secure authentication when available.
125
   */
126
  public enum NativeThreeDSEnum {
×
127
    PREFERRED("preferred");
×
128

129
    private String value;
130

131
    NativeThreeDSEnum(String value) {
×
132
      this.value = value;
×
133
    }
×
134

135
    @JsonValue
136
    public String getValue() {
137
      return value;
×
138
    }
139

140
    @Override
141
    public String toString() {
142
      return String.valueOf(value);
×
143
    }
144

145
    @JsonCreator
146
    public static NativeThreeDSEnum fromValue(String value) {
147
      for (NativeThreeDSEnum b : NativeThreeDSEnum.values()) {
×
148
        if (b.value.equals(value)) {
×
149
          return b;
×
150
        }
151
      }
152
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
153
    }
154
  }
155

156
  public static final String JSON_PROPERTY_NATIVE_THREE_D_S = "nativeThreeDS";
157
  private NativeThreeDSEnum nativeThreeDS;
158

159
  /**
160
   * The version of 3D Secure to use.  Possible values:  * **2.1.0** * **2.2.0**
161
   */
162
  public enum ThreeDSVersionEnum {
×
163
    _1_0("2.1.0"),
×
164
    
165
    _2_0("2.2.0");
×
166

167
    private String value;
168

169
    ThreeDSVersionEnum(String value) {
×
170
      this.value = value;
×
171
    }
×
172

173
    @JsonValue
174
    public String getValue() {
175
      return value;
×
176
    }
177

178
    @Override
179
    public String toString() {
180
      return String.valueOf(value);
×
181
    }
182

183
    @JsonCreator
184
    public static ThreeDSVersionEnum fromValue(String value) {
185
      for (ThreeDSVersionEnum b : ThreeDSVersionEnum.values()) {
×
186
        if (b.value.equals(value)) {
×
187
          return b;
×
188
        }
189
      }
190
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
191
    }
192
  }
193

194
  public static final String JSON_PROPERTY_THREE_D_S_VERSION = "threeDSVersion";
195
  private ThreeDSVersionEnum threeDSVersion;
196

197
  public ThreeDSRequestData() { 
×
198
  }
×
199

200
  public ThreeDSRequestData challengeWindowSize(ChallengeWindowSizeEnum challengeWindowSize) {
201
    this.challengeWindowSize = challengeWindowSize;
×
202
    return this;
×
203
  }
204

205
   /**
206
   * Dimensions of the 3DS2 challenge window to be displayed to the cardholder.  Possible values:  * **01** - size of 250x400  * **02** - size of 390x400 * **03** - size of 500x600 * **04** - size of 600x400 * **05** - Fullscreen
207
   * @return challengeWindowSize
208
  **/
209
  @ApiModelProperty(value = "Dimensions of the 3DS2 challenge window to be displayed to the cardholder.  Possible values:  * **01** - size of 250x400  * **02** - size of 390x400 * **03** - size of 500x600 * **04** - size of 600x400 * **05** - Fullscreen")
210
  @JsonProperty(JSON_PROPERTY_CHALLENGE_WINDOW_SIZE)
211
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
212

213
  public ChallengeWindowSizeEnum getChallengeWindowSize() {
214
    return challengeWindowSize;
×
215
  }
216

217

218
  @JsonProperty(JSON_PROPERTY_CHALLENGE_WINDOW_SIZE)
219
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
220
  public void setChallengeWindowSize(ChallengeWindowSizeEnum challengeWindowSize) {
221
    this.challengeWindowSize = challengeWindowSize;
×
222
  }
×
223

224

225
  public ThreeDSRequestData dataOnly(DataOnlyEnum dataOnly) {
226
    this.dataOnly = dataOnly;
×
227
    return this;
×
228
  }
229

230
   /**
231
   * Flag for data only flow.
232
   * @return dataOnly
233
  **/
234
  @ApiModelProperty(value = "Flag for data only flow.")
235
  @JsonProperty(JSON_PROPERTY_DATA_ONLY)
236
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
237

238
  public DataOnlyEnum getDataOnly() {
239
    return dataOnly;
×
240
  }
241

242

243
  @JsonProperty(JSON_PROPERTY_DATA_ONLY)
244
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
245
  public void setDataOnly(DataOnlyEnum dataOnly) {
246
    this.dataOnly = dataOnly;
×
247
  }
×
248

249

250
  public ThreeDSRequestData nativeThreeDS(NativeThreeDSEnum nativeThreeDS) {
251
    this.nativeThreeDS = nativeThreeDS;
×
252
    return this;
×
253
  }
254

255
   /**
256
   * Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be used when available.  Possible values: * **preferred**: Use native 3D Secure authentication when available.
257
   * @return nativeThreeDS
258
  **/
259
  @ApiModelProperty(value = "Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be used when available.  Possible values: * **preferred**: Use native 3D Secure authentication when available.")
260
  @JsonProperty(JSON_PROPERTY_NATIVE_THREE_D_S)
261
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
262

263
  public NativeThreeDSEnum getNativeThreeDS() {
264
    return nativeThreeDS;
×
265
  }
266

267

268
  @JsonProperty(JSON_PROPERTY_NATIVE_THREE_D_S)
269
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
270
  public void setNativeThreeDS(NativeThreeDSEnum nativeThreeDS) {
271
    this.nativeThreeDS = nativeThreeDS;
×
272
  }
×
273

274

275
  public ThreeDSRequestData threeDSVersion(ThreeDSVersionEnum threeDSVersion) {
276
    this.threeDSVersion = threeDSVersion;
×
277
    return this;
×
278
  }
279

280
   /**
281
   * The version of 3D Secure to use.  Possible values:  * **2.1.0** * **2.2.0**
282
   * @return threeDSVersion
283
  **/
284
  @ApiModelProperty(value = "The version of 3D Secure to use.  Possible values:  * **2.1.0** * **2.2.0**")
285
  @JsonProperty(JSON_PROPERTY_THREE_D_S_VERSION)
286
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
287

288
  public ThreeDSVersionEnum getThreeDSVersion() {
289
    return threeDSVersion;
×
290
  }
291

292

293
  @JsonProperty(JSON_PROPERTY_THREE_D_S_VERSION)
294
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
295
  public void setThreeDSVersion(ThreeDSVersionEnum threeDSVersion) {
296
    this.threeDSVersion = threeDSVersion;
×
297
  }
×
298

299

300
  /**
301
   * Return true if this ThreeDSRequestData object is equal to o.
302
   */
303
  @Override
304
  public boolean equals(Object o) {
305
    if (this == o) {
×
306
      return true;
×
307
    }
308
    if (o == null || getClass() != o.getClass()) {
×
309
      return false;
×
310
    }
311
    ThreeDSRequestData threeDSRequestData = (ThreeDSRequestData) o;
×
312
    return Objects.equals(this.challengeWindowSize, threeDSRequestData.challengeWindowSize) &&
×
313
        Objects.equals(this.dataOnly, threeDSRequestData.dataOnly) &&
×
314
        Objects.equals(this.nativeThreeDS, threeDSRequestData.nativeThreeDS) &&
×
315
        Objects.equals(this.threeDSVersion, threeDSRequestData.threeDSVersion);
×
316
  }
317

318
  @Override
319
  public int hashCode() {
320
    return Objects.hash(challengeWindowSize, dataOnly, nativeThreeDS, threeDSVersion);
×
321
  }
322

323
  @Override
324
  public String toString() {
325
    StringBuilder sb = new StringBuilder();
×
326
    sb.append("class ThreeDSRequestData {\n");
×
327
    sb.append("    challengeWindowSize: ").append(toIndentedString(challengeWindowSize)).append("\n");
×
328
    sb.append("    dataOnly: ").append(toIndentedString(dataOnly)).append("\n");
×
329
    sb.append("    nativeThreeDS: ").append(toIndentedString(nativeThreeDS)).append("\n");
×
330
    sb.append("    threeDSVersion: ").append(toIndentedString(threeDSVersion)).append("\n");
×
331
    sb.append("}");
×
332
    return sb.toString();
×
333
  }
334

335
  /**
336
   * Convert the given object to string with each line indented by 4 spaces
337
   * (except the first line).
338
   */
339
  private String toIndentedString(Object o) {
340
    if (o == null) {
×
341
      return "null";
×
342
    }
343
    return o.toString().replace("\n", "\n    ");
×
344
  }
345

346
/**
347
   * Create an instance of ThreeDSRequestData given an JSON string
348
   *
349
   * @param jsonString JSON string
350
   * @return An instance of ThreeDSRequestData
351
   * @throws JsonProcessingException if the JSON string is invalid with respect to ThreeDSRequestData
352
   */
353
  public static ThreeDSRequestData fromJson(String jsonString) throws JsonProcessingException {
354
    return JSON.getMapper().readValue(jsonString, ThreeDSRequestData.class);
×
355
  }
356
/**
357
  * Convert an instance of ThreeDSRequestData to an JSON string
358
  *
359
  * @return JSON string
360
  */
361
  public String toJson() throws JsonProcessingException {
362
    return JSON.getMapper().writeValueAsString(this);
×
363
  }
364
}
365

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

© 2026 Coveralls, Inc