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

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

27 Nov 2023 10:42AM UTC coverage: 12.858%. First build
#2879

push

web-flow
Merge 6520eafda into e27e7377f

6 of 461 new or added lines in 28 files covered. (1.3%)

12465 of 96943 relevant lines covered (12.86%)

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/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.StoredDetails;
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 java.util.ArrayList;
31
import java.util.HashMap;
32
import java.util.List;
33
import java.util.Map;
34
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
35
import com.fasterxml.jackson.core.JsonProcessingException;
36

37

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

55
public class RecurringDetail {
56
  public static final String JSON_PROPERTY_BRAND = "brand";
57
  private String brand;
58

59
  public static final String JSON_PROPERTY_BRANDS = "brands";
60
  private List<String> brands = null;
×
61

62
  public static final String JSON_PROPERTY_CONFIGURATION = "configuration";
63
  private Map<String, String> configuration = null;
×
64

65
  /**
66
   * The funding source of the payment method.
67
   */
68
  public enum FundingSourceEnum {
×
NEW
69
    CREDIT("credit"),
×
70
    
71
    DEBIT("debit");
×
72

73
    private String value;
74

75
    FundingSourceEnum(String value) {
×
76
      this.value = value;
×
77
    }
×
78

79
    @JsonValue
80
    public String getValue() {
81
      return value;
×
82
    }
83

84
    @Override
85
    public String toString() {
86
      return String.valueOf(value);
×
87
    }
88

89
    @JsonCreator
90
    public static FundingSourceEnum fromValue(String value) {
91
      for (FundingSourceEnum b : FundingSourceEnum.values()) {
×
92
        if (b.value.equals(value)) {
×
93
          return b;
×
94
        }
95
      }
96
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
97
    }
98
  }
99

100
  public static final String JSON_PROPERTY_FUNDING_SOURCE = "fundingSource";
101
  private FundingSourceEnum fundingSource;
102

103
  public static final String JSON_PROPERTY_GROUP = "group";
104
  private PaymentMethodGroup group;
105

106
  public static final String JSON_PROPERTY_INPUT_DETAILS = "inputDetails";
107
  private List<InputDetail> inputDetails = null;
×
108

109
  public static final String JSON_PROPERTY_ISSUERS = "issuers";
110
  private List<PaymentMethodIssuer> issuers = null;
×
111

112
  public static final String JSON_PROPERTY_NAME = "name";
113
  private String name;
114

115
  public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference";
116
  private String recurringDetailReference;
117

118
  public static final String JSON_PROPERTY_STORED_DETAILS = "storedDetails";
119
  private StoredDetails storedDetails;
120

121
  public static final String JSON_PROPERTY_TYPE = "type";
122
  private String type;
123

124
  public RecurringDetail() { 
×
125
  }
×
126

127
  public RecurringDetail brand(String brand) {
128
    this.brand = brand;
×
129
    return this;
×
130
  }
131

132
   /**
133
   * Brand for the selected gift card. For example: plastix, hmclub.
134
   * @return brand
135
  **/
136
  @ApiModelProperty(value = "Brand for the selected gift card. For example: plastix, hmclub.")
137
  @JsonProperty(JSON_PROPERTY_BRAND)
138
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
139

140
  public String getBrand() {
141
    return brand;
×
142
  }
143

144

145
  @JsonProperty(JSON_PROPERTY_BRAND)
146
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
147
  public void setBrand(String brand) {
148
    this.brand = brand;
×
149
  }
×
150

151

152
  public RecurringDetail brands(List<String> brands) {
153
    this.brands = brands;
×
154
    return this;
×
155
  }
156

157
  public RecurringDetail addBrandsItem(String brandsItem) {
158
    if (this.brands == null) {
×
159
      this.brands = new ArrayList<>();
×
160
    }
161
    this.brands.add(brandsItem);
×
162
    return this;
×
163
  }
164

165
   /**
166
   * List of possible brands. For example: visa, mc.
167
   * @return brands
168
  **/
169
  @ApiModelProperty(value = "List of possible brands. For example: visa, mc.")
170
  @JsonProperty(JSON_PROPERTY_BRANDS)
171
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
172

173
  public List<String> getBrands() {
174
    return brands;
×
175
  }
176

177

178
  @JsonProperty(JSON_PROPERTY_BRANDS)
179
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
180
  public void setBrands(List<String> brands) {
181
    this.brands = brands;
×
182
  }
×
183

184

185
  public RecurringDetail configuration(Map<String, String> configuration) {
186
    this.configuration = configuration;
×
187
    return this;
×
188
  }
189

190
  public RecurringDetail putConfigurationItem(String key, String configurationItem) {
191
    if (this.configuration == null) {
×
192
      this.configuration = new HashMap<>();
×
193
    }
194
    this.configuration.put(key, configurationItem);
×
195
    return this;
×
196
  }
197

198
   /**
199
   * The configuration of the payment method.
200
   * @return configuration
201
  **/
202
  @ApiModelProperty(value = "The configuration of the payment method.")
203
  @JsonProperty(JSON_PROPERTY_CONFIGURATION)
204
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
205

206
  public Map<String, String> getConfiguration() {
207
    return configuration;
×
208
  }
209

210

211
  @JsonProperty(JSON_PROPERTY_CONFIGURATION)
212
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
213
  public void setConfiguration(Map<String, String> configuration) {
214
    this.configuration = configuration;
×
215
  }
×
216

217

218
  public RecurringDetail fundingSource(FundingSourceEnum fundingSource) {
219
    this.fundingSource = fundingSource;
×
220
    return this;
×
221
  }
222

223
   /**
224
   * The funding source of the payment method.
225
   * @return fundingSource
226
  **/
227
  @ApiModelProperty(value = "The funding source of the payment method.")
228
  @JsonProperty(JSON_PROPERTY_FUNDING_SOURCE)
229
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
230

231
  public FundingSourceEnum getFundingSource() {
232
    return fundingSource;
×
233
  }
234

235

236
  @JsonProperty(JSON_PROPERTY_FUNDING_SOURCE)
237
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
238
  public void setFundingSource(FundingSourceEnum fundingSource) {
239
    this.fundingSource = fundingSource;
×
240
  }
×
241

242

243
  public RecurringDetail group(PaymentMethodGroup group) {
244
    this.group = group;
×
245
    return this;
×
246
  }
247

248
   /**
249
   * Get group
250
   * @return group
251
  **/
252
  @ApiModelProperty(value = "")
253
  @JsonProperty(JSON_PROPERTY_GROUP)
254
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
255

256
  public PaymentMethodGroup getGroup() {
257
    return group;
×
258
  }
259

260

261
  @JsonProperty(JSON_PROPERTY_GROUP)
262
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
263
  public void setGroup(PaymentMethodGroup group) {
264
    this.group = group;
×
265
  }
×
266

267

268
  public RecurringDetail inputDetails(List<InputDetail> inputDetails) {
269
    this.inputDetails = inputDetails;
×
270
    return this;
×
271
  }
272

273
  public RecurringDetail addInputDetailsItem(InputDetail inputDetailsItem) {
274
    if (this.inputDetails == null) {
×
275
      this.inputDetails = new ArrayList<>();
×
276
    }
277
    this.inputDetails.add(inputDetailsItem);
×
278
    return this;
×
279
  }
280

281
   /**
282
   * All input details to be provided to complete the payment with this payment method.
283
   * @return inputDetails
284
   * @deprecated
285
  **/
286
  @Deprecated
287
  @ApiModelProperty(value = "All input details to be provided to complete the payment with this payment method.")
288
  @JsonProperty(JSON_PROPERTY_INPUT_DETAILS)
289
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
290

291
  public List<InputDetail> getInputDetails() {
292
    return inputDetails;
×
293
  }
294

295

296
  @Deprecated
297
  @JsonProperty(JSON_PROPERTY_INPUT_DETAILS)
298
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
299
  public void setInputDetails(List<InputDetail> inputDetails) {
300
    this.inputDetails = inputDetails;
×
301
  }
×
302

303

304
  public RecurringDetail issuers(List<PaymentMethodIssuer> issuers) {
305
    this.issuers = issuers;
×
306
    return this;
×
307
  }
308

309
  public RecurringDetail addIssuersItem(PaymentMethodIssuer issuersItem) {
310
    if (this.issuers == null) {
×
311
      this.issuers = new ArrayList<>();
×
312
    }
313
    this.issuers.add(issuersItem);
×
314
    return this;
×
315
  }
316

317
   /**
318
   * A list of issuers for this payment method.
319
   * @return issuers
320
  **/
321
  @ApiModelProperty(value = "A list of issuers for this payment method.")
322
  @JsonProperty(JSON_PROPERTY_ISSUERS)
323
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
324

325
  public List<PaymentMethodIssuer> getIssuers() {
326
    return issuers;
×
327
  }
328

329

330
  @JsonProperty(JSON_PROPERTY_ISSUERS)
331
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
332
  public void setIssuers(List<PaymentMethodIssuer> issuers) {
333
    this.issuers = issuers;
×
334
  }
×
335

336

337
  public RecurringDetail name(String name) {
338
    this.name = name;
×
339
    return this;
×
340
  }
341

342
   /**
343
   * The displayable name of this payment method.
344
   * @return name
345
  **/
346
  @ApiModelProperty(value = "The displayable name of this payment method.")
347
  @JsonProperty(JSON_PROPERTY_NAME)
348
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
349

350
  public String getName() {
351
    return name;
×
352
  }
353

354

355
  @JsonProperty(JSON_PROPERTY_NAME)
356
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
357
  public void setName(String name) {
358
    this.name = name;
×
359
  }
×
360

361

362
  public RecurringDetail recurringDetailReference(String recurringDetailReference) {
363
    this.recurringDetailReference = recurringDetailReference;
×
364
    return this;
×
365
  }
366

367
   /**
368
   * The reference that uniquely identifies the recurring detail.
369
   * @return recurringDetailReference
370
  **/
371
  @ApiModelProperty(value = "The reference that uniquely identifies the recurring detail.")
372
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
373
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
374

375
  public String getRecurringDetailReference() {
376
    return recurringDetailReference;
×
377
  }
378

379

380
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
381
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
382
  public void setRecurringDetailReference(String recurringDetailReference) {
383
    this.recurringDetailReference = recurringDetailReference;
×
384
  }
×
385

386

387
  public RecurringDetail storedDetails(StoredDetails storedDetails) {
388
    this.storedDetails = storedDetails;
×
389
    return this;
×
390
  }
391

392
   /**
393
   * Get storedDetails
394
   * @return storedDetails
395
  **/
396
  @ApiModelProperty(value = "")
397
  @JsonProperty(JSON_PROPERTY_STORED_DETAILS)
398
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
399

400
  public StoredDetails getStoredDetails() {
401
    return storedDetails;
×
402
  }
403

404

405
  @JsonProperty(JSON_PROPERTY_STORED_DETAILS)
406
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
407
  public void setStoredDetails(StoredDetails storedDetails) {
408
    this.storedDetails = storedDetails;
×
409
  }
×
410

411

412
  public RecurringDetail type(String type) {
413
    this.type = type;
×
414
    return this;
×
415
  }
416

417
   /**
418
   * The unique payment method code.
419
   * @return type
420
  **/
421
  @ApiModelProperty(value = "The unique payment method code.")
422
  @JsonProperty(JSON_PROPERTY_TYPE)
423
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
424

425
  public String getType() {
426
    return type;
×
427
  }
428

429

430
  @JsonProperty(JSON_PROPERTY_TYPE)
431
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
432
  public void setType(String type) {
433
    this.type = type;
×
434
  }
×
435

436

437
  /**
438
   * Return true if this RecurringDetail object is equal to o.
439
   */
440
  @Override
441
  public boolean equals(Object o) {
442
    if (this == o) {
×
443
      return true;
×
444
    }
445
    if (o == null || getClass() != o.getClass()) {
×
446
      return false;
×
447
    }
448
    RecurringDetail recurringDetail = (RecurringDetail) o;
×
449
    return Objects.equals(this.brand, recurringDetail.brand) &&
×
450
        Objects.equals(this.brands, recurringDetail.brands) &&
×
451
        Objects.equals(this.configuration, recurringDetail.configuration) &&
×
452
        Objects.equals(this.fundingSource, recurringDetail.fundingSource) &&
×
453
        Objects.equals(this.group, recurringDetail.group) &&
×
454
        Objects.equals(this.inputDetails, recurringDetail.inputDetails) &&
×
455
        Objects.equals(this.issuers, recurringDetail.issuers) &&
×
456
        Objects.equals(this.name, recurringDetail.name) &&
×
457
        Objects.equals(this.recurringDetailReference, recurringDetail.recurringDetailReference) &&
×
458
        Objects.equals(this.storedDetails, recurringDetail.storedDetails) &&
×
459
        Objects.equals(this.type, recurringDetail.type);
×
460
  }
461

462
  @Override
463
  public int hashCode() {
464
    return Objects.hash(brand, brands, configuration, fundingSource, group, inputDetails, issuers, name, recurringDetailReference, storedDetails, type);
×
465
  }
466

467
  @Override
468
  public String toString() {
469
    StringBuilder sb = new StringBuilder();
×
470
    sb.append("class RecurringDetail {\n");
×
471
    sb.append("    brand: ").append(toIndentedString(brand)).append("\n");
×
472
    sb.append("    brands: ").append(toIndentedString(brands)).append("\n");
×
473
    sb.append("    configuration: ").append(toIndentedString(configuration)).append("\n");
×
474
    sb.append("    fundingSource: ").append(toIndentedString(fundingSource)).append("\n");
×
475
    sb.append("    group: ").append(toIndentedString(group)).append("\n");
×
476
    sb.append("    inputDetails: ").append(toIndentedString(inputDetails)).append("\n");
×
477
    sb.append("    issuers: ").append(toIndentedString(issuers)).append("\n");
×
478
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
×
479
    sb.append("    recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n");
×
480
    sb.append("    storedDetails: ").append(toIndentedString(storedDetails)).append("\n");
×
481
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
482
    sb.append("}");
×
483
    return sb.toString();
×
484
  }
485

486
  /**
487
   * Convert the given object to string with each line indented by 4 spaces
488
   * (except the first line).
489
   */
490
  private String toIndentedString(Object o) {
491
    if (o == null) {
×
492
      return "null";
×
493
    }
494
    return o.toString().replace("\n", "\n    ");
×
495
  }
496

497
/**
498
   * Create an instance of RecurringDetail given an JSON string
499
   *
500
   * @param jsonString JSON string
501
   * @return An instance of RecurringDetail
502
   * @throws JsonProcessingException if the JSON string is invalid with respect to RecurringDetail
503
   */
504
  public static RecurringDetail fromJson(String jsonString) throws JsonProcessingException {
505
    return JSON.getMapper().readValue(jsonString, RecurringDetail.class);
×
506
  }
507
/**
508
  * Convert an instance of RecurringDetail to an JSON string
509
  *
510
  * @return JSON string
511
  */
512
  public String toJson() throws JsonProcessingException {
513
    return JSON.getMapper().writeValueAsString(this);
×
514
  }
515
}
516

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