• 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

13.1
/src/main/java/com/adyen/model/checkout/BacsDirectDebitDetails.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
 * BacsDirectDebitDetails
32
 */
33
@JsonPropertyOrder({
34
  BacsDirectDebitDetails.JSON_PROPERTY_BANK_ACCOUNT_NUMBER,
35
  BacsDirectDebitDetails.JSON_PROPERTY_BANK_LOCATION_ID,
36
  BacsDirectDebitDetails.JSON_PROPERTY_CHECKOUT_ATTEMPT_ID,
37
  BacsDirectDebitDetails.JSON_PROPERTY_HOLDER_NAME,
38
  BacsDirectDebitDetails.JSON_PROPERTY_RECURRING_DETAIL_REFERENCE,
39
  BacsDirectDebitDetails.JSON_PROPERTY_STORED_PAYMENT_METHOD_ID,
40
  BacsDirectDebitDetails.JSON_PROPERTY_SUBTYPE,
41
  BacsDirectDebitDetails.JSON_PROPERTY_TYPE
42
})
43

44
public class BacsDirectDebitDetails {
45
  public static final String JSON_PROPERTY_BANK_ACCOUNT_NUMBER = "bankAccountNumber";
46
  private String bankAccountNumber;
47

48
  public static final String JSON_PROPERTY_BANK_LOCATION_ID = "bankLocationId";
49
  private String bankLocationId;
50

51
  public static final String JSON_PROPERTY_CHECKOUT_ATTEMPT_ID = "checkoutAttemptId";
52
  private String checkoutAttemptId;
53

54
  public static final String JSON_PROPERTY_HOLDER_NAME = "holderName";
55
  private String holderName;
56

57
  public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference";
58
  @Deprecated
59
  private String recurringDetailReference;
60

61
  public static final String JSON_PROPERTY_STORED_PAYMENT_METHOD_ID = "storedPaymentMethodId";
62
  private String storedPaymentMethodId;
63

64
  public static final String JSON_PROPERTY_SUBTYPE = "subtype";
65
  private String subtype;
66

67
  /**
68
   * **directdebit_GB**
69
   */
70
  public enum TypeEnum {
1✔
71
    DIRECTDEBIT_GB("directdebit_GB");
1✔
72

73
    private String value;
74

75
    TypeEnum(String value) {
1✔
76
      this.value = value;
1✔
77
    }
1✔
78

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

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

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

100
  public static final String JSON_PROPERTY_TYPE = "type";
101
  private TypeEnum type;
102

103
  public BacsDirectDebitDetails() { 
1✔
104
  }
1✔
105

106
  public BacsDirectDebitDetails bankAccountNumber(String bankAccountNumber) {
107
    this.bankAccountNumber = bankAccountNumber;
×
108
    return this;
×
109
  }
110

111
   /**
112
   * The bank account number (without separators).
113
   * @return bankAccountNumber
114
  **/
115
  @ApiModelProperty(value = "The bank account number (without separators).")
116
  @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_NUMBER)
117
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
118

119
  public String getBankAccountNumber() {
120
    return bankAccountNumber;
×
121
  }
122

123

124
 /**
125
  * The bank account number (without separators).
126
  *
127
  * @param bankAccountNumber
128
  */ 
129
  @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_NUMBER)
130
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
131
  public void setBankAccountNumber(String bankAccountNumber) {
132
    this.bankAccountNumber = bankAccountNumber;
×
133
  }
×
134

135

136
  public BacsDirectDebitDetails bankLocationId(String bankLocationId) {
137
    this.bankLocationId = bankLocationId;
×
138
    return this;
×
139
  }
140

141
   /**
142
   * The bank routing number of the account.
143
   * @return bankLocationId
144
  **/
145
  @ApiModelProperty(value = "The bank routing number of the account.")
146
  @JsonProperty(JSON_PROPERTY_BANK_LOCATION_ID)
147
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
148

149
  public String getBankLocationId() {
150
    return bankLocationId;
×
151
  }
152

153

154
 /**
155
  * The bank routing number of the account.
156
  *
157
  * @param bankLocationId
158
  */ 
159
  @JsonProperty(JSON_PROPERTY_BANK_LOCATION_ID)
160
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
161
  public void setBankLocationId(String bankLocationId) {
162
    this.bankLocationId = bankLocationId;
×
163
  }
×
164

165

166
  public BacsDirectDebitDetails checkoutAttemptId(String checkoutAttemptId) {
167
    this.checkoutAttemptId = checkoutAttemptId;
×
168
    return this;
×
169
  }
170

171
   /**
172
   * The checkout attempt identifier.
173
   * @return checkoutAttemptId
174
  **/
175
  @ApiModelProperty(value = "The checkout attempt identifier.")
176
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
177
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
178

179
  public String getCheckoutAttemptId() {
180
    return checkoutAttemptId;
×
181
  }
182

183

184
 /**
185
  * The checkout attempt identifier.
186
  *
187
  * @param checkoutAttemptId
188
  */ 
189
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
190
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
191
  public void setCheckoutAttemptId(String checkoutAttemptId) {
192
    this.checkoutAttemptId = checkoutAttemptId;
×
193
  }
×
194

195

196
  public BacsDirectDebitDetails holderName(String holderName) {
197
    this.holderName = holderName;
×
198
    return this;
×
199
  }
200

201
   /**
202
   * The name of the bank account holder.
203
   * @return holderName
204
  **/
205
  @ApiModelProperty(value = "The name of the bank account holder.")
206
  @JsonProperty(JSON_PROPERTY_HOLDER_NAME)
207
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
208

209
  public String getHolderName() {
210
    return holderName;
×
211
  }
212

213

214
 /**
215
  * The name of the bank account holder.
216
  *
217
  * @param holderName
218
  */ 
219
  @JsonProperty(JSON_PROPERTY_HOLDER_NAME)
220
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
221
  public void setHolderName(String holderName) {
222
    this.holderName = holderName;
×
223
  }
×
224

225

226
  @Deprecated
227
  public BacsDirectDebitDetails recurringDetailReference(String recurringDetailReference) {
228
    this.recurringDetailReference = recurringDetailReference;
×
229
    return this;
×
230
  }
231

232
   /**
233
   * This is the `recurringDetailReference` returned in the response when you created the token.
234
   * @return recurringDetailReference
235
   * @deprecated
236
  **/
237
  @Deprecated
238
  @ApiModelProperty(value = "This is the `recurringDetailReference` returned in the response when you created the token.")
239
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
240
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
241

242
  public String getRecurringDetailReference() {
243
    return recurringDetailReference;
×
244
  }
245

246

247
 /**
248
  * This is the `recurringDetailReference` returned in the response when you created the token.
249
  *
250
  * @param recurringDetailReference
251
  */ 
252
  @Deprecated
253
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
254
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
255
  public void setRecurringDetailReference(String recurringDetailReference) {
256
    this.recurringDetailReference = recurringDetailReference;
×
257
  }
×
258

259

260
  public BacsDirectDebitDetails storedPaymentMethodId(String storedPaymentMethodId) {
261
    this.storedPaymentMethodId = storedPaymentMethodId;
×
262
    return this;
×
263
  }
264

265
   /**
266
   * This is the `recurringDetailReference` returned in the response when you created the token.
267
   * @return storedPaymentMethodId
268
  **/
269
  @ApiModelProperty(value = "This is the `recurringDetailReference` returned in the response when you created the token.")
270
  @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID)
271
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
272

273
  public String getStoredPaymentMethodId() {
274
    return storedPaymentMethodId;
×
275
  }
276

277

278
 /**
279
  * This is the `recurringDetailReference` returned in the response when you created the token.
280
  *
281
  * @param storedPaymentMethodId
282
  */ 
283
  @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID)
284
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
285
  public void setStoredPaymentMethodId(String storedPaymentMethodId) {
286
    this.storedPaymentMethodId = storedPaymentMethodId;
×
287
  }
×
288

289

290
  public BacsDirectDebitDetails subtype(String subtype) {
NEW
291
    this.subtype = subtype;
×
NEW
292
    return this;
×
293
  }
294

295
   /**
296
   * The payment method subtype.
297
   * @return subtype
298
  **/
299
  @ApiModelProperty(value = "The payment method subtype.")
300
  @JsonProperty(JSON_PROPERTY_SUBTYPE)
301
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
302

303
  public String getSubtype() {
NEW
304
    return subtype;
×
305
  }
306

307

308
 /**
309
  * The payment method subtype.
310
  *
311
  * @param subtype
312
  */ 
313
  @JsonProperty(JSON_PROPERTY_SUBTYPE)
314
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
315
  public void setSubtype(String subtype) {
NEW
316
    this.subtype = subtype;
×
NEW
317
  }
×
318

319

320
  public BacsDirectDebitDetails type(TypeEnum type) {
321
    this.type = type;
×
322
    return this;
×
323
  }
324

325
   /**
326
   * **directdebit_GB**
327
   * @return type
328
  **/
329
  @ApiModelProperty(value = "**directdebit_GB**")
330
  @JsonProperty(JSON_PROPERTY_TYPE)
331
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
332

333
  public TypeEnum getType() {
334
    return type;
×
335
  }
336

337

338
 /**
339
  * **directdebit_GB**
340
  *
341
  * @param type
342
  */ 
343
  @JsonProperty(JSON_PROPERTY_TYPE)
344
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
345
  public void setType(TypeEnum type) {
346
    this.type = type;
×
347
  }
×
348

349

350
  /**
351
   * Return true if this BacsDirectDebitDetails object is equal to o.
352
   */
353
  @Override
354
  public boolean equals(Object o) {
355
    if (this == o) {
×
356
      return true;
×
357
    }
358
    if (o == null || getClass() != o.getClass()) {
×
359
      return false;
×
360
    }
361
    BacsDirectDebitDetails bacsDirectDebitDetails = (BacsDirectDebitDetails) o;
×
362
    return Objects.equals(this.bankAccountNumber, bacsDirectDebitDetails.bankAccountNumber) &&
×
363
        Objects.equals(this.bankLocationId, bacsDirectDebitDetails.bankLocationId) &&
×
364
        Objects.equals(this.checkoutAttemptId, bacsDirectDebitDetails.checkoutAttemptId) &&
×
365
        Objects.equals(this.holderName, bacsDirectDebitDetails.holderName) &&
×
366
        Objects.equals(this.recurringDetailReference, bacsDirectDebitDetails.recurringDetailReference) &&
×
367
        Objects.equals(this.storedPaymentMethodId, bacsDirectDebitDetails.storedPaymentMethodId) &&
×
NEW
368
        Objects.equals(this.subtype, bacsDirectDebitDetails.subtype) &&
×
369
        Objects.equals(this.type, bacsDirectDebitDetails.type);
×
370
  }
371

372
  @Override
373
  public int hashCode() {
NEW
374
    return Objects.hash(bankAccountNumber, bankLocationId, checkoutAttemptId, holderName, recurringDetailReference, storedPaymentMethodId, subtype, type);
×
375
  }
376

377
  @Override
378
  public String toString() {
379
    StringBuilder sb = new StringBuilder();
×
380
    sb.append("class BacsDirectDebitDetails {\n");
×
381
    sb.append("    bankAccountNumber: ").append(toIndentedString(bankAccountNumber)).append("\n");
×
382
    sb.append("    bankLocationId: ").append(toIndentedString(bankLocationId)).append("\n");
×
383
    sb.append("    checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n");
×
384
    sb.append("    holderName: ").append(toIndentedString(holderName)).append("\n");
×
385
    sb.append("    recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n");
×
386
    sb.append("    storedPaymentMethodId: ").append(toIndentedString(storedPaymentMethodId)).append("\n");
×
NEW
387
    sb.append("    subtype: ").append(toIndentedString(subtype)).append("\n");
×
388
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
389
    sb.append("}");
×
390
    return sb.toString();
×
391
  }
392

393
  /**
394
   * Convert the given object to string with each line indented by 4 spaces
395
   * (except the first line).
396
   */
397
  private String toIndentedString(Object o) {
398
    if (o == null) {
×
399
      return "null";
×
400
    }
401
    return o.toString().replace("\n", "\n    ");
×
402
  }
403

404
/**
405
   * Create an instance of BacsDirectDebitDetails given an JSON string
406
   *
407
   * @param jsonString JSON string
408
   * @return An instance of BacsDirectDebitDetails
409
   * @throws JsonProcessingException if the JSON string is invalid with respect to BacsDirectDebitDetails
410
   */
411
  public static BacsDirectDebitDetails fromJson(String jsonString) throws JsonProcessingException {
412
    return JSON.getMapper().readValue(jsonString, BacsDirectDebitDetails.class);
×
413
  }
414
/**
415
  * Convert an instance of BacsDirectDebitDetails to an JSON string
416
  *
417
  * @return JSON string
418
  */
419
  public String toJson() throws JsonProcessingException {
420
    return JSON.getMapper().writeValueAsString(this);
×
421
  }
422
}
423

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