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

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

14 Jun 2024 07:13AM UTC coverage: 11.966%. First build
#3322

push

web-flow
Merge 673aaf237 into ac91e3ca5

6 of 369 new or added lines in 46 files covered. (1.63%)

12491 of 104390 relevant lines covered (11.97%)

0.12 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

18.52
/src/main/java/com/adyen/model/checkout/EcontextVoucherDetails.java
1
/*
2
 * Adyen Checkout API
3
 *
4
 * The version of the OpenAPI document: 71
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
 * EcontextVoucherDetails
32
 */
33
@JsonPropertyOrder({
34
  EcontextVoucherDetails.JSON_PROPERTY_CHECKOUT_ATTEMPT_ID,
35
  EcontextVoucherDetails.JSON_PROPERTY_FIRST_NAME,
36
  EcontextVoucherDetails.JSON_PROPERTY_LAST_NAME,
37
  EcontextVoucherDetails.JSON_PROPERTY_SHOPPER_EMAIL,
38
  EcontextVoucherDetails.JSON_PROPERTY_SUBTYPE,
39
  EcontextVoucherDetails.JSON_PROPERTY_TELEPHONE_NUMBER,
40
  EcontextVoucherDetails.JSON_PROPERTY_TYPE
41
})
42

43
public class EcontextVoucherDetails {
44
  public static final String JSON_PROPERTY_CHECKOUT_ATTEMPT_ID = "checkoutAttemptId";
45
  private String checkoutAttemptId;
46

47
  public static final String JSON_PROPERTY_FIRST_NAME = "firstName";
48
  private String firstName;
49

50
  public static final String JSON_PROPERTY_LAST_NAME = "lastName";
51
  private String lastName;
52

53
  public static final String JSON_PROPERTY_SHOPPER_EMAIL = "shopperEmail";
54
  private String shopperEmail;
55

56
  public static final String JSON_PROPERTY_SUBTYPE = "subtype";
57
  private String subtype;
58

59
  public static final String JSON_PROPERTY_TELEPHONE_NUMBER = "telephoneNumber";
60
  private String telephoneNumber;
61

62
  /**
63
   * **econtextvoucher**
64
   */
65
  public enum TypeEnum {
1✔
66
    ECONTEXT_SEVEN_ELEVEN("econtext_seven_eleven"),
1✔
67
    
68
    ECONTEXT_ONLINE("econtext_online"),
1✔
69
    
70
    ECONTEXT("econtext"),
1✔
71
    
72
    ECONTEXT_STORES("econtext_stores"),
1✔
73
    
74
    ECONTEXT_ATM("econtext_atm");
1✔
75

76
    private String value;
77

78
    TypeEnum(String value) {
1✔
79
      this.value = value;
1✔
80
    }
1✔
81

82
    @JsonValue
83
    public String getValue() {
84
      return value;
1✔
85
    }
86

87
    @Override
88
    public String toString() {
89
      return String.valueOf(value);
×
90
    }
91

92
    @JsonCreator
93
    public static TypeEnum fromValue(String value) {
94
      for (TypeEnum b : TypeEnum.values()) {
1✔
95
        if (b.value.equals(value)) {
1✔
96
          return b;
×
97
        }
98
      }
99
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
1✔
100
    }
101
  }
102

103
  public static final String JSON_PROPERTY_TYPE = "type";
104
  private TypeEnum type;
105

106
  public EcontextVoucherDetails() { 
1✔
107
  }
1✔
108

109
  public EcontextVoucherDetails checkoutAttemptId(String checkoutAttemptId) {
110
    this.checkoutAttemptId = checkoutAttemptId;
×
111
    return this;
×
112
  }
113

114
   /**
115
   * The checkout attempt identifier.
116
   * @return checkoutAttemptId
117
  **/
118
  @ApiModelProperty(value = "The checkout attempt identifier.")
119
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
120
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
121

122
  public String getCheckoutAttemptId() {
123
    return checkoutAttemptId;
×
124
  }
125

126

127
 /**
128
  * The checkout attempt identifier.
129
  *
130
  * @param checkoutAttemptId
131
  */ 
132
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
133
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
134
  public void setCheckoutAttemptId(String checkoutAttemptId) {
135
    this.checkoutAttemptId = checkoutAttemptId;
×
136
  }
×
137

138

139
  public EcontextVoucherDetails firstName(String firstName) {
140
    this.firstName = firstName;
×
141
    return this;
×
142
  }
143

144
   /**
145
   * The shopper's first name.
146
   * @return firstName
147
  **/
148
  @ApiModelProperty(required = true, value = "The shopper's first name.")
149
  @JsonProperty(JSON_PROPERTY_FIRST_NAME)
150
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
151

152
  public String getFirstName() {
153
    return firstName;
×
154
  }
155

156

157
 /**
158
  * The shopper's first name.
159
  *
160
  * @param firstName
161
  */ 
162
  @JsonProperty(JSON_PROPERTY_FIRST_NAME)
163
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
164
  public void setFirstName(String firstName) {
165
    this.firstName = firstName;
×
166
  }
×
167

168

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

174
   /**
175
   * The shopper's last name.
176
   * @return lastName
177
  **/
178
  @ApiModelProperty(required = true, value = "The shopper's last name.")
179
  @JsonProperty(JSON_PROPERTY_LAST_NAME)
180
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
181

182
  public String getLastName() {
183
    return lastName;
×
184
  }
185

186

187
 /**
188
  * The shopper's last name.
189
  *
190
  * @param lastName
191
  */ 
192
  @JsonProperty(JSON_PROPERTY_LAST_NAME)
193
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
194
  public void setLastName(String lastName) {
195
    this.lastName = lastName;
×
196
  }
×
197

198

199
  public EcontextVoucherDetails shopperEmail(String shopperEmail) {
200
    this.shopperEmail = shopperEmail;
×
201
    return this;
×
202
  }
203

204
   /**
205
   * The shopper's email.
206
   * @return shopperEmail
207
  **/
208
  @ApiModelProperty(required = true, value = "The shopper's email.")
209
  @JsonProperty(JSON_PROPERTY_SHOPPER_EMAIL)
210
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
211

212
  public String getShopperEmail() {
213
    return shopperEmail;
×
214
  }
215

216

217
 /**
218
  * The shopper's email.
219
  *
220
  * @param shopperEmail
221
  */ 
222
  @JsonProperty(JSON_PROPERTY_SHOPPER_EMAIL)
223
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
224
  public void setShopperEmail(String shopperEmail) {
225
    this.shopperEmail = shopperEmail;
×
226
  }
×
227

228

229
  public EcontextVoucherDetails subtype(String subtype) {
NEW
230
    this.subtype = subtype;
×
NEW
231
    return this;
×
232
  }
233

234
   /**
235
   * The payment method subtype.
236
   * @return subtype
237
  **/
238
  @ApiModelProperty(value = "The payment method subtype.")
239
  @JsonProperty(JSON_PROPERTY_SUBTYPE)
240
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
241

242
  public String getSubtype() {
NEW
243
    return subtype;
×
244
  }
245

246

247
 /**
248
  * The payment method subtype.
249
  *
250
  * @param subtype
251
  */ 
252
  @JsonProperty(JSON_PROPERTY_SUBTYPE)
253
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
254
  public void setSubtype(String subtype) {
NEW
255
    this.subtype = subtype;
×
NEW
256
  }
×
257

258

259
  public EcontextVoucherDetails telephoneNumber(String telephoneNumber) {
260
    this.telephoneNumber = telephoneNumber;
×
261
    return this;
×
262
  }
263

264
   /**
265
   * The shopper's contact number. It must have an international number format, for example **+31 20 779 1846**. Formats like **+31 (0)20 779 1846** or **0031 20 779 1846** are not accepted.
266
   * @return telephoneNumber
267
  **/
268
  @ApiModelProperty(required = true, value = "The shopper's contact number. It must have an international number format, for example **+31 20 779 1846**. Formats like **+31 (0)20 779 1846** or **0031 20 779 1846** are not accepted.")
269
  @JsonProperty(JSON_PROPERTY_TELEPHONE_NUMBER)
270
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
271

272
  public String getTelephoneNumber() {
273
    return telephoneNumber;
×
274
  }
275

276

277
 /**
278
  * The shopper's contact number. It must have an international number format, for example **+31 20 779 1846**. Formats like **+31 (0)20 779 1846** or **0031 20 779 1846** are not accepted.
279
  *
280
  * @param telephoneNumber
281
  */ 
282
  @JsonProperty(JSON_PROPERTY_TELEPHONE_NUMBER)
283
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
284
  public void setTelephoneNumber(String telephoneNumber) {
285
    this.telephoneNumber = telephoneNumber;
×
286
  }
×
287

288

289
  public EcontextVoucherDetails type(TypeEnum type) {
290
    this.type = type;
×
291
    return this;
×
292
  }
293

294
   /**
295
   * **econtextvoucher**
296
   * @return type
297
  **/
298
  @ApiModelProperty(required = true, value = "**econtextvoucher**")
299
  @JsonProperty(JSON_PROPERTY_TYPE)
300
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
301

302
  public TypeEnum getType() {
303
    return type;
×
304
  }
305

306

307
 /**
308
  * **econtextvoucher**
309
  *
310
  * @param type
311
  */ 
312
  @JsonProperty(JSON_PROPERTY_TYPE)
313
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
314
  public void setType(TypeEnum type) {
315
    this.type = type;
×
316
  }
×
317

318

319
  /**
320
   * Return true if this EcontextVoucherDetails object is equal to o.
321
   */
322
  @Override
323
  public boolean equals(Object o) {
324
    if (this == o) {
×
325
      return true;
×
326
    }
327
    if (o == null || getClass() != o.getClass()) {
×
328
      return false;
×
329
    }
330
    EcontextVoucherDetails econtextVoucherDetails = (EcontextVoucherDetails) o;
×
331
    return Objects.equals(this.checkoutAttemptId, econtextVoucherDetails.checkoutAttemptId) &&
×
332
        Objects.equals(this.firstName, econtextVoucherDetails.firstName) &&
×
333
        Objects.equals(this.lastName, econtextVoucherDetails.lastName) &&
×
334
        Objects.equals(this.shopperEmail, econtextVoucherDetails.shopperEmail) &&
×
NEW
335
        Objects.equals(this.subtype, econtextVoucherDetails.subtype) &&
×
336
        Objects.equals(this.telephoneNumber, econtextVoucherDetails.telephoneNumber) &&
×
337
        Objects.equals(this.type, econtextVoucherDetails.type);
×
338
  }
339

340
  @Override
341
  public int hashCode() {
NEW
342
    return Objects.hash(checkoutAttemptId, firstName, lastName, shopperEmail, subtype, telephoneNumber, type);
×
343
  }
344

345
  @Override
346
  public String toString() {
347
    StringBuilder sb = new StringBuilder();
×
348
    sb.append("class EcontextVoucherDetails {\n");
×
349
    sb.append("    checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n");
×
350
    sb.append("    firstName: ").append(toIndentedString(firstName)).append("\n");
×
351
    sb.append("    lastName: ").append(toIndentedString(lastName)).append("\n");
×
352
    sb.append("    shopperEmail: ").append(toIndentedString(shopperEmail)).append("\n");
×
NEW
353
    sb.append("    subtype: ").append(toIndentedString(subtype)).append("\n");
×
354
    sb.append("    telephoneNumber: ").append(toIndentedString(telephoneNumber)).append("\n");
×
355
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
356
    sb.append("}");
×
357
    return sb.toString();
×
358
  }
359

360
  /**
361
   * Convert the given object to string with each line indented by 4 spaces
362
   * (except the first line).
363
   */
364
  private String toIndentedString(Object o) {
365
    if (o == null) {
×
366
      return "null";
×
367
    }
368
    return o.toString().replace("\n", "\n    ");
×
369
  }
370

371
/**
372
   * Create an instance of EcontextVoucherDetails given an JSON string
373
   *
374
   * @param jsonString JSON string
375
   * @return An instance of EcontextVoucherDetails
376
   * @throws JsonProcessingException if the JSON string is invalid with respect to EcontextVoucherDetails
377
   */
378
  public static EcontextVoucherDetails fromJson(String jsonString) throws JsonProcessingException {
379
    return JSON.getMapper().readValue(jsonString, EcontextVoucherDetails.class);
×
380
  }
381
/**
382
  * Convert an instance of EcontextVoucherDetails to an JSON string
383
  *
384
  * @return JSON string
385
  */
386
  public String toJson() throws JsonProcessingException {
387
    return JSON.getMapper().writeValueAsString(this);
×
388
  }
389
}
390

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