• 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/RecurringDetail.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.adyen.model.checkout.InputDetail;
20
import com.adyen.model.checkout.PaymentMethodGroup;
21
import com.adyen.model.checkout.PaymentMethodIssuer;
22
import com.adyen.model.checkout.PaymentMethodUPIApps;
23
import com.adyen.model.checkout.StoredDetails;
24
import com.fasterxml.jackson.annotation.JsonInclude;
25
import com.fasterxml.jackson.annotation.JsonProperty;
26
import com.fasterxml.jackson.annotation.JsonCreator;
27
import com.fasterxml.jackson.annotation.JsonTypeName;
28
import com.fasterxml.jackson.annotation.JsonValue;
29
import io.swagger.annotations.ApiModel;
30
import io.swagger.annotations.ApiModelProperty;
31
import java.util.ArrayList;
32
import java.util.HashMap;
33
import java.util.List;
34
import java.util.Map;
35
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
36
import com.fasterxml.jackson.core.JsonProcessingException;
37

38

39
/**
40
 * RecurringDetail
41
 */
42
@JsonPropertyOrder({
43
  RecurringDetail.JSON_PROPERTY_APPS,
44
  RecurringDetail.JSON_PROPERTY_BRAND,
45
  RecurringDetail.JSON_PROPERTY_BRANDS,
46
  RecurringDetail.JSON_PROPERTY_CONFIGURATION,
47
  RecurringDetail.JSON_PROPERTY_FUNDING_SOURCE,
48
  RecurringDetail.JSON_PROPERTY_GROUP,
49
  RecurringDetail.JSON_PROPERTY_INPUT_DETAILS,
50
  RecurringDetail.JSON_PROPERTY_ISSUERS,
51
  RecurringDetail.JSON_PROPERTY_NAME,
52
  RecurringDetail.JSON_PROPERTY_RECURRING_DETAIL_REFERENCE,
53
  RecurringDetail.JSON_PROPERTY_STORED_DETAILS,
54
  RecurringDetail.JSON_PROPERTY_TYPE
55
})
56

57
public class RecurringDetail {
58
  public static final String JSON_PROPERTY_APPS = "apps";
NEW
59
  private List<PaymentMethodUPIApps> apps = null;
×
60

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

64
  public static final String JSON_PROPERTY_BRANDS = "brands";
65
  private List<String> brands = null;
×
66

67
  public static final String JSON_PROPERTY_CONFIGURATION = "configuration";
68
  private Map<String, String> configuration = null;
×
69

70
  /**
71
   * The funding source of the payment method.
72
   */
73
  public enum FundingSourceEnum {
×
74
    CREDIT("credit"),
×
75
    
76
    DEBIT("debit");
×
77

78
    private String value;
79

80
    FundingSourceEnum(String value) {
×
81
      this.value = value;
×
82
    }
×
83

84
    @JsonValue
85
    public String getValue() {
86
      return value;
×
87
    }
88

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

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

105
  public static final String JSON_PROPERTY_FUNDING_SOURCE = "fundingSource";
106
  private FundingSourceEnum fundingSource;
107

108
  public static final String JSON_PROPERTY_GROUP = "group";
109
  private PaymentMethodGroup group;
110

111
  public static final String JSON_PROPERTY_INPUT_DETAILS = "inputDetails";
112
  @Deprecated
×
113
  private List<InputDetail> inputDetails = null;
114

115
  public static final String JSON_PROPERTY_ISSUERS = "issuers";
116
  private List<PaymentMethodIssuer> issuers = null;
×
117

118
  public static final String JSON_PROPERTY_NAME = "name";
119
  private String name;
120

121
  public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference";
122
  private String recurringDetailReference;
123

124
  public static final String JSON_PROPERTY_STORED_DETAILS = "storedDetails";
125
  private StoredDetails storedDetails;
126

127
  public static final String JSON_PROPERTY_TYPE = "type";
128
  private String type;
129

130
  public RecurringDetail() { 
×
131
  }
×
132

133
  public RecurringDetail apps(List<PaymentMethodUPIApps> apps) {
NEW
134
    this.apps = apps;
×
NEW
135
    return this;
×
136
  }
137

138
  public RecurringDetail addAppsItem(PaymentMethodUPIApps appsItem) {
NEW
139
    if (this.apps == null) {
×
NEW
140
      this.apps = new ArrayList<>();
×
141
    }
NEW
142
    this.apps.add(appsItem);
×
NEW
143
    return this;
×
144
  }
145

146
   /**
147
   * A list of apps for this payment method.
148
   * @return apps
149
  **/
150
  @ApiModelProperty(value = "A list of apps for this payment method.")
151
  @JsonProperty(JSON_PROPERTY_APPS)
152
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
153

154
  public List<PaymentMethodUPIApps> getApps() {
NEW
155
    return apps;
×
156
  }
157

158

159
 /**
160
  * A list of apps for this payment method.
161
  *
162
  * @param apps
163
  */ 
164
  @JsonProperty(JSON_PROPERTY_APPS)
165
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
166
  public void setApps(List<PaymentMethodUPIApps> apps) {
NEW
167
    this.apps = apps;
×
NEW
168
  }
×
169

170

171
  public RecurringDetail brand(String brand) {
172
    this.brand = brand;
×
173
    return this;
×
174
  }
175

176
   /**
177
   * Brand for the selected gift card. For example: plastix, hmclub.
178
   * @return brand
179
  **/
180
  @ApiModelProperty(value = "Brand for the selected gift card. For example: plastix, hmclub.")
181
  @JsonProperty(JSON_PROPERTY_BRAND)
182
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
183

184
  public String getBrand() {
185
    return brand;
×
186
  }
187

188

189
 /**
190
  * Brand for the selected gift card. For example: plastix, hmclub.
191
  *
192
  * @param brand
193
  */ 
194
  @JsonProperty(JSON_PROPERTY_BRAND)
195
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
196
  public void setBrand(String brand) {
197
    this.brand = brand;
×
198
  }
×
199

200

201
  public RecurringDetail brands(List<String> brands) {
202
    this.brands = brands;
×
203
    return this;
×
204
  }
205

206
  public RecurringDetail addBrandsItem(String brandsItem) {
207
    if (this.brands == null) {
×
208
      this.brands = new ArrayList<>();
×
209
    }
210
    this.brands.add(brandsItem);
×
211
    return this;
×
212
  }
213

214
   /**
215
   * List of possible brands. For example: visa, mc.
216
   * @return brands
217
  **/
218
  @ApiModelProperty(value = "List of possible brands. For example: visa, mc.")
219
  @JsonProperty(JSON_PROPERTY_BRANDS)
220
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
221

222
  public List<String> getBrands() {
223
    return brands;
×
224
  }
225

226

227
 /**
228
  * List of possible brands. For example: visa, mc.
229
  *
230
  * @param brands
231
  */ 
232
  @JsonProperty(JSON_PROPERTY_BRANDS)
233
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
234
  public void setBrands(List<String> brands) {
235
    this.brands = brands;
×
236
  }
×
237

238

239
  public RecurringDetail configuration(Map<String, String> configuration) {
240
    this.configuration = configuration;
×
241
    return this;
×
242
  }
243

244
  public RecurringDetail putConfigurationItem(String key, String configurationItem) {
245
    if (this.configuration == null) {
×
246
      this.configuration = new HashMap<>();
×
247
    }
248
    this.configuration.put(key, configurationItem);
×
249
    return this;
×
250
  }
251

252
   /**
253
   * The configuration of the payment method.
254
   * @return configuration
255
  **/
256
  @ApiModelProperty(value = "The configuration of the payment method.")
257
  @JsonProperty(JSON_PROPERTY_CONFIGURATION)
258
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
259

260
  public Map<String, String> getConfiguration() {
261
    return configuration;
×
262
  }
263

264

265
 /**
266
  * The configuration of the payment method.
267
  *
268
  * @param configuration
269
  */ 
270
  @JsonProperty(JSON_PROPERTY_CONFIGURATION)
271
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
272
  public void setConfiguration(Map<String, String> configuration) {
273
    this.configuration = configuration;
×
274
  }
×
275

276

277
  public RecurringDetail fundingSource(FundingSourceEnum fundingSource) {
278
    this.fundingSource = fundingSource;
×
279
    return this;
×
280
  }
281

282
   /**
283
   * The funding source of the payment method.
284
   * @return fundingSource
285
  **/
286
  @ApiModelProperty(value = "The funding source of the payment method.")
287
  @JsonProperty(JSON_PROPERTY_FUNDING_SOURCE)
288
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
289

290
  public FundingSourceEnum getFundingSource() {
291
    return fundingSource;
×
292
  }
293

294

295
 /**
296
  * The funding source of the payment method.
297
  *
298
  * @param fundingSource
299
  */ 
300
  @JsonProperty(JSON_PROPERTY_FUNDING_SOURCE)
301
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
302
  public void setFundingSource(FundingSourceEnum fundingSource) {
303
    this.fundingSource = fundingSource;
×
304
  }
×
305

306

307
  public RecurringDetail group(PaymentMethodGroup group) {
308
    this.group = group;
×
309
    return this;
×
310
  }
311

312
   /**
313
   * Get group
314
   * @return group
315
  **/
316
  @ApiModelProperty(value = "")
317
  @JsonProperty(JSON_PROPERTY_GROUP)
318
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
319

320
  public PaymentMethodGroup getGroup() {
321
    return group;
×
322
  }
323

324

325
 /**
326
  * group
327
  *
328
  * @param group
329
  */ 
330
  @JsonProperty(JSON_PROPERTY_GROUP)
331
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
332
  public void setGroup(PaymentMethodGroup group) {
333
    this.group = group;
×
334
  }
×
335

336

337
  @Deprecated
338
  public RecurringDetail inputDetails(List<InputDetail> inputDetails) {
339
    this.inputDetails = inputDetails;
×
340
    return this;
×
341
  }
342

343
  public RecurringDetail addInputDetailsItem(InputDetail inputDetailsItem) {
344
    if (this.inputDetails == null) {
×
345
      this.inputDetails = new ArrayList<>();
×
346
    }
347
    this.inputDetails.add(inputDetailsItem);
×
348
    return this;
×
349
  }
350

351
   /**
352
   * All input details to be provided to complete the payment with this payment method.
353
   * @return inputDetails
354
   * @deprecated
355
  **/
356
  @Deprecated
357
  @ApiModelProperty(value = "All input details to be provided to complete the payment with this payment method.")
358
  @JsonProperty(JSON_PROPERTY_INPUT_DETAILS)
359
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
360

361
  public List<InputDetail> getInputDetails() {
362
    return inputDetails;
×
363
  }
364

365

366
 /**
367
  * All input details to be provided to complete the payment with this payment method.
368
  *
369
  * @param inputDetails
370
  */ 
371
  @Deprecated
372
  @JsonProperty(JSON_PROPERTY_INPUT_DETAILS)
373
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
374
  public void setInputDetails(List<InputDetail> inputDetails) {
375
    this.inputDetails = inputDetails;
×
376
  }
×
377

378

379
  public RecurringDetail issuers(List<PaymentMethodIssuer> issuers) {
380
    this.issuers = issuers;
×
381
    return this;
×
382
  }
383

384
  public RecurringDetail addIssuersItem(PaymentMethodIssuer issuersItem) {
385
    if (this.issuers == null) {
×
386
      this.issuers = new ArrayList<>();
×
387
    }
388
    this.issuers.add(issuersItem);
×
389
    return this;
×
390
  }
391

392
   /**
393
   * A list of issuers for this payment method.
394
   * @return issuers
395
  **/
396
  @ApiModelProperty(value = "A list of issuers for this payment method.")
397
  @JsonProperty(JSON_PROPERTY_ISSUERS)
398
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
399

400
  public List<PaymentMethodIssuer> getIssuers() {
401
    return issuers;
×
402
  }
403

404

405
 /**
406
  * A list of issuers for this payment method.
407
  *
408
  * @param issuers
409
  */ 
410
  @JsonProperty(JSON_PROPERTY_ISSUERS)
411
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
412
  public void setIssuers(List<PaymentMethodIssuer> issuers) {
413
    this.issuers = issuers;
×
414
  }
×
415

416

417
  public RecurringDetail name(String name) {
418
    this.name = name;
×
419
    return this;
×
420
  }
421

422
   /**
423
   * The displayable name of this payment method.
424
   * @return name
425
  **/
426
  @ApiModelProperty(value = "The displayable name of this payment method.")
427
  @JsonProperty(JSON_PROPERTY_NAME)
428
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
429

430
  public String getName() {
431
    return name;
×
432
  }
433

434

435
 /**
436
  * The displayable name of this payment method.
437
  *
438
  * @param name
439
  */ 
440
  @JsonProperty(JSON_PROPERTY_NAME)
441
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
442
  public void setName(String name) {
443
    this.name = name;
×
444
  }
×
445

446

447
  public RecurringDetail recurringDetailReference(String recurringDetailReference) {
448
    this.recurringDetailReference = recurringDetailReference;
×
449
    return this;
×
450
  }
451

452
   /**
453
   * The reference that uniquely identifies the recurring detail.
454
   * @return recurringDetailReference
455
  **/
456
  @ApiModelProperty(value = "The reference that uniquely identifies the recurring detail.")
457
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
458
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
459

460
  public String getRecurringDetailReference() {
461
    return recurringDetailReference;
×
462
  }
463

464

465
 /**
466
  * The reference that uniquely identifies the recurring detail.
467
  *
468
  * @param recurringDetailReference
469
  */ 
470
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
471
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
472
  public void setRecurringDetailReference(String recurringDetailReference) {
473
    this.recurringDetailReference = recurringDetailReference;
×
474
  }
×
475

476

477
  public RecurringDetail storedDetails(StoredDetails storedDetails) {
478
    this.storedDetails = storedDetails;
×
479
    return this;
×
480
  }
481

482
   /**
483
   * Get storedDetails
484
   * @return storedDetails
485
  **/
486
  @ApiModelProperty(value = "")
487
  @JsonProperty(JSON_PROPERTY_STORED_DETAILS)
488
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
489

490
  public StoredDetails getStoredDetails() {
491
    return storedDetails;
×
492
  }
493

494

495
 /**
496
  * storedDetails
497
  *
498
  * @param storedDetails
499
  */ 
500
  @JsonProperty(JSON_PROPERTY_STORED_DETAILS)
501
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
502
  public void setStoredDetails(StoredDetails storedDetails) {
503
    this.storedDetails = storedDetails;
×
504
  }
×
505

506

507
  public RecurringDetail type(String type) {
508
    this.type = type;
×
509
    return this;
×
510
  }
511

512
   /**
513
   * The unique payment method code.
514
   * @return type
515
  **/
516
  @ApiModelProperty(value = "The unique payment method code.")
517
  @JsonProperty(JSON_PROPERTY_TYPE)
518
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
519

520
  public String getType() {
521
    return type;
×
522
  }
523

524

525
 /**
526
  * The unique payment method code.
527
  *
528
  * @param type
529
  */ 
530
  @JsonProperty(JSON_PROPERTY_TYPE)
531
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
532
  public void setType(String type) {
533
    this.type = type;
×
534
  }
×
535

536

537
  /**
538
   * Return true if this RecurringDetail object is equal to o.
539
   */
540
  @Override
541
  public boolean equals(Object o) {
542
    if (this == o) {
×
543
      return true;
×
544
    }
545
    if (o == null || getClass() != o.getClass()) {
×
546
      return false;
×
547
    }
548
    RecurringDetail recurringDetail = (RecurringDetail) o;
×
NEW
549
    return Objects.equals(this.apps, recurringDetail.apps) &&
×
NEW
550
        Objects.equals(this.brand, recurringDetail.brand) &&
×
551
        Objects.equals(this.brands, recurringDetail.brands) &&
×
552
        Objects.equals(this.configuration, recurringDetail.configuration) &&
×
553
        Objects.equals(this.fundingSource, recurringDetail.fundingSource) &&
×
554
        Objects.equals(this.group, recurringDetail.group) &&
×
555
        Objects.equals(this.inputDetails, recurringDetail.inputDetails) &&
×
556
        Objects.equals(this.issuers, recurringDetail.issuers) &&
×
557
        Objects.equals(this.name, recurringDetail.name) &&
×
558
        Objects.equals(this.recurringDetailReference, recurringDetail.recurringDetailReference) &&
×
559
        Objects.equals(this.storedDetails, recurringDetail.storedDetails) &&
×
560
        Objects.equals(this.type, recurringDetail.type);
×
561
  }
562

563
  @Override
564
  public int hashCode() {
NEW
565
    return Objects.hash(apps, brand, brands, configuration, fundingSource, group, inputDetails, issuers, name, recurringDetailReference, storedDetails, type);
×
566
  }
567

568
  @Override
569
  public String toString() {
570
    StringBuilder sb = new StringBuilder();
×
571
    sb.append("class RecurringDetail {\n");
×
NEW
572
    sb.append("    apps: ").append(toIndentedString(apps)).append("\n");
×
573
    sb.append("    brand: ").append(toIndentedString(brand)).append("\n");
×
574
    sb.append("    brands: ").append(toIndentedString(brands)).append("\n");
×
575
    sb.append("    configuration: ").append(toIndentedString(configuration)).append("\n");
×
576
    sb.append("    fundingSource: ").append(toIndentedString(fundingSource)).append("\n");
×
577
    sb.append("    group: ").append(toIndentedString(group)).append("\n");
×
578
    sb.append("    inputDetails: ").append(toIndentedString(inputDetails)).append("\n");
×
579
    sb.append("    issuers: ").append(toIndentedString(issuers)).append("\n");
×
580
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
×
581
    sb.append("    recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n");
×
582
    sb.append("    storedDetails: ").append(toIndentedString(storedDetails)).append("\n");
×
583
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
584
    sb.append("}");
×
585
    return sb.toString();
×
586
  }
587

588
  /**
589
   * Convert the given object to string with each line indented by 4 spaces
590
   * (except the first line).
591
   */
592
  private String toIndentedString(Object o) {
593
    if (o == null) {
×
594
      return "null";
×
595
    }
596
    return o.toString().replace("\n", "\n    ");
×
597
  }
598

599
/**
600
   * Create an instance of RecurringDetail given an JSON string
601
   *
602
   * @param jsonString JSON string
603
   * @return An instance of RecurringDetail
604
   * @throws JsonProcessingException if the JSON string is invalid with respect to RecurringDetail
605
   */
606
  public static RecurringDetail fromJson(String jsonString) throws JsonProcessingException {
607
    return JSON.getMapper().readValue(jsonString, RecurringDetail.class);
×
608
  }
609
/**
610
  * Convert an instance of RecurringDetail to an JSON string
611
  *
612
  * @return JSON string
613
  */
614
  public String toJson() throws JsonProcessingException {
615
    return JSON.getMapper().writeValueAsString(this);
×
616
  }
617
}
618

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