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

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

23 Oct 2023 11:17AM UTC coverage: 12.828%. First build
#2732

push

web-flow
Merge c1e36748c into b98d01a7e

2569 of 2569 new or added lines in 108 files covered. (100.0%)

12356 of 96323 relevant lines covered (12.83%)

0.13 hits per line

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

59.68
/src/main/java/com/adyen/model/transfers/Transfer.java
1
/*
2
 * Transfers API
3
 *
4
 * The version of the OpenAPI document: 4
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.transfers;
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.transfers.Amount;
20
import com.adyen.model.transfers.CounterpartyV3;
21
import com.adyen.model.transfers.PaymentInstrument;
22
import com.adyen.model.transfers.ResourceReference;
23
import com.adyen.model.transfers.TransferCategoryData;
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.time.OffsetDateTime;
32
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
33
import com.fasterxml.jackson.core.JsonProcessingException;
34

35

36
/**
37
 * Transfer
38
 */
39
@JsonPropertyOrder({
40
  Transfer.JSON_PROPERTY_ACCOUNT_HOLDER,
41
  Transfer.JSON_PROPERTY_AMOUNT,
42
  Transfer.JSON_PROPERTY_BALANCE_ACCOUNT,
43
  Transfer.JSON_PROPERTY_CATEGORY,
44
  Transfer.JSON_PROPERTY_CATEGORY_DATA,
45
  Transfer.JSON_PROPERTY_COUNTERPARTY,
46
  Transfer.JSON_PROPERTY_CREATION_DATE,
47
  Transfer.JSON_PROPERTY_DESCRIPTION,
48
  Transfer.JSON_PROPERTY_DIRECTION,
49
  Transfer.JSON_PROPERTY_ID,
50
  Transfer.JSON_PROPERTY_PAYMENT_INSTRUMENT,
51
  Transfer.JSON_PROPERTY_REASON,
52
  Transfer.JSON_PROPERTY_REFERENCE,
53
  Transfer.JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY,
54
  Transfer.JSON_PROPERTY_STATUS
55
})
56

57
public class Transfer {
58
  public static final String JSON_PROPERTY_ACCOUNT_HOLDER = "accountHolder";
59
  private ResourceReference accountHolder;
60

61
  public static final String JSON_PROPERTY_AMOUNT = "amount";
62
  private Amount amount;
63

64
  public static final String JSON_PROPERTY_BALANCE_ACCOUNT = "balanceAccount";
65
  private ResourceReference balanceAccount;
66

67
  /**
68
   * The category of transfer.  Possible values:   - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account.  - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform.  - **issuedCard**: Transfer initiated by a Adyen-issued card.  - **platformPayment**: Fund movements related to payments that are acquired for your users.
69
   */
70
  public enum CategoryEnum {
1✔
71
    BANK("bank"),
1✔
72
    
73
    INTERNAL("internal"),
1✔
74
    
75
    ISSUEDCARD("issuedCard"),
1✔
76
    
77
    PLATFORMPAYMENT("platformPayment");
1✔
78

79
    private String value;
80

81
    CategoryEnum(String value) {
1✔
82
      this.value = value;
1✔
83
    }
1✔
84

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

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

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

106
  public static final String JSON_PROPERTY_CATEGORY = "category";
107
  private CategoryEnum category;
108

109
  public static final String JSON_PROPERTY_CATEGORY_DATA = "categoryData";
110
  private TransferCategoryData categoryData;
111

112
  public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty";
113
  private CounterpartyV3 counterparty;
114

115
  public static final String JSON_PROPERTY_CREATION_DATE = "creationDate";
116
  private OffsetDateTime creationDate;
117

118
  public static final String JSON_PROPERTY_DESCRIPTION = "description";
119
  private String description;
120

121
  /**
122
   * The direction of the transfer.  Possible values: **incoming**, **outgoing**.
123
   */
124
  public enum DirectionEnum {
1✔
125
    INCOMING("incoming"),
1✔
126
    
127
    OUTGOING("outgoing");
1✔
128

129
    private String value;
130

131
    DirectionEnum(String value) {
1✔
132
      this.value = value;
1✔
133
    }
1✔
134

135
    @JsonValue
136
    public String getValue() {
137
      return value;
×
138
    }
139

140
    @Override
141
    public String toString() {
142
      return String.valueOf(value);
×
143
    }
144

145
    @JsonCreator
146
    public static DirectionEnum fromValue(String value) {
147
      for (DirectionEnum b : DirectionEnum.values()) {
1✔
148
        if (b.value.equals(value)) {
1✔
149
          return b;
1✔
150
        }
151
      }
152
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
153
    }
154
  }
155

156
  public static final String JSON_PROPERTY_DIRECTION = "direction";
157
  private DirectionEnum direction;
158

159
  public static final String JSON_PROPERTY_ID = "id";
160
  private String id;
161

162
  public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT = "paymentInstrument";
163
  private PaymentInstrument paymentInstrument;
164

165
  /**
166
   * Additional information about the status of the transfer.
167
   */
168
  public enum ReasonEnum {
1✔
169
    AMOUNTLIMITEXCEEDED("amountLimitExceeded"),
1✔
170
    
171
    APPROVED("approved"),
1✔
172
    
173
    BALANCEACCOUNTTEMPORARILYBLOCKEDBYTRANSACTIONRULE("balanceAccountTemporarilyBlockedByTransactionRule"),
1✔
174
    
175
    COUNTERPARTYACCOUNTBLOCKED("counterpartyAccountBlocked"),
1✔
176
    
177
    COUNTERPARTYACCOUNTCLOSED("counterpartyAccountClosed"),
1✔
178
    
179
    COUNTERPARTYACCOUNTNOTFOUND("counterpartyAccountNotFound"),
1✔
180
    
181
    COUNTERPARTYADDRESSREQUIRED("counterpartyAddressRequired"),
1✔
182
    
183
    COUNTERPARTYBANKTIMEDOUT("counterpartyBankTimedOut"),
1✔
184
    
185
    COUNTERPARTYBANKUNAVAILABLE("counterpartyBankUnavailable"),
1✔
186
    
187
    DECLINEDBYTRANSACTIONRULE("declinedByTransactionRule"),
1✔
188
    
189
    ERROR("error"),
1✔
190
    
191
    NOTENOUGHBALANCE("notEnoughBalance"),
1✔
192
    
193
    REFUSEDBYCOUNTERPARTYBANK("refusedByCounterpartyBank"),
1✔
194
    
195
    ROUTENOTFOUND("routeNotFound"),
1✔
196
    
197
    SCAFAILED("scaFailed"),
1✔
198
    
199
    UNKNOWN("unknown");
1✔
200

201
    private String value;
202

203
    ReasonEnum(String value) {
1✔
204
      this.value = value;
1✔
205
    }
1✔
206

207
    @JsonValue
208
    public String getValue() {
209
      return value;
×
210
    }
211

212
    @Override
213
    public String toString() {
214
      return String.valueOf(value);
×
215
    }
216

217
    @JsonCreator
218
    public static ReasonEnum fromValue(String value) {
219
      for (ReasonEnum b : ReasonEnum.values()) {
1✔
220
        if (b.value.equals(value)) {
1✔
221
          return b;
1✔
222
        }
223
      }
224
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
225
    }
226
  }
227

228
  public static final String JSON_PROPERTY_REASON = "reason";
229
  private ReasonEnum reason;
230

231
  public static final String JSON_PROPERTY_REFERENCE = "reference";
232
  private String reference;
233

234
  public static final String JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY = "referenceForBeneficiary";
235
  private String referenceForBeneficiary;
236

237
  /**
238
   * The result of the transfer.   For example, **authorised**, **refused**, or **error**.
239
   */
240
  public enum StatusEnum {
1✔
241
    APPROVALPENDING("approvalPending"),
1✔
242
    
243
    ATMWITHDRAWAL("atmWithdrawal"),
1✔
244
    
245
    ATMWITHDRAWALREVERSALPENDING("atmWithdrawalReversalPending"),
1✔
246
    
247
    ATMWITHDRAWALREVERSED("atmWithdrawalReversed"),
1✔
248
    
249
    AUTHADJUSTMENTAUTHORISED("authAdjustmentAuthorised"),
1✔
250
    
251
    AUTHADJUSTMENTERROR("authAdjustmentError"),
1✔
252
    
253
    AUTHADJUSTMENTREFUSED("authAdjustmentRefused"),
1✔
254
    
255
    AUTHORISED("authorised"),
1✔
256
    
257
    BANKTRANSFER("bankTransfer"),
1✔
258
    
259
    BANKTRANSFERPENDING("bankTransferPending"),
1✔
260
    
261
    BOOKED("booked"),
1✔
262
    
263
    BOOKINGPENDING("bookingPending"),
1✔
264
    
265
    CANCELLED("cancelled"),
1✔
266
    
267
    CAPTUREPENDING("capturePending"),
1✔
268
    
269
    CAPTUREREVERSALPENDING("captureReversalPending"),
1✔
270
    
271
    CAPTUREREVERSED("captureReversed"),
1✔
272
    
273
    CAPTURED("captured"),
1✔
274
    
275
    CAPTUREDEXTERNALLY("capturedExternally"),
1✔
276
    
277
    CHARGEBACK("chargeback"),
1✔
278
    
279
    CHARGEBACKEXTERNALLY("chargebackExternally"),
1✔
280
    
281
    CHARGEBACKPENDING("chargebackPending"),
1✔
282
    
283
    CHARGEBACKREVERSALPENDING("chargebackReversalPending"),
1✔
284
    
285
    CHARGEBACKREVERSED("chargebackReversed"),
1✔
286
    
287
    CREDITED("credited"),
1✔
288
    
289
    DEPOSITCORRECTION("depositCorrection"),
1✔
290
    
291
    DEPOSITCORRECTIONPENDING("depositCorrectionPending"),
1✔
292
    
293
    DISPUTE("dispute"),
1✔
294
    
295
    DISPUTECLOSED("disputeClosed"),
1✔
296
    
297
    DISPUTEEXPIRED("disputeExpired"),
1✔
298
    
299
    DISPUTENEEDSREVIEW("disputeNeedsReview"),
1✔
300
    
301
    ERROR("error"),
1✔
302
    
303
    EXPIRED("expired"),
1✔
304
    
305
    FAILED("failed"),
1✔
306
    
307
    FEE("fee"),
1✔
308
    
309
    FEEPENDING("feePending"),
1✔
310
    
311
    INTERNALTRANSFER("internalTransfer"),
1✔
312
    
313
    INTERNALTRANSFERPENDING("internalTransferPending"),
1✔
314
    
315
    INVOICEDEDUCTION("invoiceDeduction"),
1✔
316
    
317
    INVOICEDEDUCTIONPENDING("invoiceDeductionPending"),
1✔
318
    
319
    MANUALCORRECTIONPENDING("manualCorrectionPending"),
1✔
320
    
321
    MANUALLYCORRECTED("manuallyCorrected"),
1✔
322
    
323
    MATCHEDSTATEMENT("matchedStatement"),
1✔
324
    
325
    MATCHEDSTATEMENTPENDING("matchedStatementPending"),
1✔
326
    
327
    MERCHANTPAYIN("merchantPayin"),
1✔
328
    
329
    MERCHANTPAYINPENDING("merchantPayinPending"),
1✔
330
    
331
    MERCHANTPAYINREVERSED("merchantPayinReversed"),
1✔
332
    
333
    MERCHANTPAYINREVERSEDPENDING("merchantPayinReversedPending"),
1✔
334
    
335
    MISCCOST("miscCost"),
1✔
336
    
337
    MISCCOSTPENDING("miscCostPending"),
1✔
338
    
339
    PAYMENTCOST("paymentCost"),
1✔
340
    
341
    PAYMENTCOSTPENDING("paymentCostPending"),
1✔
342
    
343
    RECEIVED("received"),
1✔
344
    
345
    REFUNDPENDING("refundPending"),
1✔
346
    
347
    REFUNDREVERSALPENDING("refundReversalPending"),
1✔
348
    
349
    REFUNDREVERSED("refundReversed"),
1✔
350
    
351
    REFUNDED("refunded"),
1✔
352
    
353
    REFUNDEDEXTERNALLY("refundedExternally"),
1✔
354
    
355
    REFUSED("refused"),
1✔
356
    
357
    RESERVEADJUSTMENT("reserveAdjustment"),
1✔
358
    
359
    RESERVEADJUSTMENTPENDING("reserveAdjustmentPending"),
1✔
360
    
361
    RETURNED("returned"),
1✔
362
    
363
    SECONDCHARGEBACK("secondChargeback"),
1✔
364
    
365
    SECONDCHARGEBACKPENDING("secondChargebackPending"),
1✔
366
    
367
    UNDEFINED("undefined");
1✔
368

369
    private String value;
370

371
    StatusEnum(String value) {
1✔
372
      this.value = value;
1✔
373
    }
1✔
374

375
    @JsonValue
376
    public String getValue() {
377
      return value;
×
378
    }
379

380
    @Override
381
    public String toString() {
382
      return String.valueOf(value);
×
383
    }
384

385
    @JsonCreator
386
    public static StatusEnum fromValue(String value) {
387
      for (StatusEnum b : StatusEnum.values()) {
1✔
388
        if (b.value.equals(value)) {
1✔
389
          return b;
1✔
390
        }
391
      }
392
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
393
    }
394
  }
395

396
  public static final String JSON_PROPERTY_STATUS = "status";
397
  private StatusEnum status;
398

399
  public Transfer() { 
1✔
400
  }
1✔
401

402
  public Transfer accountHolder(ResourceReference accountHolder) {
403
    this.accountHolder = accountHolder;
×
404
    return this;
×
405
  }
406

407
   /**
408
   * Get accountHolder
409
   * @return accountHolder
410
  **/
411
  @ApiModelProperty(value = "")
412
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER)
413
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
414

415
  public ResourceReference getAccountHolder() {
416
    return accountHolder;
×
417
  }
418

419

420
  @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER)
421
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
422
  public void setAccountHolder(ResourceReference accountHolder) {
423
    this.accountHolder = accountHolder;
1✔
424
  }
1✔
425

426

427
  public Transfer amount(Amount amount) {
428
    this.amount = amount;
×
429
    return this;
×
430
  }
431

432
   /**
433
   * Get amount
434
   * @return amount
435
  **/
436
  @ApiModelProperty(required = true, value = "")
437
  @JsonProperty(JSON_PROPERTY_AMOUNT)
438
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
439

440
  public Amount getAmount() {
441
    return amount;
1✔
442
  }
443

444

445
  @JsonProperty(JSON_PROPERTY_AMOUNT)
446
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
447
  public void setAmount(Amount amount) {
448
    this.amount = amount;
1✔
449
  }
1✔
450

451

452
  public Transfer balanceAccount(ResourceReference balanceAccount) {
453
    this.balanceAccount = balanceAccount;
×
454
    return this;
×
455
  }
456

457
   /**
458
   * Get balanceAccount
459
   * @return balanceAccount
460
  **/
461
  @ApiModelProperty(value = "")
462
  @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT)
463
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
464

465
  public ResourceReference getBalanceAccount() {
466
    return balanceAccount;
1✔
467
  }
468

469

470
  @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT)
471
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
472
  public void setBalanceAccount(ResourceReference balanceAccount) {
473
    this.balanceAccount = balanceAccount;
1✔
474
  }
1✔
475

476

477
  public Transfer category(CategoryEnum category) {
478
    this.category = category;
×
479
    return this;
×
480
  }
481

482
   /**
483
   * The category of transfer.  Possible values:   - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account.  - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform.  - **issuedCard**: Transfer initiated by a Adyen-issued card.  - **platformPayment**: Fund movements related to payments that are acquired for your users.
484
   * @return category
485
  **/
486
  @ApiModelProperty(required = true, value = "The category of transfer.  Possible values:   - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account.  - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform.  - **issuedCard**: Transfer initiated by a Adyen-issued card.  - **platformPayment**: Fund movements related to payments that are acquired for your users.")
487
  @JsonProperty(JSON_PROPERTY_CATEGORY)
488
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
489

490
  public CategoryEnum getCategory() {
491
    return category;
×
492
  }
493

494

495
  @JsonProperty(JSON_PROPERTY_CATEGORY)
496
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
497
  public void setCategory(CategoryEnum category) {
498
    this.category = category;
1✔
499
  }
1✔
500

501

502
  public Transfer categoryData(TransferCategoryData categoryData) {
503
    this.categoryData = categoryData;
×
504
    return this;
×
505
  }
506

507
   /**
508
   * Get categoryData
509
   * @return categoryData
510
  **/
511
  @ApiModelProperty(value = "")
512
  @JsonProperty(JSON_PROPERTY_CATEGORY_DATA)
513
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
514

515
  public TransferCategoryData getCategoryData() {
516
    return categoryData;
×
517
  }
518

519

520
  @JsonProperty(JSON_PROPERTY_CATEGORY_DATA)
521
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
522
  public void setCategoryData(TransferCategoryData categoryData) {
523
    this.categoryData = categoryData;
1✔
524
  }
1✔
525

526

527
  public Transfer counterparty(CounterpartyV3 counterparty) {
528
    this.counterparty = counterparty;
×
529
    return this;
×
530
  }
531

532
   /**
533
   * Get counterparty
534
   * @return counterparty
535
  **/
536
  @ApiModelProperty(required = true, value = "")
537
  @JsonProperty(JSON_PROPERTY_COUNTERPARTY)
538
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
539

540
  public CounterpartyV3 getCounterparty() {
541
    return counterparty;
×
542
  }
543

544

545
  @JsonProperty(JSON_PROPERTY_COUNTERPARTY)
546
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
547
  public void setCounterparty(CounterpartyV3 counterparty) {
548
    this.counterparty = counterparty;
1✔
549
  }
1✔
550

551

552
  public Transfer creationDate(OffsetDateTime creationDate) {
553
    this.creationDate = creationDate;
×
554
    return this;
×
555
  }
556

557
   /**
558
   * The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.
559
   * @return creationDate
560
  **/
561
  @ApiModelProperty(value = "The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.")
562
  @JsonProperty(JSON_PROPERTY_CREATION_DATE)
563
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
564

565
  public OffsetDateTime getCreationDate() {
566
    return creationDate;
×
567
  }
568

569

570
  @JsonProperty(JSON_PROPERTY_CREATION_DATE)
571
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
572
  public void setCreationDate(OffsetDateTime creationDate) {
573
    this.creationDate = creationDate;
×
574
  }
×
575

576

577
  public Transfer description(String description) {
578
    this.description = description;
×
579
    return this;
×
580
  }
581

582
   /**
583
   * Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated.  Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space**  Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?**
584
   * @return description
585
  **/
586
  @ApiModelProperty(value = "Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated.  Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space**  Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?**")
587
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
588
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
589

590
  public String getDescription() {
591
    return description;
×
592
  }
593

594

595
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
596
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
597
  public void setDescription(String description) {
598
    this.description = description;
1✔
599
  }
1✔
600

601

602
  public Transfer direction(DirectionEnum direction) {
603
    this.direction = direction;
×
604
    return this;
×
605
  }
606

607
   /**
608
   * The direction of the transfer.  Possible values: **incoming**, **outgoing**.
609
   * @return direction
610
  **/
611
  @ApiModelProperty(value = "The direction of the transfer.  Possible values: **incoming**, **outgoing**.")
612
  @JsonProperty(JSON_PROPERTY_DIRECTION)
613
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
614

615
  public DirectionEnum getDirection() {
616
    return direction;
×
617
  }
618

619

620
  @JsonProperty(JSON_PROPERTY_DIRECTION)
621
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
622
  public void setDirection(DirectionEnum direction) {
623
    this.direction = direction;
1✔
624
  }
1✔
625

626

627
  public Transfer id(String id) {
628
    this.id = id;
×
629
    return this;
×
630
  }
631

632
   /**
633
   * The ID of the resource.
634
   * @return id
635
  **/
636
  @ApiModelProperty(value = "The ID of the resource.")
637
  @JsonProperty(JSON_PROPERTY_ID)
638
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
639

640
  public String getId() {
641
    return id;
1✔
642
  }
643

644

645
  @JsonProperty(JSON_PROPERTY_ID)
646
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
647
  public void setId(String id) {
648
    this.id = id;
1✔
649
  }
1✔
650

651

652
  public Transfer paymentInstrument(PaymentInstrument paymentInstrument) {
653
    this.paymentInstrument = paymentInstrument;
×
654
    return this;
×
655
  }
656

657
   /**
658
   * Get paymentInstrument
659
   * @return paymentInstrument
660
  **/
661
  @ApiModelProperty(value = "")
662
  @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT)
663
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
664

665
  public PaymentInstrument getPaymentInstrument() {
666
    return paymentInstrument;
×
667
  }
668

669

670
  @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT)
671
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
672
  public void setPaymentInstrument(PaymentInstrument paymentInstrument) {
673
    this.paymentInstrument = paymentInstrument;
1✔
674
  }
1✔
675

676

677
  public Transfer reason(ReasonEnum reason) {
678
    this.reason = reason;
×
679
    return this;
×
680
  }
681

682
   /**
683
   * Additional information about the status of the transfer.
684
   * @return reason
685
  **/
686
  @ApiModelProperty(value = "Additional information about the status of the transfer.")
687
  @JsonProperty(JSON_PROPERTY_REASON)
688
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
689

690
  public ReasonEnum getReason() {
691
    return reason;
×
692
  }
693

694

695
  @JsonProperty(JSON_PROPERTY_REASON)
696
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
697
  public void setReason(ReasonEnum reason) {
698
    this.reason = reason;
1✔
699
  }
1✔
700

701

702
  public Transfer reference(String reference) {
703
    this.reference = reference;
×
704
    return this;
×
705
  }
706

707
   /**
708
   * Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference.
709
   * @return reference
710
  **/
711
  @ApiModelProperty(value = "Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference.")
712
  @JsonProperty(JSON_PROPERTY_REFERENCE)
713
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
714

715
  public String getReference() {
716
    return reference;
×
717
  }
718

719

720
  @JsonProperty(JSON_PROPERTY_REFERENCE)
721
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
722
  public void setReference(String reference) {
723
    this.reference = reference;
1✔
724
  }
1✔
725

726

727
  public Transfer referenceForBeneficiary(String referenceForBeneficiary) {
728
    this.referenceForBeneficiary = referenceForBeneficiary;
×
729
    return this;
×
730
  }
731

732
   /**
733
   *  A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds.   Supported characters: **a-z**, **A-Z**, **0-9**. The maximum length depends on the `category`.  - **internal**: 80 characters  - **bank**: 35 characters when transferring to an IBAN, 15 characters for others.
734
   * @return referenceForBeneficiary
735
  **/
736
  @ApiModelProperty(value = " A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds.   Supported characters: **a-z**, **A-Z**, **0-9**. The maximum length depends on the `category`.  - **internal**: 80 characters  - **bank**: 35 characters when transferring to an IBAN, 15 characters for others.")
737
  @JsonProperty(JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY)
738
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
739

740
  public String getReferenceForBeneficiary() {
741
    return referenceForBeneficiary;
×
742
  }
743

744

745
  @JsonProperty(JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY)
746
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
747
  public void setReferenceForBeneficiary(String referenceForBeneficiary) {
748
    this.referenceForBeneficiary = referenceForBeneficiary;
1✔
749
  }
1✔
750

751

752
  public Transfer status(StatusEnum status) {
753
    this.status = status;
×
754
    return this;
×
755
  }
756

757
   /**
758
   * The result of the transfer.   For example, **authorised**, **refused**, or **error**.
759
   * @return status
760
  **/
761
  @ApiModelProperty(required = true, value = "The result of the transfer.   For example, **authorised**, **refused**, or **error**.")
762
  @JsonProperty(JSON_PROPERTY_STATUS)
763
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
764

765
  public StatusEnum getStatus() {
766
    return status;
×
767
  }
768

769

770
  @JsonProperty(JSON_PROPERTY_STATUS)
771
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
772
  public void setStatus(StatusEnum status) {
773
    this.status = status;
1✔
774
  }
1✔
775

776

777
  /**
778
   * Return true if this Transfer object is equal to o.
779
   */
780
  @Override
781
  public boolean equals(Object o) {
782
    if (this == o) {
×
783
      return true;
×
784
    }
785
    if (o == null || getClass() != o.getClass()) {
×
786
      return false;
×
787
    }
788
    Transfer transfer = (Transfer) o;
×
789
    return Objects.equals(this.accountHolder, transfer.accountHolder) &&
×
790
        Objects.equals(this.amount, transfer.amount) &&
×
791
        Objects.equals(this.balanceAccount, transfer.balanceAccount) &&
×
792
        Objects.equals(this.category, transfer.category) &&
×
793
        Objects.equals(this.categoryData, transfer.categoryData) &&
×
794
        Objects.equals(this.counterparty, transfer.counterparty) &&
×
795
        Objects.equals(this.creationDate, transfer.creationDate) &&
×
796
        Objects.equals(this.description, transfer.description) &&
×
797
        Objects.equals(this.direction, transfer.direction) &&
×
798
        Objects.equals(this.id, transfer.id) &&
×
799
        Objects.equals(this.paymentInstrument, transfer.paymentInstrument) &&
×
800
        Objects.equals(this.reason, transfer.reason) &&
×
801
        Objects.equals(this.reference, transfer.reference) &&
×
802
        Objects.equals(this.referenceForBeneficiary, transfer.referenceForBeneficiary) &&
×
803
        Objects.equals(this.status, transfer.status);
×
804
  }
805

806
  @Override
807
  public int hashCode() {
808
    return Objects.hash(accountHolder, amount, balanceAccount, category, categoryData, counterparty, creationDate, description, direction, id, paymentInstrument, reason, reference, referenceForBeneficiary, status);
×
809
  }
810

811
  @Override
812
  public String toString() {
813
    StringBuilder sb = new StringBuilder();
×
814
    sb.append("class Transfer {\n");
×
815
    sb.append("    accountHolder: ").append(toIndentedString(accountHolder)).append("\n");
×
816
    sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
×
817
    sb.append("    balanceAccount: ").append(toIndentedString(balanceAccount)).append("\n");
×
818
    sb.append("    category: ").append(toIndentedString(category)).append("\n");
×
819
    sb.append("    categoryData: ").append(toIndentedString(categoryData)).append("\n");
×
820
    sb.append("    counterparty: ").append(toIndentedString(counterparty)).append("\n");
×
821
    sb.append("    creationDate: ").append(toIndentedString(creationDate)).append("\n");
×
822
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
823
    sb.append("    direction: ").append(toIndentedString(direction)).append("\n");
×
824
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
×
825
    sb.append("    paymentInstrument: ").append(toIndentedString(paymentInstrument)).append("\n");
×
826
    sb.append("    reason: ").append(toIndentedString(reason)).append("\n");
×
827
    sb.append("    reference: ").append(toIndentedString(reference)).append("\n");
×
828
    sb.append("    referenceForBeneficiary: ").append(toIndentedString(referenceForBeneficiary)).append("\n");
×
829
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
×
830
    sb.append("}");
×
831
    return sb.toString();
×
832
  }
833

834
  /**
835
   * Convert the given object to string with each line indented by 4 spaces
836
   * (except the first line).
837
   */
838
  private String toIndentedString(Object o) {
839
    if (o == null) {
×
840
      return "null";
×
841
    }
842
    return o.toString().replace("\n", "\n    ");
×
843
  }
844

845
/**
846
   * Create an instance of Transfer given an JSON string
847
   *
848
   * @param jsonString JSON string
849
   * @return An instance of Transfer
850
   * @throws JsonProcessingException if the JSON string is invalid with respect to Transfer
851
   */
852
  public static Transfer fromJson(String jsonString) throws JsonProcessingException {
853
    return JSON.getMapper().readValue(jsonString, Transfer.class);
1✔
854
  }
855
/**
856
  * Convert an instance of Transfer to an JSON string
857
  *
858
  * @return JSON string
859
  */
860
  public String toJson() throws JsonProcessingException {
861
    return JSON.getMapper().writeValueAsString(this);
×
862
  }
863
}
864

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