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

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

24 May 2024 12:08PM UTC coverage: 12.05%. First build
#3286

push

web-flow
Merge 8e2ea04f7 into 67f331171

10 of 150 new or added lines in 13 files covered. (6.67%)

12475 of 103524 relevant lines covered (12.05%)

0.12 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/PaymentMethodToStore.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
 * PaymentMethodToStore
32
 */
33
@JsonPropertyOrder({
34
  PaymentMethodToStore.JSON_PROPERTY_BRAND,
35
  PaymentMethodToStore.JSON_PROPERTY_CVC,
36
  PaymentMethodToStore.JSON_PROPERTY_ENCRYPTED_CARD_NUMBER,
37
  PaymentMethodToStore.JSON_PROPERTY_ENCRYPTED_EXPIRY_MONTH,
38
  PaymentMethodToStore.JSON_PROPERTY_ENCRYPTED_EXPIRY_YEAR,
39
  PaymentMethodToStore.JSON_PROPERTY_ENCRYPTED_SECURITY_CODE,
40
  PaymentMethodToStore.JSON_PROPERTY_EXPIRY_MONTH,
41
  PaymentMethodToStore.JSON_PROPERTY_EXPIRY_YEAR,
42
  PaymentMethodToStore.JSON_PROPERTY_HOLDER_NAME,
43
  PaymentMethodToStore.JSON_PROPERTY_NUMBER,
44
  PaymentMethodToStore.JSON_PROPERTY_TYPE
45
})
46

47
public class PaymentMethodToStore {
48
  public static final String JSON_PROPERTY_BRAND = "brand";
49
  private String brand;
50

51
  public static final String JSON_PROPERTY_CVC = "cvc";
52
  private String cvc;
53

54
  public static final String JSON_PROPERTY_ENCRYPTED_CARD_NUMBER = "encryptedCardNumber";
55
  private String encryptedCardNumber;
56

57
  public static final String JSON_PROPERTY_ENCRYPTED_EXPIRY_MONTH = "encryptedExpiryMonth";
58
  private String encryptedExpiryMonth;
59

60
  public static final String JSON_PROPERTY_ENCRYPTED_EXPIRY_YEAR = "encryptedExpiryYear";
61
  private String encryptedExpiryYear;
62

63
  public static final String JSON_PROPERTY_ENCRYPTED_SECURITY_CODE = "encryptedSecurityCode";
64
  private String encryptedSecurityCode;
65

66
  public static final String JSON_PROPERTY_EXPIRY_MONTH = "expiryMonth";
67
  private String expiryMonth;
68

69
  public static final String JSON_PROPERTY_EXPIRY_YEAR = "expiryYear";
70
  private String expiryYear;
71

72
  public static final String JSON_PROPERTY_HOLDER_NAME = "holderName";
73
  private String holderName;
74

75
  public static final String JSON_PROPERTY_NUMBER = "number";
76
  private String number;
77

78
  public static final String JSON_PROPERTY_TYPE = "type";
79
  private String type;
80

81
  public PaymentMethodToStore() { 
×
82
  }
×
83

84
  public PaymentMethodToStore brand(String brand) {
85
    this.brand = brand;
×
86
    return this;
×
87
  }
88

89
   /**
90
   * Secondary brand of the card. For example: **plastix**, **hmclub**.
91
   * @return brand
92
  **/
93
  @ApiModelProperty(value = "Secondary brand of the card. For example: **plastix**, **hmclub**.")
94
  @JsonProperty(JSON_PROPERTY_BRAND)
95
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
96

97
  public String getBrand() {
98
    return brand;
×
99
  }
100

101

102
 /**
103
  * Secondary brand of the card. For example: **plastix**, **hmclub**.
104
  *
105
  * @param brand
106
  */ 
107
  @JsonProperty(JSON_PROPERTY_BRAND)
108
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
109
  public void setBrand(String brand) {
110
    this.brand = brand;
×
111
  }
×
112

113

114
  public PaymentMethodToStore cvc(String cvc) {
115
    this.cvc = cvc;
×
116
    return this;
×
117
  }
118

119
   /**
120
   * The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
121
   * @return cvc
122
  **/
123
  @ApiModelProperty(value = "The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).")
124
  @JsonProperty(JSON_PROPERTY_CVC)
125
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
126

127
  public String getCvc() {
128
    return cvc;
×
129
  }
130

131

132
 /**
133
  * The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
134
  *
135
  * @param cvc
136
  */ 
137
  @JsonProperty(JSON_PROPERTY_CVC)
138
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
139
  public void setCvc(String cvc) {
140
    this.cvc = cvc;
×
141
  }
×
142

143

144
  public PaymentMethodToStore encryptedCardNumber(String encryptedCardNumber) {
145
    this.encryptedCardNumber = encryptedCardNumber;
×
146
    return this;
×
147
  }
148

149
   /**
150
   * The encrypted card number.
151
   * @return encryptedCardNumber
152
  **/
153
  @ApiModelProperty(value = "The encrypted card number.")
154
  @JsonProperty(JSON_PROPERTY_ENCRYPTED_CARD_NUMBER)
155
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
156

157
  public String getEncryptedCardNumber() {
158
    return encryptedCardNumber;
×
159
  }
160

161

162
 /**
163
  * The encrypted card number.
164
  *
165
  * @param encryptedCardNumber
166
  */ 
167
  @JsonProperty(JSON_PROPERTY_ENCRYPTED_CARD_NUMBER)
168
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
169
  public void setEncryptedCardNumber(String encryptedCardNumber) {
170
    this.encryptedCardNumber = encryptedCardNumber;
×
171
  }
×
172

173

174
  public PaymentMethodToStore encryptedExpiryMonth(String encryptedExpiryMonth) {
175
    this.encryptedExpiryMonth = encryptedExpiryMonth;
×
176
    return this;
×
177
  }
178

179
   /**
180
   * The encrypted card expiry month.
181
   * @return encryptedExpiryMonth
182
  **/
183
  @ApiModelProperty(value = "The encrypted card expiry month.")
184
  @JsonProperty(JSON_PROPERTY_ENCRYPTED_EXPIRY_MONTH)
185
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
186

187
  public String getEncryptedExpiryMonth() {
188
    return encryptedExpiryMonth;
×
189
  }
190

191

192
 /**
193
  * The encrypted card expiry month.
194
  *
195
  * @param encryptedExpiryMonth
196
  */ 
197
  @JsonProperty(JSON_PROPERTY_ENCRYPTED_EXPIRY_MONTH)
198
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
199
  public void setEncryptedExpiryMonth(String encryptedExpiryMonth) {
200
    this.encryptedExpiryMonth = encryptedExpiryMonth;
×
201
  }
×
202

203

204
  public PaymentMethodToStore encryptedExpiryYear(String encryptedExpiryYear) {
205
    this.encryptedExpiryYear = encryptedExpiryYear;
×
206
    return this;
×
207
  }
208

209
   /**
210
   * The encrypted card expiry year.
211
   * @return encryptedExpiryYear
212
  **/
213
  @ApiModelProperty(value = "The encrypted card expiry year.")
214
  @JsonProperty(JSON_PROPERTY_ENCRYPTED_EXPIRY_YEAR)
215
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
216

217
  public String getEncryptedExpiryYear() {
218
    return encryptedExpiryYear;
×
219
  }
220

221

222
 /**
223
  * The encrypted card expiry year.
224
  *
225
  * @param encryptedExpiryYear
226
  */ 
227
  @JsonProperty(JSON_PROPERTY_ENCRYPTED_EXPIRY_YEAR)
228
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
229
  public void setEncryptedExpiryYear(String encryptedExpiryYear) {
230
    this.encryptedExpiryYear = encryptedExpiryYear;
×
231
  }
×
232

233

234
  public PaymentMethodToStore encryptedSecurityCode(String encryptedSecurityCode) {
235
    this.encryptedSecurityCode = encryptedSecurityCode;
×
236
    return this;
×
237
  }
238

239
   /**
240
   * The encrypted card verification code.
241
   * @return encryptedSecurityCode
242
  **/
243
  @ApiModelProperty(value = "The encrypted card verification code.")
244
  @JsonProperty(JSON_PROPERTY_ENCRYPTED_SECURITY_CODE)
245
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
246

247
  public String getEncryptedSecurityCode() {
248
    return encryptedSecurityCode;
×
249
  }
250

251

252
 /**
253
  * The encrypted card verification code.
254
  *
255
  * @param encryptedSecurityCode
256
  */ 
257
  @JsonProperty(JSON_PROPERTY_ENCRYPTED_SECURITY_CODE)
258
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
259
  public void setEncryptedSecurityCode(String encryptedSecurityCode) {
260
    this.encryptedSecurityCode = encryptedSecurityCode;
×
261
  }
×
262

263

264
  public PaymentMethodToStore expiryMonth(String expiryMonth) {
265
    this.expiryMonth = expiryMonth;
×
266
    return this;
×
267
  }
268

269
   /**
270
   * The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
271
   * @return expiryMonth
272
  **/
273
  @ApiModelProperty(value = "The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).")
274
  @JsonProperty(JSON_PROPERTY_EXPIRY_MONTH)
275
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
276

277
  public String getExpiryMonth() {
278
    return expiryMonth;
×
279
  }
280

281

282
 /**
283
  * The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
284
  *
285
  * @param expiryMonth
286
  */ 
287
  @JsonProperty(JSON_PROPERTY_EXPIRY_MONTH)
288
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
289
  public void setExpiryMonth(String expiryMonth) {
290
    this.expiryMonth = expiryMonth;
×
291
  }
×
292

293

294
  public PaymentMethodToStore expiryYear(String expiryYear) {
295
    this.expiryYear = expiryYear;
×
296
    return this;
×
297
  }
298

299
   /**
300
   * The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
301
   * @return expiryYear
302
  **/
303
  @ApiModelProperty(value = "The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).")
304
  @JsonProperty(JSON_PROPERTY_EXPIRY_YEAR)
305
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
306

307
  public String getExpiryYear() {
308
    return expiryYear;
×
309
  }
310

311

312
 /**
313
  * The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
314
  *
315
  * @param expiryYear
316
  */ 
317
  @JsonProperty(JSON_PROPERTY_EXPIRY_YEAR)
318
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
319
  public void setExpiryYear(String expiryYear) {
320
    this.expiryYear = expiryYear;
×
321
  }
×
322

323

324
  public PaymentMethodToStore holderName(String holderName) {
325
    this.holderName = holderName;
×
326
    return this;
×
327
  }
328

329
   /**
330
   * The name of the card holder.
331
   * @return holderName
332
  **/
333
  @ApiModelProperty(value = "The name of the card holder.")
334
  @JsonProperty(JSON_PROPERTY_HOLDER_NAME)
335
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
336

337
  public String getHolderName() {
338
    return holderName;
×
339
  }
340

341

342
 /**
343
  * The name of the card holder.
344
  *
345
  * @param holderName
346
  */ 
347
  @JsonProperty(JSON_PROPERTY_HOLDER_NAME)
348
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
349
  public void setHolderName(String holderName) {
350
    this.holderName = holderName;
×
351
  }
×
352

353

354
  public PaymentMethodToStore number(String number) {
355
    this.number = number;
×
356
    return this;
×
357
  }
358

359
   /**
360
   * The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
361
   * @return number
362
  **/
363
  @ApiModelProperty(value = "The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).")
364
  @JsonProperty(JSON_PROPERTY_NUMBER)
365
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
366

367
  public String getNumber() {
368
    return number;
×
369
  }
370

371

372
 /**
373
  * The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
374
  *
375
  * @param number
376
  */ 
377
  @JsonProperty(JSON_PROPERTY_NUMBER)
378
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
379
  public void setNumber(String number) {
380
    this.number = number;
×
381
  }
×
382

383

384
  public PaymentMethodToStore type(String type) {
NEW
385
    this.type = type;
×
NEW
386
    return this;
×
387
  }
388

389
   /**
390
   * Set to **scheme**.
391
   * @return type
392
  **/
393
  @ApiModelProperty(value = "Set to **scheme**.")
394
  @JsonProperty(JSON_PROPERTY_TYPE)
395
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
396

397
  public String getType() {
NEW
398
    return type;
×
399
  }
400

401

402
 /**
403
  * Set to **scheme**.
404
  *
405
  * @param type
406
  */ 
407
  @JsonProperty(JSON_PROPERTY_TYPE)
408
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
409
  public void setType(String type) {
NEW
410
    this.type = type;
×
NEW
411
  }
×
412

413

414
  /**
415
   * Return true if this PaymentMethodToStore object is equal to o.
416
   */
417
  @Override
418
  public boolean equals(Object o) {
419
    if (this == o) {
×
420
      return true;
×
421
    }
422
    if (o == null || getClass() != o.getClass()) {
×
423
      return false;
×
424
    }
425
    PaymentMethodToStore paymentMethodToStore = (PaymentMethodToStore) o;
×
426
    return Objects.equals(this.brand, paymentMethodToStore.brand) &&
×
427
        Objects.equals(this.cvc, paymentMethodToStore.cvc) &&
×
428
        Objects.equals(this.encryptedCardNumber, paymentMethodToStore.encryptedCardNumber) &&
×
429
        Objects.equals(this.encryptedExpiryMonth, paymentMethodToStore.encryptedExpiryMonth) &&
×
430
        Objects.equals(this.encryptedExpiryYear, paymentMethodToStore.encryptedExpiryYear) &&
×
431
        Objects.equals(this.encryptedSecurityCode, paymentMethodToStore.encryptedSecurityCode) &&
×
432
        Objects.equals(this.expiryMonth, paymentMethodToStore.expiryMonth) &&
×
433
        Objects.equals(this.expiryYear, paymentMethodToStore.expiryYear) &&
×
434
        Objects.equals(this.holderName, paymentMethodToStore.holderName) &&
×
NEW
435
        Objects.equals(this.number, paymentMethodToStore.number) &&
×
NEW
436
        Objects.equals(this.type, paymentMethodToStore.type);
×
437
  }
438

439
  @Override
440
  public int hashCode() {
NEW
441
    return Objects.hash(brand, cvc, encryptedCardNumber, encryptedExpiryMonth, encryptedExpiryYear, encryptedSecurityCode, expiryMonth, expiryYear, holderName, number, type);
×
442
  }
443

444
  @Override
445
  public String toString() {
446
    StringBuilder sb = new StringBuilder();
×
447
    sb.append("class PaymentMethodToStore {\n");
×
448
    sb.append("    brand: ").append(toIndentedString(brand)).append("\n");
×
449
    sb.append("    cvc: ").append(toIndentedString(cvc)).append("\n");
×
450
    sb.append("    encryptedCardNumber: ").append(toIndentedString(encryptedCardNumber)).append("\n");
×
451
    sb.append("    encryptedExpiryMonth: ").append(toIndentedString(encryptedExpiryMonth)).append("\n");
×
452
    sb.append("    encryptedExpiryYear: ").append(toIndentedString(encryptedExpiryYear)).append("\n");
×
453
    sb.append("    encryptedSecurityCode: ").append(toIndentedString(encryptedSecurityCode)).append("\n");
×
454
    sb.append("    expiryMonth: ").append(toIndentedString(expiryMonth)).append("\n");
×
455
    sb.append("    expiryYear: ").append(toIndentedString(expiryYear)).append("\n");
×
456
    sb.append("    holderName: ").append(toIndentedString(holderName)).append("\n");
×
457
    sb.append("    number: ").append(toIndentedString(number)).append("\n");
×
NEW
458
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
459
    sb.append("}");
×
460
    return sb.toString();
×
461
  }
462

463
  /**
464
   * Convert the given object to string with each line indented by 4 spaces
465
   * (except the first line).
466
   */
467
  private String toIndentedString(Object o) {
468
    if (o == null) {
×
469
      return "null";
×
470
    }
471
    return o.toString().replace("\n", "\n    ");
×
472
  }
473

474
/**
475
   * Create an instance of PaymentMethodToStore given an JSON string
476
   *
477
   * @param jsonString JSON string
478
   * @return An instance of PaymentMethodToStore
479
   * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentMethodToStore
480
   */
481
  public static PaymentMethodToStore fromJson(String jsonString) throws JsonProcessingException {
482
    return JSON.getMapper().readValue(jsonString, PaymentMethodToStore.class);
×
483
  }
484
/**
485
  * Convert an instance of PaymentMethodToStore to an JSON string
486
  *
487
  * @return JSON string
488
  */
489
  public String toJson() throws JsonProcessingException {
490
    return JSON.getMapper().writeValueAsString(this);
×
491
  }
492
}
493

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