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

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

21 Jun 2024 09:59AM UTC coverage: 11.971%. First build
#3332

push

web-flow
Merge b1467e1ff into ac91e3ca5

7 of 311 new or added lines in 27 files covered. (2.25%)

12493 of 104359 relevant lines covered (11.97%)

0.12 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

23.74
/src/main/java/com/adyen/model/balanceplatform/PaymentInstrumentInfo.java
1
/*
2
 * Configuration API
3
 *
4
 * The version of the OpenAPI document: 2
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.balanceplatform;
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.balanceplatform.BankAccountModel;
20
import com.adyen.model.balanceplatform.CardInfo;
21
import com.fasterxml.jackson.annotation.JsonInclude;
22
import com.fasterxml.jackson.annotation.JsonProperty;
23
import com.fasterxml.jackson.annotation.JsonCreator;
24
import com.fasterxml.jackson.annotation.JsonTypeName;
25
import com.fasterxml.jackson.annotation.JsonValue;
26
import io.swagger.annotations.ApiModel;
27
import io.swagger.annotations.ApiModelProperty;
28
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
29
import com.fasterxml.jackson.core.JsonProcessingException;
30

31

32
/**
33
 * PaymentInstrumentInfo
34
 */
35
@JsonPropertyOrder({
36
  PaymentInstrumentInfo.JSON_PROPERTY_BALANCE_ACCOUNT_ID,
37
  PaymentInstrumentInfo.JSON_PROPERTY_BANK_ACCOUNT,
38
  PaymentInstrumentInfo.JSON_PROPERTY_CARD,
39
  PaymentInstrumentInfo.JSON_PROPERTY_DESCRIPTION,
40
  PaymentInstrumentInfo.JSON_PROPERTY_ISSUING_COUNTRY_CODE,
41
  PaymentInstrumentInfo.JSON_PROPERTY_PAYMENT_INSTRUMENT_GROUP_ID,
42
  PaymentInstrumentInfo.JSON_PROPERTY_REFERENCE,
43
  PaymentInstrumentInfo.JSON_PROPERTY_STATUS,
44
  PaymentInstrumentInfo.JSON_PROPERTY_STATUS_COMMENT,
45
  PaymentInstrumentInfo.JSON_PROPERTY_STATUS_REASON,
46
  PaymentInstrumentInfo.JSON_PROPERTY_TYPE
47
})
48

49
public class PaymentInstrumentInfo {
50
  public static final String JSON_PROPERTY_BALANCE_ACCOUNT_ID = "balanceAccountId";
51
  private String balanceAccountId;
52

53
  public static final String JSON_PROPERTY_BANK_ACCOUNT = "bankAccount";
54
  private BankAccountModel bankAccount;
55

56
  public static final String JSON_PROPERTY_CARD = "card";
57
  private CardInfo card;
58

59
  public static final String JSON_PROPERTY_DESCRIPTION = "description";
60
  private String description;
61

62
  public static final String JSON_PROPERTY_ISSUING_COUNTRY_CODE = "issuingCountryCode";
63
  private String issuingCountryCode;
64

65
  public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT_GROUP_ID = "paymentInstrumentGroupId";
66
  private String paymentInstrumentGroupId;
67

68
  public static final String JSON_PROPERTY_REFERENCE = "reference";
69
  private String reference;
70

71
  /**
72
   * The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**.  Possible values:    * **active**:  The payment instrument is active and can be used to make payments.    * **inactive**: The payment instrument is inactive and cannot be used to make payments.    * **suspended**: The payment instrument is suspended, either because it was stolen or lost.    * **closed**: The payment instrument is permanently closed. This action cannot be undone.   
73
   */
74
  public enum StatusEnum {
×
75
    ACTIVE("active"),
×
76
    
77
    CLOSED("closed"),
×
78
    
79
    INACTIVE("inactive"),
×
80
    
81
    SUSPENDED("suspended");
×
82

83
    private String value;
84

85
    StatusEnum(String value) {
×
86
      this.value = value;
×
87
    }
×
88

89
    @JsonValue
90
    public String getValue() {
91
      return value;
×
92
    }
93

94
    @Override
95
    public String toString() {
96
      return String.valueOf(value);
×
97
    }
98

99
    @JsonCreator
100
    public static StatusEnum fromValue(String value) {
101
      for (StatusEnum b : StatusEnum.values()) {
×
102
        if (b.value.equals(value)) {
×
103
          return b;
×
104
        }
105
      }
106
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
107
    }
108
  }
109

110
  public static final String JSON_PROPERTY_STATUS = "status";
111
  private StatusEnum status;
112

113
  public static final String JSON_PROPERTY_STATUS_COMMENT = "statusComment";
114
  private String statusComment;
115

116
  /**
117
   * The reason for the status of the payment instrument.  Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change.
118
   */
119
  public enum StatusReasonEnum {
×
120
    ACCOUNTCLOSURE("accountClosure"),
×
121
    
122
    DAMAGED("damaged"),
×
123
    
124
    ENDOFLIFE("endOfLife"),
×
125
    
126
    EXPIRED("expired"),
×
127
    
128
    LOST("lost"),
×
129
    
130
    OTHER("other"),
×
131
    
132
    STOLEN("stolen"),
×
133
    
134
    SUSPECTEDFRAUD("suspectedFraud"),
×
135
    
136
    TRANSACTIONRULE("transactionRule");
×
137

138
    private String value;
139

140
    StatusReasonEnum(String value) {
×
141
      this.value = value;
×
142
    }
×
143

144
    @JsonValue
145
    public String getValue() {
146
      return value;
×
147
    }
148

149
    @Override
150
    public String toString() {
151
      return String.valueOf(value);
×
152
    }
153

154
    @JsonCreator
155
    public static StatusReasonEnum fromValue(String value) {
156
      for (StatusReasonEnum b : StatusReasonEnum.values()) {
×
157
        if (b.value.equals(value)) {
×
158
          return b;
×
159
        }
160
      }
161
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
162
    }
163
  }
164

165
  public static final String JSON_PROPERTY_STATUS_REASON = "statusReason";
166
  private StatusReasonEnum statusReason;
167

168
  /**
169
   * Type of payment instrument.  Possible value: **card**, **bankAccount**. 
170
   */
171
  public enum TypeEnum {
1✔
172
    BANKACCOUNT("bankAccount"),
1✔
173
    
174
    CARD("card");
1✔
175

176
    private String value;
177

178
    TypeEnum(String value) {
1✔
179
      this.value = value;
1✔
180
    }
1✔
181

182
    @JsonValue
183
    public String getValue() {
184
      return value;
1✔
185
    }
186

187
    @Override
188
    public String toString() {
189
      return String.valueOf(value);
×
190
    }
191

192
    @JsonCreator
193
    public static TypeEnum fromValue(String value) {
194
      for (TypeEnum b : TypeEnum.values()) {
1✔
195
        if (b.value.equals(value)) {
1✔
196
          return b;
1✔
197
        }
198
      }
199
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
200
    }
201
  }
202

203
  public static final String JSON_PROPERTY_TYPE = "type";
204
  private TypeEnum type;
205

206
  public PaymentInstrumentInfo() { 
1✔
207
  }
1✔
208

209
  public PaymentInstrumentInfo balanceAccountId(String balanceAccountId) {
210
    this.balanceAccountId = balanceAccountId;
×
211
    return this;
×
212
  }
213

214
   /**
215
   * The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument.
216
   * @return balanceAccountId
217
  **/
218
  @ApiModelProperty(required = true, value = "The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument.")
219
  @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_ID)
220
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
221

222
  public String getBalanceAccountId() {
223
    return balanceAccountId;
1✔
224
  }
225

226

227
 /**
228
  * The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument.
229
  *
230
  * @param balanceAccountId
231
  */ 
232
  @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_ID)
233
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
234
  public void setBalanceAccountId(String balanceAccountId) {
235
    this.balanceAccountId = balanceAccountId;
1✔
236
  }
1✔
237

238

239
  public PaymentInstrumentInfo bankAccount(BankAccountModel bankAccount) {
240
    this.bankAccount = bankAccount;
×
241
    return this;
×
242
  }
243

244
   /**
245
   * Get bankAccount
246
   * @return bankAccount
247
  **/
248
  @ApiModelProperty(value = "")
249
  @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT)
250
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
251

252
  public BankAccountModel getBankAccount() {
253
    return bankAccount;
1✔
254
  }
255

256

257
 /**
258
  * bankAccount
259
  *
260
  * @param bankAccount
261
  */ 
262
  @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT)
263
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
264
  public void setBankAccount(BankAccountModel bankAccount) {
265
    this.bankAccount = bankAccount;
×
266
  }
×
267

268

269
  public PaymentInstrumentInfo card(CardInfo card) {
270
    this.card = card;
×
271
    return this;
×
272
  }
273

274
   /**
275
   * Get card
276
   * @return card
277
  **/
278
  @ApiModelProperty(value = "")
279
  @JsonProperty(JSON_PROPERTY_CARD)
280
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
281

282
  public CardInfo getCard() {
283
    return card;
1✔
284
  }
285

286

287
 /**
288
  * card
289
  *
290
  * @param card
291
  */ 
292
  @JsonProperty(JSON_PROPERTY_CARD)
293
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
294
  public void setCard(CardInfo card) {
295
    this.card = card;
×
296
  }
×
297

298

299
  public PaymentInstrumentInfo description(String description) {
300
    this.description = description;
×
301
    return this;
×
302
  }
303

304
   /**
305
   * Your description for the payment instrument, maximum 300 characters.
306
   * @return description
307
  **/
308
  @ApiModelProperty(value = "Your description for the payment instrument, maximum 300 characters.")
309
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
310
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
311

312
  public String getDescription() {
313
    return description;
1✔
314
  }
315

316

317
 /**
318
  * Your description for the payment instrument, maximum 300 characters.
319
  *
320
  * @param description
321
  */ 
322
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
323
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
324
  public void setDescription(String description) {
325
    this.description = description;
1✔
326
  }
1✔
327

328

329
  public PaymentInstrumentInfo issuingCountryCode(String issuingCountryCode) {
330
    this.issuingCountryCode = issuingCountryCode;
×
331
    return this;
×
332
  }
333

334
   /**
335
   * The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**.
336
   * @return issuingCountryCode
337
  **/
338
  @ApiModelProperty(required = true, value = "The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**.")
339
  @JsonProperty(JSON_PROPERTY_ISSUING_COUNTRY_CODE)
340
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
341

342
  public String getIssuingCountryCode() {
343
    return issuingCountryCode;
1✔
344
  }
345

346

347
 /**
348
  * The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**.
349
  *
350
  * @param issuingCountryCode
351
  */ 
352
  @JsonProperty(JSON_PROPERTY_ISSUING_COUNTRY_CODE)
353
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
354
  public void setIssuingCountryCode(String issuingCountryCode) {
355
    this.issuingCountryCode = issuingCountryCode;
1✔
356
  }
1✔
357

358

359
  public PaymentInstrumentInfo paymentInstrumentGroupId(String paymentInstrumentGroupId) {
360
    this.paymentInstrumentGroupId = paymentInstrumentGroupId;
×
361
    return this;
×
362
  }
363

364
   /**
365
   * The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs.
366
   * @return paymentInstrumentGroupId
367
  **/
368
  @ApiModelProperty(value = "The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs.")
369
  @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_GROUP_ID)
370
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
371

372
  public String getPaymentInstrumentGroupId() {
373
    return paymentInstrumentGroupId;
1✔
374
  }
375

376

377
 /**
378
  * The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs.
379
  *
380
  * @param paymentInstrumentGroupId
381
  */ 
382
  @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_GROUP_ID)
383
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
384
  public void setPaymentInstrumentGroupId(String paymentInstrumentGroupId) {
385
    this.paymentInstrumentGroupId = paymentInstrumentGroupId;
×
386
  }
×
387

388

389
  public PaymentInstrumentInfo reference(String reference) {
390
    this.reference = reference;
×
391
    return this;
×
392
  }
393

394
   /**
395
   * Your reference for the payment instrument, maximum 150 characters.
396
   * @return reference
397
  **/
398
  @ApiModelProperty(value = "Your reference for the payment instrument, maximum 150 characters.")
399
  @JsonProperty(JSON_PROPERTY_REFERENCE)
400
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
401

402
  public String getReference() {
403
    return reference;
1✔
404
  }
405

406

407
 /**
408
  * Your reference for the payment instrument, maximum 150 characters.
409
  *
410
  * @param reference
411
  */ 
412
  @JsonProperty(JSON_PROPERTY_REFERENCE)
413
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
414
  public void setReference(String reference) {
415
    this.reference = reference;
×
416
  }
×
417

418

419
  public PaymentInstrumentInfo status(StatusEnum status) {
420
    this.status = status;
×
421
    return this;
×
422
  }
423

424
   /**
425
   * The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**.  Possible values:    * **active**:  The payment instrument is active and can be used to make payments.    * **inactive**: The payment instrument is inactive and cannot be used to make payments.    * **suspended**: The payment instrument is suspended, either because it was stolen or lost.    * **closed**: The payment instrument is permanently closed. This action cannot be undone.   
426
   * @return status
427
  **/
428
  @ApiModelProperty(value = "The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**.  Possible values:    * **active**:  The payment instrument is active and can be used to make payments.    * **inactive**: The payment instrument is inactive and cannot be used to make payments.    * **suspended**: The payment instrument is suspended, either because it was stolen or lost.    * **closed**: The payment instrument is permanently closed. This action cannot be undone.   ")
429
  @JsonProperty(JSON_PROPERTY_STATUS)
430
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
431

432
  public StatusEnum getStatus() {
433
    return status;
1✔
434
  }
435

436

437
 /**
438
  * The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**.  Possible values:    * **active**:  The payment instrument is active and can be used to make payments.    * **inactive**: The payment instrument is inactive and cannot be used to make payments.    * **suspended**: The payment instrument is suspended, either because it was stolen or lost.    * **closed**: The payment instrument is permanently closed. This action cannot be undone.   
439
  *
440
  * @param status
441
  */ 
442
  @JsonProperty(JSON_PROPERTY_STATUS)
443
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
444
  public void setStatus(StatusEnum status) {
445
    this.status = status;
×
446
  }
×
447

448

449
  public PaymentInstrumentInfo statusComment(String statusComment) {
NEW
450
    this.statusComment = statusComment;
×
NEW
451
    return this;
×
452
  }
453

454
   /**
455
   * The status comment provides additional information for the statusReason of the payment instrument.
456
   * @return statusComment
457
  **/
458
  @ApiModelProperty(value = "The status comment provides additional information for the statusReason of the payment instrument.")
459
  @JsonProperty(JSON_PROPERTY_STATUS_COMMENT)
460
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
461

462
  public String getStatusComment() {
463
    return statusComment;
1✔
464
  }
465

466

467
 /**
468
  * The status comment provides additional information for the statusReason of the payment instrument.
469
  *
470
  * @param statusComment
471
  */ 
472
  @JsonProperty(JSON_PROPERTY_STATUS_COMMENT)
473
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
474
  public void setStatusComment(String statusComment) {
NEW
475
    this.statusComment = statusComment;
×
NEW
476
  }
×
477

478

479
  public PaymentInstrumentInfo statusReason(StatusReasonEnum statusReason) {
480
    this.statusReason = statusReason;
×
481
    return this;
×
482
  }
483

484
   /**
485
   * The reason for the status of the payment instrument.  Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change.
486
   * @return statusReason
487
  **/
488
  @ApiModelProperty(value = "The reason for the status of the payment instrument.  Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change.")
489
  @JsonProperty(JSON_PROPERTY_STATUS_REASON)
490
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
491

492
  public StatusReasonEnum getStatusReason() {
493
    return statusReason;
1✔
494
  }
495

496

497
 /**
498
  * The reason for the status of the payment instrument.  Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change.
499
  *
500
  * @param statusReason
501
  */ 
502
  @JsonProperty(JSON_PROPERTY_STATUS_REASON)
503
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
504
  public void setStatusReason(StatusReasonEnum statusReason) {
505
    this.statusReason = statusReason;
×
506
  }
×
507

508

509
  public PaymentInstrumentInfo type(TypeEnum type) {
510
    this.type = type;
×
511
    return this;
×
512
  }
513

514
   /**
515
   * Type of payment instrument.  Possible value: **card**, **bankAccount**. 
516
   * @return type
517
  **/
518
  @ApiModelProperty(required = true, value = "Type of payment instrument.  Possible value: **card**, **bankAccount**. ")
519
  @JsonProperty(JSON_PROPERTY_TYPE)
520
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
521

522
  public TypeEnum getType() {
523
    return type;
1✔
524
  }
525

526

527
 /**
528
  * Type of payment instrument.  Possible value: **card**, **bankAccount**. 
529
  *
530
  * @param type
531
  */ 
532
  @JsonProperty(JSON_PROPERTY_TYPE)
533
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
534
  public void setType(TypeEnum type) {
535
    this.type = type;
1✔
536
  }
1✔
537

538

539
  /**
540
   * Return true if this PaymentInstrumentInfo object is equal to o.
541
   */
542
  @Override
543
  public boolean equals(Object o) {
544
    if (this == o) {
×
545
      return true;
×
546
    }
547
    if (o == null || getClass() != o.getClass()) {
×
548
      return false;
×
549
    }
550
    PaymentInstrumentInfo paymentInstrumentInfo = (PaymentInstrumentInfo) o;
×
551
    return Objects.equals(this.balanceAccountId, paymentInstrumentInfo.balanceAccountId) &&
×
552
        Objects.equals(this.bankAccount, paymentInstrumentInfo.bankAccount) &&
×
553
        Objects.equals(this.card, paymentInstrumentInfo.card) &&
×
554
        Objects.equals(this.description, paymentInstrumentInfo.description) &&
×
555
        Objects.equals(this.issuingCountryCode, paymentInstrumentInfo.issuingCountryCode) &&
×
556
        Objects.equals(this.paymentInstrumentGroupId, paymentInstrumentInfo.paymentInstrumentGroupId) &&
×
557
        Objects.equals(this.reference, paymentInstrumentInfo.reference) &&
×
558
        Objects.equals(this.status, paymentInstrumentInfo.status) &&
×
NEW
559
        Objects.equals(this.statusComment, paymentInstrumentInfo.statusComment) &&
×
560
        Objects.equals(this.statusReason, paymentInstrumentInfo.statusReason) &&
×
561
        Objects.equals(this.type, paymentInstrumentInfo.type);
×
562
  }
563

564
  @Override
565
  public int hashCode() {
NEW
566
    return Objects.hash(balanceAccountId, bankAccount, card, description, issuingCountryCode, paymentInstrumentGroupId, reference, status, statusComment, statusReason, type);
×
567
  }
568

569
  @Override
570
  public String toString() {
571
    StringBuilder sb = new StringBuilder();
×
572
    sb.append("class PaymentInstrumentInfo {\n");
×
573
    sb.append("    balanceAccountId: ").append(toIndentedString(balanceAccountId)).append("\n");
×
574
    sb.append("    bankAccount: ").append(toIndentedString(bankAccount)).append("\n");
×
575
    sb.append("    card: ").append(toIndentedString(card)).append("\n");
×
576
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
577
    sb.append("    issuingCountryCode: ").append(toIndentedString(issuingCountryCode)).append("\n");
×
578
    sb.append("    paymentInstrumentGroupId: ").append(toIndentedString(paymentInstrumentGroupId)).append("\n");
×
579
    sb.append("    reference: ").append(toIndentedString(reference)).append("\n");
×
580
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
×
NEW
581
    sb.append("    statusComment: ").append(toIndentedString(statusComment)).append("\n");
×
582
    sb.append("    statusReason: ").append(toIndentedString(statusReason)).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 PaymentInstrumentInfo given an JSON string
601
   *
602
   * @param jsonString JSON string
603
   * @return An instance of PaymentInstrumentInfo
604
   * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentInstrumentInfo
605
   */
606
  public static PaymentInstrumentInfo fromJson(String jsonString) throws JsonProcessingException {
607
    return JSON.getMapper().readValue(jsonString, PaymentInstrumentInfo.class);
1✔
608
  }
609
/**
610
  * Convert an instance of PaymentInstrumentInfo to an JSON string
611
  *
612
  * @return JSON string
613
  */
614
  public String toJson() throws JsonProcessingException {
615
    return JSON.getMapper().writeValueAsString(this);
1✔
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

© 2025 Coveralls, Inc