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

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

02 Oct 2023 02:08PM UTC coverage: 12.623%. First build
#2676

push

web-flow
Merge 8c2a459f7 into 9e36e9c01

9362 of 9362 new or added lines in 164 files covered. (100.0%)

11051 of 87544 relevant lines covered (12.62%)

0.13 hits per line

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

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

32

33
/**
34
 * TransferInfo
35
 */
36
@JsonPropertyOrder({
37
  TransferInfo.JSON_PROPERTY_AMOUNT,
38
  TransferInfo.JSON_PROPERTY_BALANCE_ACCOUNT_ID,
39
  TransferInfo.JSON_PROPERTY_CATEGORY,
40
  TransferInfo.JSON_PROPERTY_COUNTERPARTY,
41
  TransferInfo.JSON_PROPERTY_DESCRIPTION,
42
  TransferInfo.JSON_PROPERTY_PAYMENT_INSTRUMENT_ID,
43
  TransferInfo.JSON_PROPERTY_PRIORITY,
44
  TransferInfo.JSON_PROPERTY_REFERENCE,
45
  TransferInfo.JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY,
46
  TransferInfo.JSON_PROPERTY_ULTIMATE_PARTY
47
})
48

49
public class TransferInfo {
50
  public static final String JSON_PROPERTY_AMOUNT = "amount";
51
  private Amount amount;
52

53
  public static final String JSON_PROPERTY_BALANCE_ACCOUNT_ID = "balanceAccountId";
54
  private String balanceAccountId;
55

56
  /**
57
   * The type 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.
58
   */
59
  public enum CategoryEnum {
×
60
    BANK("bank"),
×
61
    
62
    INTERNAL("internal"),
×
63
    
64
    ISSUEDCARD("issuedCard"),
×
65
    
66
    PLATFORMPAYMENT("platformPayment"),
×
67
    
68
    CARD("card");
×
69

70
    private String value;
71

72
    CategoryEnum(String value) {
×
73
      this.value = value;
×
74
    }
×
75

76
    @JsonValue
77
    public String getValue() {
78
      return value;
×
79
    }
80

81
    @Override
82
    public String toString() {
83
      return String.valueOf(value);
×
84
    }
85

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

97
  public static final String JSON_PROPERTY_CATEGORY = "category";
98
  private CategoryEnum category;
99

100
  public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty";
101
  private CounterpartyInfoV3 counterparty;
102

103
  public static final String JSON_PROPERTY_DESCRIPTION = "description";
104
  private String description;
105

106
  public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT_ID = "paymentInstrumentId";
107
  private String paymentInstrumentId;
108

109
  /**
110
   * The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**.  Possible values:  * **regular**: For normal, low-value transactions.  * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions.  * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions.  * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html).  * **crossBorder**: High-value transfer to a recipient in a different country.  * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN).
111
   */
112
  public enum PriorityEnum {
×
113
    CROSSBORDER("crossBorder"),
×
114
    
115
    DIRECTDEBIT("directDebit"),
×
116
    
117
    FAST("fast"),
×
118
    
119
    INSTANT("instant"),
×
120
    
121
    INTERNAL("internal"),
×
122
    
123
    REGULAR("regular"),
×
124
    
125
    WIRE("wire");
×
126

127
    private String value;
128

129
    PriorityEnum(String value) {
×
130
      this.value = value;
×
131
    }
×
132

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

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

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

154
  public static final String JSON_PROPERTY_PRIORITY = "priority";
155
  private PriorityEnum priority;
156

157
  public static final String JSON_PROPERTY_REFERENCE = "reference";
158
  private String reference;
159

160
  public static final String JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY = "referenceForBeneficiary";
161
  private String referenceForBeneficiary;
162

163
  public static final String JSON_PROPERTY_ULTIMATE_PARTY = "ultimateParty";
164
  private UltimatePartyIdentification ultimateParty;
165

166
  public TransferInfo() { 
1✔
167
  }
1✔
168

169
  public TransferInfo amount(Amount amount) {
170
    this.amount = amount;
×
171
    return this;
×
172
  }
173

174
   /**
175
   * Get amount
176
   * @return amount
177
  **/
178
  @ApiModelProperty(required = true, value = "")
179
  @JsonProperty(JSON_PROPERTY_AMOUNT)
180
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
181

182
  public Amount getAmount() {
183
    return amount;
1✔
184
  }
185

186

187
  @JsonProperty(JSON_PROPERTY_AMOUNT)
188
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
189
  public void setAmount(Amount amount) {
190
    this.amount = amount;
×
191
  }
×
192

193

194
  public TransferInfo balanceAccountId(String balanceAccountId) {
195
    this.balanceAccountId = balanceAccountId;
×
196
    return this;
×
197
  }
198

199
   /**
200
   * The unique identifier of the source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id).
201
   * @return balanceAccountId
202
  **/
203
  @ApiModelProperty(value = "The unique identifier of the source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id).")
204
  @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_ID)
205
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
206

207
  public String getBalanceAccountId() {
208
    return balanceAccountId;
1✔
209
  }
210

211

212
  @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_ID)
213
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
214
  public void setBalanceAccountId(String balanceAccountId) {
215
    this.balanceAccountId = balanceAccountId;
×
216
  }
×
217

218

219
  public TransferInfo category(CategoryEnum category) {
220
    this.category = category;
×
221
    return this;
×
222
  }
223

224
   /**
225
   * The type 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.
226
   * @return category
227
  **/
228
  @ApiModelProperty(required = true, value = "The type 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.")
229
  @JsonProperty(JSON_PROPERTY_CATEGORY)
230
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
231

232
  public CategoryEnum getCategory() {
233
    return category;
1✔
234
  }
235

236

237
  @JsonProperty(JSON_PROPERTY_CATEGORY)
238
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
239
  public void setCategory(CategoryEnum category) {
240
    this.category = category;
×
241
  }
×
242

243

244
  public TransferInfo counterparty(CounterpartyInfoV3 counterparty) {
245
    this.counterparty = counterparty;
×
246
    return this;
×
247
  }
248

249
   /**
250
   * Get counterparty
251
   * @return counterparty
252
  **/
253
  @ApiModelProperty(required = true, value = "")
254
  @JsonProperty(JSON_PROPERTY_COUNTERPARTY)
255
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
256

257
  public CounterpartyInfoV3 getCounterparty() {
258
    return counterparty;
1✔
259
  }
260

261

262
  @JsonProperty(JSON_PROPERTY_COUNTERPARTY)
263
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
264
  public void setCounterparty(CounterpartyInfoV3 counterparty) {
265
    this.counterparty = counterparty;
×
266
  }
×
267

268

269
  public TransferInfo description(String description) {
270
    this.description = description;
×
271
    return this;
×
272
  }
273

274
   /**
275
   * 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] & $ % # @** **~ = + - _ ' \" ! ?**
276
   * @return description
277
  **/
278
  @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] & $ % # @** **~ = + - _ ' \" ! ?**")
279
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
280
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
281

282
  public String getDescription() {
283
    return description;
1✔
284
  }
285

286

287
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
288
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
289
  public void setDescription(String description) {
290
    this.description = description;
×
291
  }
×
292

293

294
  public TransferInfo paymentInstrumentId(String paymentInstrumentId) {
295
    this.paymentInstrumentId = paymentInstrumentId;
×
296
    return this;
×
297
  }
298

299
   /**
300
   * The unique identifier of the source [payment instrument](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/paymentInstruments__resParam_id).
301
   * @return paymentInstrumentId
302
  **/
303
  @ApiModelProperty(value = "The unique identifier of the source [payment instrument](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/paymentInstruments__resParam_id).")
304
  @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_ID)
305
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
306

307
  public String getPaymentInstrumentId() {
308
    return paymentInstrumentId;
1✔
309
  }
310

311

312
  @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_ID)
313
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
314
  public void setPaymentInstrumentId(String paymentInstrumentId) {
315
    this.paymentInstrumentId = paymentInstrumentId;
×
316
  }
×
317

318

319
  public TransferInfo priority(PriorityEnum priority) {
320
    this.priority = priority;
×
321
    return this;
×
322
  }
323

324
   /**
325
   * The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**.  Possible values:  * **regular**: For normal, low-value transactions.  * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions.  * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions.  * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html).  * **crossBorder**: High-value transfer to a recipient in a different country.  * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN).
326
   * @return priority
327
  **/
328
  @ApiModelProperty(value = "The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**.  Possible values:  * **regular**: For normal, low-value transactions.  * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions.  * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions.  * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html).  * **crossBorder**: High-value transfer to a recipient in a different country.  * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN).")
329
  @JsonProperty(JSON_PROPERTY_PRIORITY)
330
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
331

332
  public PriorityEnum getPriority() {
333
    return priority;
1✔
334
  }
335

336

337
  @JsonProperty(JSON_PROPERTY_PRIORITY)
338
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
339
  public void setPriority(PriorityEnum priority) {
340
    this.priority = priority;
×
341
  }
×
342

343

344
  public TransferInfo reference(String reference) {
345
    this.reference = reference;
×
346
    return this;
×
347
  }
348

349
   /**
350
   * Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference.
351
   * @return reference
352
  **/
353
  @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.")
354
  @JsonProperty(JSON_PROPERTY_REFERENCE)
355
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
356

357
  public String getReference() {
358
    return reference;
1✔
359
  }
360

361

362
  @JsonProperty(JSON_PROPERTY_REFERENCE)
363
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
364
  public void setReference(String reference) {
365
    this.reference = reference;
×
366
  }
×
367

368

369
  public TransferInfo referenceForBeneficiary(String referenceForBeneficiary) {
370
    this.referenceForBeneficiary = referenceForBeneficiary;
×
371
    return this;
×
372
  }
373

374
   /**
375
   *  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.
376
   * @return referenceForBeneficiary
377
  **/
378
  @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.")
379
  @JsonProperty(JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY)
380
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
381

382
  public String getReferenceForBeneficiary() {
383
    return referenceForBeneficiary;
1✔
384
  }
385

386

387
  @JsonProperty(JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY)
388
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
389
  public void setReferenceForBeneficiary(String referenceForBeneficiary) {
390
    this.referenceForBeneficiary = referenceForBeneficiary;
×
391
  }
×
392

393

394
  public TransferInfo ultimateParty(UltimatePartyIdentification ultimateParty) {
395
    this.ultimateParty = ultimateParty;
×
396
    return this;
×
397
  }
398

399
   /**
400
   * Get ultimateParty
401
   * @return ultimateParty
402
  **/
403
  @ApiModelProperty(value = "")
404
  @JsonProperty(JSON_PROPERTY_ULTIMATE_PARTY)
405
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
406

407
  public UltimatePartyIdentification getUltimateParty() {
408
    return ultimateParty;
1✔
409
  }
410

411

412
  @JsonProperty(JSON_PROPERTY_ULTIMATE_PARTY)
413
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
414
  public void setUltimateParty(UltimatePartyIdentification ultimateParty) {
415
    this.ultimateParty = ultimateParty;
×
416
  }
×
417

418

419
  /**
420
   * Return true if this TransferInfo object is equal to o.
421
   */
422
  @Override
423
  public boolean equals(Object o) {
424
    if (this == o) {
×
425
      return true;
×
426
    }
427
    if (o == null || getClass() != o.getClass()) {
×
428
      return false;
×
429
    }
430
    TransferInfo transferInfo = (TransferInfo) o;
×
431
    return Objects.equals(this.amount, transferInfo.amount) &&
×
432
        Objects.equals(this.balanceAccountId, transferInfo.balanceAccountId) &&
×
433
        Objects.equals(this.category, transferInfo.category) &&
×
434
        Objects.equals(this.counterparty, transferInfo.counterparty) &&
×
435
        Objects.equals(this.description, transferInfo.description) &&
×
436
        Objects.equals(this.paymentInstrumentId, transferInfo.paymentInstrumentId) &&
×
437
        Objects.equals(this.priority, transferInfo.priority) &&
×
438
        Objects.equals(this.reference, transferInfo.reference) &&
×
439
        Objects.equals(this.referenceForBeneficiary, transferInfo.referenceForBeneficiary) &&
×
440
        Objects.equals(this.ultimateParty, transferInfo.ultimateParty);
×
441
  }
442

443
  @Override
444
  public int hashCode() {
445
    return Objects.hash(amount, balanceAccountId, category, counterparty, description, paymentInstrumentId, priority, reference, referenceForBeneficiary, ultimateParty);
×
446
  }
447

448
  @Override
449
  public String toString() {
450
    StringBuilder sb = new StringBuilder();
×
451
    sb.append("class TransferInfo {\n");
×
452
    sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
×
453
    sb.append("    balanceAccountId: ").append(toIndentedString(balanceAccountId)).append("\n");
×
454
    sb.append("    category: ").append(toIndentedString(category)).append("\n");
×
455
    sb.append("    counterparty: ").append(toIndentedString(counterparty)).append("\n");
×
456
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
457
    sb.append("    paymentInstrumentId: ").append(toIndentedString(paymentInstrumentId)).append("\n");
×
458
    sb.append("    priority: ").append(toIndentedString(priority)).append("\n");
×
459
    sb.append("    reference: ").append(toIndentedString(reference)).append("\n");
×
460
    sb.append("    referenceForBeneficiary: ").append(toIndentedString(referenceForBeneficiary)).append("\n");
×
461
    sb.append("    ultimateParty: ").append(toIndentedString(ultimateParty)).append("\n");
×
462
    sb.append("}");
×
463
    return sb.toString();
×
464
  }
465

466
  /**
467
   * Convert the given object to string with each line indented by 4 spaces
468
   * (except the first line).
469
   */
470
  private String toIndentedString(Object o) {
471
    if (o == null) {
×
472
      return "null";
×
473
    }
474
    return o.toString().replace("\n", "\n    ");
×
475
  }
476

477
/**
478
   * Create an instance of TransferInfo given an JSON string
479
   *
480
   * @param jsonString JSON string
481
   * @return An instance of TransferInfo
482
   * @throws JsonProcessingException if the JSON string is invalid with respect to TransferInfo
483
   */
484
  public static TransferInfo fromJson(String jsonString) throws JsonProcessingException {
485
    return JSON.getMapper().readValue(jsonString, TransferInfo.class);
×
486
  }
487
/**
488
  * Convert an instance of TransferInfo to an JSON string
489
  *
490
  * @return JSON string
491
  */
492
  public String toJson() throws JsonProcessingException {
493
    return JSON.getMapper().writeValueAsString(this);
1✔
494
  }
495
}
496

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