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

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

18 Sep 2023 12:27PM UTC coverage: 13.146%. First build
#2660

push

web-flow
Merge fdf590561 into ba706cfa8

2480 of 2480 new or added lines in 54 files covered. (100.0%)

10283 of 78224 relevant lines covered (13.15%)

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/configurationwebhooks/Card.java
1
/*
2
 * Configuration webhooks
3
 *
4
 * The version of the OpenAPI document: 1
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.configurationwebhooks;
14

15
import java.util.Objects;
16
import java.util.Arrays;
17
import java.util.Map;
18
import java.util.HashMap;
19
import com.adyen.model.configurationwebhooks.Authentication;
20
import com.adyen.model.configurationwebhooks.CardConfiguration;
21
import com.adyen.model.configurationwebhooks.Contact;
22
import com.adyen.model.configurationwebhooks.Expiry;
23
import com.fasterxml.jackson.annotation.JsonInclude;
24
import com.fasterxml.jackson.annotation.JsonProperty;
25
import com.fasterxml.jackson.annotation.JsonCreator;
26
import com.fasterxml.jackson.annotation.JsonTypeName;
27
import com.fasterxml.jackson.annotation.JsonValue;
28
import io.swagger.annotations.ApiModel;
29
import io.swagger.annotations.ApiModelProperty;
30
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
31
import com.fasterxml.jackson.core.JsonProcessingException;
32

33

34
/**
35
 * Card
36
 */
37
@JsonPropertyOrder({
38
  Card.JSON_PROPERTY_AUTHENTICATION,
39
  Card.JSON_PROPERTY_BIN,
40
  Card.JSON_PROPERTY_BRAND,
41
  Card.JSON_PROPERTY_BRAND_VARIANT,
42
  Card.JSON_PROPERTY_CARDHOLDER_NAME,
43
  Card.JSON_PROPERTY_CONFIGURATION,
44
  Card.JSON_PROPERTY_CVC,
45
  Card.JSON_PROPERTY_DELIVERY_CONTACT,
46
  Card.JSON_PROPERTY_EXPIRATION,
47
  Card.JSON_PROPERTY_FORM_FACTOR,
48
  Card.JSON_PROPERTY_LAST_FOUR,
49
  Card.JSON_PROPERTY_NUMBER,
50
  Card.JSON_PROPERTY_THREE_D_SECURE
51
})
52

53
public class Card {
54
  public static final String JSON_PROPERTY_AUTHENTICATION = "authentication";
55
  private Authentication authentication;
56

57
  public static final String JSON_PROPERTY_BIN = "bin";
58
  private String bin;
59

60
  public static final String JSON_PROPERTY_BRAND = "brand";
61
  private String brand;
62

63
  public static final String JSON_PROPERTY_BRAND_VARIANT = "brandVariant";
64
  private String brandVariant;
65

66
  public static final String JSON_PROPERTY_CARDHOLDER_NAME = "cardholderName";
67
  private String cardholderName;
68

69
  public static final String JSON_PROPERTY_CONFIGURATION = "configuration";
70
  private CardConfiguration configuration;
71

72
  public static final String JSON_PROPERTY_CVC = "cvc";
73
  private String cvc;
74

75
  public static final String JSON_PROPERTY_DELIVERY_CONTACT = "deliveryContact";
76
  private Contact deliveryContact;
77

78
  public static final String JSON_PROPERTY_EXPIRATION = "expiration";
79
  private Expiry expiration;
80

81
  /**
82
   * The form factor of the card. Possible values: **virtual**, **physical**.
83
   */
84
  public enum FormFactorEnum {
×
85
    PHYSICAL("physical"),
×
86
    
87
    UNKNOWN("unknown"),
×
88
    
89
    VIRTUAL("virtual");
×
90

91
    private String value;
92

93
    FormFactorEnum(String value) {
×
94
      this.value = value;
×
95
    }
×
96

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

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

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

118
  public static final String JSON_PROPERTY_FORM_FACTOR = "formFactor";
119
  private FormFactorEnum formFactor;
120

121
  public static final String JSON_PROPERTY_LAST_FOUR = "lastFour";
122
  private String lastFour;
123

124
  public static final String JSON_PROPERTY_NUMBER = "number";
125
  private String number;
126

127
  public static final String JSON_PROPERTY_THREE_D_SECURE = "threeDSecure";
128
  private String threeDSecure;
129

130
  public Card() { 
×
131
  }
×
132

133
  public Card authentication(Authentication authentication) {
134
    this.authentication = authentication;
×
135
    return this;
×
136
  }
137

138
   /**
139
   * Get authentication
140
   * @return authentication
141
  **/
142
  @ApiModelProperty(value = "")
143
  @JsonProperty(JSON_PROPERTY_AUTHENTICATION)
144
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
145

146
  public Authentication getAuthentication() {
147
    return authentication;
×
148
  }
149

150

151
  @JsonProperty(JSON_PROPERTY_AUTHENTICATION)
152
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
153
  public void setAuthentication(Authentication authentication) {
154
    this.authentication = authentication;
×
155
  }
×
156

157

158
  public Card bin(String bin) {
159
    this.bin = bin;
×
160
    return this;
×
161
  }
162

163
   /**
164
   * The bank identification number (BIN) of the card number.
165
   * @return bin
166
  **/
167
  @ApiModelProperty(value = "The bank identification number (BIN) of the card number.")
168
  @JsonProperty(JSON_PROPERTY_BIN)
169
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
170

171
  public String getBin() {
172
    return bin;
×
173
  }
174

175

176
  @JsonProperty(JSON_PROPERTY_BIN)
177
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
178
  public void setBin(String bin) {
179
    this.bin = bin;
×
180
  }
×
181

182

183
  public Card brand(String brand) {
184
    this.brand = brand;
×
185
    return this;
×
186
  }
187

188
   /**
189
   * The brand of the physical or the virtual card. Possible values: **visa**, **mc**.
190
   * @return brand
191
  **/
192
  @ApiModelProperty(required = true, value = "The brand of the physical or the virtual card. Possible values: **visa**, **mc**.")
193
  @JsonProperty(JSON_PROPERTY_BRAND)
194
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
195

196
  public String getBrand() {
197
    return brand;
×
198
  }
199

200

201
  @JsonProperty(JSON_PROPERTY_BRAND)
202
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
203
  public void setBrand(String brand) {
204
    this.brand = brand;
×
205
  }
×
206

207

208
  public Card brandVariant(String brandVariant) {
209
    this.brandVariant = brandVariant;
×
210
    return this;
×
211
  }
212

213
   /**
214
   * The brand variant of the physical or the virtual card. For example, **visadebit** or **mcprepaid**. >Reach out to your Adyen contact to get the values relevant for your integration.
215
   * @return brandVariant
216
  **/
217
  @ApiModelProperty(required = true, value = "The brand variant of the physical or the virtual card. For example, **visadebit** or **mcprepaid**. >Reach out to your Adyen contact to get the values relevant for your integration.")
218
  @JsonProperty(JSON_PROPERTY_BRAND_VARIANT)
219
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
220

221
  public String getBrandVariant() {
222
    return brandVariant;
×
223
  }
224

225

226
  @JsonProperty(JSON_PROPERTY_BRAND_VARIANT)
227
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
228
  public void setBrandVariant(String brandVariant) {
229
    this.brandVariant = brandVariant;
×
230
  }
×
231

232

233
  public Card cardholderName(String cardholderName) {
234
    this.cardholderName = cardholderName;
×
235
    return this;
×
236
  }
237

238
   /**
239
   * The name of the cardholder.  Maximum length: 26 characters.
240
   * @return cardholderName
241
  **/
242
  @ApiModelProperty(required = true, value = "The name of the cardholder.  Maximum length: 26 characters.")
243
  @JsonProperty(JSON_PROPERTY_CARDHOLDER_NAME)
244
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
245

246
  public String getCardholderName() {
247
    return cardholderName;
×
248
  }
249

250

251
  @JsonProperty(JSON_PROPERTY_CARDHOLDER_NAME)
252
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
253
  public void setCardholderName(String cardholderName) {
254
    this.cardholderName = cardholderName;
×
255
  }
×
256

257

258
  public Card configuration(CardConfiguration configuration) {
259
    this.configuration = configuration;
×
260
    return this;
×
261
  }
262

263
   /**
264
   * Get configuration
265
   * @return configuration
266
  **/
267
  @ApiModelProperty(value = "")
268
  @JsonProperty(JSON_PROPERTY_CONFIGURATION)
269
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
270

271
  public CardConfiguration getConfiguration() {
272
    return configuration;
×
273
  }
274

275

276
  @JsonProperty(JSON_PROPERTY_CONFIGURATION)
277
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
278
  public void setConfiguration(CardConfiguration configuration) {
279
    this.configuration = configuration;
×
280
  }
×
281

282

283
  public Card cvc(String cvc) {
284
    this.cvc = cvc;
×
285
    return this;
×
286
  }
287

288
   /**
289
   * The CVC2 value of the card. > The CVC2 is not sent by default. This is only returned in the `POST` response for single-use virtual cards.
290
   * @return cvc
291
  **/
292
  @ApiModelProperty(value = "The CVC2 value of the card. > The CVC2 is not sent by default. This is only returned in the `POST` response for single-use virtual cards.")
293
  @JsonProperty(JSON_PROPERTY_CVC)
294
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
295

296
  public String getCvc() {
297
    return cvc;
×
298
  }
299

300

301
  @JsonProperty(JSON_PROPERTY_CVC)
302
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
303
  public void setCvc(String cvc) {
304
    this.cvc = cvc;
×
305
  }
×
306

307

308
  public Card deliveryContact(Contact deliveryContact) {
309
    this.deliveryContact = deliveryContact;
×
310
    return this;
×
311
  }
312

313
   /**
314
   * Get deliveryContact
315
   * @return deliveryContact
316
  **/
317
  @ApiModelProperty(value = "")
318
  @JsonProperty(JSON_PROPERTY_DELIVERY_CONTACT)
319
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
320

321
  public Contact getDeliveryContact() {
322
    return deliveryContact;
×
323
  }
324

325

326
  @JsonProperty(JSON_PROPERTY_DELIVERY_CONTACT)
327
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
328
  public void setDeliveryContact(Contact deliveryContact) {
329
    this.deliveryContact = deliveryContact;
×
330
  }
×
331

332

333
  public Card expiration(Expiry expiration) {
334
    this.expiration = expiration;
×
335
    return this;
×
336
  }
337

338
   /**
339
   * Get expiration
340
   * @return expiration
341
  **/
342
  @ApiModelProperty(value = "")
343
  @JsonProperty(JSON_PROPERTY_EXPIRATION)
344
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
345

346
  public Expiry getExpiration() {
347
    return expiration;
×
348
  }
349

350

351
  @JsonProperty(JSON_PROPERTY_EXPIRATION)
352
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
353
  public void setExpiration(Expiry expiration) {
354
    this.expiration = expiration;
×
355
  }
×
356

357

358
  public Card formFactor(FormFactorEnum formFactor) {
359
    this.formFactor = formFactor;
×
360
    return this;
×
361
  }
362

363
   /**
364
   * The form factor of the card. Possible values: **virtual**, **physical**.
365
   * @return formFactor
366
  **/
367
  @ApiModelProperty(required = true, value = "The form factor of the card. Possible values: **virtual**, **physical**.")
368
  @JsonProperty(JSON_PROPERTY_FORM_FACTOR)
369
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
370

371
  public FormFactorEnum getFormFactor() {
372
    return formFactor;
×
373
  }
374

375

376
  @JsonProperty(JSON_PROPERTY_FORM_FACTOR)
377
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
378
  public void setFormFactor(FormFactorEnum formFactor) {
379
    this.formFactor = formFactor;
×
380
  }
×
381

382

383
  public Card lastFour(String lastFour) {
384
    this.lastFour = lastFour;
×
385
    return this;
×
386
  }
387

388
   /**
389
   * Last last four digits of the card number.
390
   * @return lastFour
391
  **/
392
  @ApiModelProperty(value = "Last last four digits of the card number.")
393
  @JsonProperty(JSON_PROPERTY_LAST_FOUR)
394
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
395

396
  public String getLastFour() {
397
    return lastFour;
×
398
  }
399

400

401
  @JsonProperty(JSON_PROPERTY_LAST_FOUR)
402
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
403
  public void setLastFour(String lastFour) {
404
    this.lastFour = lastFour;
×
405
  }
×
406

407

408
  public Card number(String number) {
409
    this.number = number;
×
410
    return this;
×
411
  }
412

413
   /**
414
   * The primary account number (PAN) of the card. > The PAN is masked by default and returned only for single-use virtual cards.
415
   * @return number
416
  **/
417
  @ApiModelProperty(required = true, value = "The primary account number (PAN) of the card. > The PAN is masked by default and returned only for single-use virtual cards.")
418
  @JsonProperty(JSON_PROPERTY_NUMBER)
419
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
420

421
  public String getNumber() {
422
    return number;
×
423
  }
424

425

426
  @JsonProperty(JSON_PROPERTY_NUMBER)
427
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
428
  public void setNumber(String number) {
429
    this.number = number;
×
430
  }
×
431

432

433
  public Card threeDSecure(String threeDSecure) {
434
    this.threeDSecure = threeDSecure;
×
435
    return this;
×
436
  }
437

438
   /**
439
   * Allocates a specific product range for either a physical or a virtual card. Possible values: **fullySupported**, **secureCorporate**. >Reach out to your Adyen contact to get the values relevant for your integration.
440
   * @return threeDSecure
441
  **/
442
  @ApiModelProperty(value = "Allocates a specific product range for either a physical or a virtual card. Possible values: **fullySupported**, **secureCorporate**. >Reach out to your Adyen contact to get the values relevant for your integration.")
443
  @JsonProperty(JSON_PROPERTY_THREE_D_SECURE)
444
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
445

446
  public String getThreeDSecure() {
447
    return threeDSecure;
×
448
  }
449

450

451
  @JsonProperty(JSON_PROPERTY_THREE_D_SECURE)
452
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
453
  public void setThreeDSecure(String threeDSecure) {
454
    this.threeDSecure = threeDSecure;
×
455
  }
×
456

457

458
  /**
459
   * Return true if this Card object is equal to o.
460
   */
461
  @Override
462
  public boolean equals(Object o) {
463
    if (this == o) {
×
464
      return true;
×
465
    }
466
    if (o == null || getClass() != o.getClass()) {
×
467
      return false;
×
468
    }
469
    Card card = (Card) o;
×
470
    return Objects.equals(this.authentication, card.authentication) &&
×
471
        Objects.equals(this.bin, card.bin) &&
×
472
        Objects.equals(this.brand, card.brand) &&
×
473
        Objects.equals(this.brandVariant, card.brandVariant) &&
×
474
        Objects.equals(this.cardholderName, card.cardholderName) &&
×
475
        Objects.equals(this.configuration, card.configuration) &&
×
476
        Objects.equals(this.cvc, card.cvc) &&
×
477
        Objects.equals(this.deliveryContact, card.deliveryContact) &&
×
478
        Objects.equals(this.expiration, card.expiration) &&
×
479
        Objects.equals(this.formFactor, card.formFactor) &&
×
480
        Objects.equals(this.lastFour, card.lastFour) &&
×
481
        Objects.equals(this.number, card.number) &&
×
482
        Objects.equals(this.threeDSecure, card.threeDSecure);
×
483
  }
484

485
  @Override
486
  public int hashCode() {
487
    return Objects.hash(authentication, bin, brand, brandVariant, cardholderName, configuration, cvc, deliveryContact, expiration, formFactor, lastFour, number, threeDSecure);
×
488
  }
489

490
  @Override
491
  public String toString() {
492
    StringBuilder sb = new StringBuilder();
×
493
    sb.append("class Card {\n");
×
494
    sb.append("    authentication: ").append(toIndentedString(authentication)).append("\n");
×
495
    sb.append("    bin: ").append(toIndentedString(bin)).append("\n");
×
496
    sb.append("    brand: ").append(toIndentedString(brand)).append("\n");
×
497
    sb.append("    brandVariant: ").append(toIndentedString(brandVariant)).append("\n");
×
498
    sb.append("    cardholderName: ").append(toIndentedString(cardholderName)).append("\n");
×
499
    sb.append("    configuration: ").append(toIndentedString(configuration)).append("\n");
×
500
    sb.append("    cvc: ").append(toIndentedString(cvc)).append("\n");
×
501
    sb.append("    deliveryContact: ").append(toIndentedString(deliveryContact)).append("\n");
×
502
    sb.append("    expiration: ").append(toIndentedString(expiration)).append("\n");
×
503
    sb.append("    formFactor: ").append(toIndentedString(formFactor)).append("\n");
×
504
    sb.append("    lastFour: ").append(toIndentedString(lastFour)).append("\n");
×
505
    sb.append("    number: ").append(toIndentedString(number)).append("\n");
×
506
    sb.append("    threeDSecure: ").append(toIndentedString(threeDSecure)).append("\n");
×
507
    sb.append("}");
×
508
    return sb.toString();
×
509
  }
510

511
  /**
512
   * Convert the given object to string with each line indented by 4 spaces
513
   * (except the first line).
514
   */
515
  private String toIndentedString(Object o) {
516
    if (o == null) {
×
517
      return "null";
×
518
    }
519
    return o.toString().replace("\n", "\n    ");
×
520
  }
521

522
/**
523
   * Create an instance of Card given an JSON string
524
   *
525
   * @param jsonString JSON string
526
   * @return An instance of Card
527
   * @throws JsonProcessingException if the JSON string is invalid with respect to Card
528
   */
529
  public static Card fromJson(String jsonString) throws JsonProcessingException {
530
    return JSON.getMapper().readValue(jsonString, Card.class);
×
531
  }
532
/**
533
  * Convert an instance of Card to an JSON string
534
  *
535
  * @return JSON string
536
  */
537
  public String toJson() throws JsonProcessingException {
538
    return JSON.getMapper().writeValueAsString(this);
×
539
  }
540
}
541

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