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

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

18 Sep 2023 12:11PM UTC coverage: 13.219%. First build
#2658

push

web-flow
Merge 477a9da03 into ba706cfa8

1770 of 1770 new or added lines in 34 files covered. (100.0%)

10287 of 77817 relevant lines covered (13.22%)

0.13 hits per line

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

0.0
/src/main/java/com/adyen/model/balanceplatform/TransferRouteRequest.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.Counterparty;
20
import com.fasterxml.jackson.annotation.JsonInclude;
21
import com.fasterxml.jackson.annotation.JsonProperty;
22
import com.fasterxml.jackson.annotation.JsonCreator;
23
import com.fasterxml.jackson.annotation.JsonTypeName;
24
import com.fasterxml.jackson.annotation.JsonValue;
25
import io.swagger.annotations.ApiModel;
26
import io.swagger.annotations.ApiModelProperty;
27
import java.util.ArrayList;
28
import java.util.List;
29
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
30
import com.fasterxml.jackson.core.JsonProcessingException;
31

32

33
/**
34
 * TransferRouteRequest
35
 */
36
@JsonPropertyOrder({
37
  TransferRouteRequest.JSON_PROPERTY_BALANCE_ACCOUNT_ID,
38
  TransferRouteRequest.JSON_PROPERTY_BALANCE_PLATFORM,
39
  TransferRouteRequest.JSON_PROPERTY_CATEGORY,
40
  TransferRouteRequest.JSON_PROPERTY_COUNTERPARTY,
41
  TransferRouteRequest.JSON_PROPERTY_COUNTRY,
42
  TransferRouteRequest.JSON_PROPERTY_CURRENCY,
43
  TransferRouteRequest.JSON_PROPERTY_PRIORITIES
44
})
45

46
public class TransferRouteRequest {
47
  public static final String JSON_PROPERTY_BALANCE_ACCOUNT_ID = "balanceAccountId";
48
  private String balanceAccountId;
49

50
  public static final String JSON_PROPERTY_BALANCE_PLATFORM = "balancePlatform";
51
  private String balancePlatform;
52

53
  /**
54
   *  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. 
55
   */
56
  public enum CategoryEnum {
×
57
    BANK("bank");
×
58

59
    private String value;
60

61
    CategoryEnum(String value) {
×
62
      this.value = value;
×
63
    }
×
64

65
    @JsonValue
66
    public String getValue() {
67
      return value;
×
68
    }
69

70
    @Override
71
    public String toString() {
72
      return String.valueOf(value);
×
73
    }
74

75
    @JsonCreator
76
    public static CategoryEnum fromValue(String value) {
77
      for (CategoryEnum b : CategoryEnum.values()) {
×
78
        if (b.value.equals(value)) {
×
79
          return b;
×
80
        }
81
      }
82
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
83
    }
84
  }
85

86
  public static final String JSON_PROPERTY_CATEGORY = "category";
87
  private CategoryEnum category;
88

89
  public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty";
90
  private Counterparty counterparty;
91

92
  public static final String JSON_PROPERTY_COUNTRY = "country";
93
  private String country;
94

95
  public static final String JSON_PROPERTY_CURRENCY = "currency";
96
  private String currency;
97

98
  /**
99
   * Gets or Sets priorities
100
   */
101
  public enum PrioritiesEnum {
×
102
    CROSSBORDER("crossBorder"),
×
103
    
104
    FAST("fast"),
×
105
    
106
    INSTANT("instant"),
×
107
    
108
    INTERNAL("internal"),
×
109
    
110
    REGULAR("regular"),
×
111
    
112
    WIRE("wire");
×
113

114
    private String value;
115

116
    PrioritiesEnum(String value) {
×
117
      this.value = value;
×
118
    }
×
119

120
    @JsonValue
121
    public String getValue() {
122
      return value;
×
123
    }
124

125
    @Override
126
    public String toString() {
127
      return String.valueOf(value);
×
128
    }
129

130
    @JsonCreator
131
    public static PrioritiesEnum fromValue(String value) {
132
      for (PrioritiesEnum b : PrioritiesEnum.values()) {
×
133
        if (b.value.equals(value)) {
×
134
          return b;
×
135
        }
136
      }
137
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
138
    }
139
  }
140

141
  public static final String JSON_PROPERTY_PRIORITIES = "priorities";
142
  private List<PrioritiesEnum> priorities = null;
×
143

144
  public TransferRouteRequest() { 
×
145
  }
×
146

147
  public TransferRouteRequest balanceAccountId(String balanceAccountId) {
148
    this.balanceAccountId = balanceAccountId;
×
149
    return this;
×
150
  }
151

152
   /**
153
   * The unique identifier of the source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). Required if &#x60;counterparty&#x60; is **transferInstrumentId**.
154
   * @return balanceAccountId
155
  **/
156
  @ApiModelProperty(value = "The unique identifier of the source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). Required if `counterparty` is **transferInstrumentId**.")
157
  @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_ID)
158
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
159

160
  public String getBalanceAccountId() {
161
    return balanceAccountId;
×
162
  }
163

164

165
  @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_ID)
166
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
167
  public void setBalanceAccountId(String balanceAccountId) {
168
    this.balanceAccountId = balanceAccountId;
×
169
  }
×
170

171

172
  public TransferRouteRequest balancePlatform(String balancePlatform) {
173
    this.balancePlatform = balancePlatform;
×
174
    return this;
×
175
  }
176

177
   /**
178
   * The unique identifier assigned to the balance platform associated with the account holder.
179
   * @return balancePlatform
180
  **/
181
  @ApiModelProperty(required = true, value = "The unique identifier assigned to the balance platform associated with the account holder.")
182
  @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM)
183
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
184

185
  public String getBalancePlatform() {
186
    return balancePlatform;
×
187
  }
188

189

190
  @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM)
191
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
192
  public void setBalancePlatform(String balancePlatform) {
193
    this.balancePlatform = balancePlatform;
×
194
  }
×
195

196

197
  public TransferRouteRequest category(CategoryEnum category) {
198
    this.category = category;
×
199
    return this;
×
200
  }
201

202
   /**
203
   *  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. 
204
   * @return category
205
  **/
206
  @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. ")
207
  @JsonProperty(JSON_PROPERTY_CATEGORY)
208
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
209

210
  public CategoryEnum getCategory() {
211
    return category;
×
212
  }
213

214

215
  @JsonProperty(JSON_PROPERTY_CATEGORY)
216
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
217
  public void setCategory(CategoryEnum category) {
218
    this.category = category;
×
219
  }
×
220

221

222
  public TransferRouteRequest counterparty(Counterparty counterparty) {
223
    this.counterparty = counterparty;
×
224
    return this;
×
225
  }
226

227
   /**
228
   * Get counterparty
229
   * @return counterparty
230
  **/
231
  @ApiModelProperty(value = "")
232
  @JsonProperty(JSON_PROPERTY_COUNTERPARTY)
233
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
234

235
  public Counterparty getCounterparty() {
236
    return counterparty;
×
237
  }
238

239

240
  @JsonProperty(JSON_PROPERTY_COUNTERPARTY)
241
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
242
  public void setCounterparty(Counterparty counterparty) {
243
    this.counterparty = counterparty;
×
244
  }
×
245

246

247
  public TransferRouteRequest country(String country) {
248
    this.country = country;
×
249
    return this;
×
250
  }
251

252
   /**
253
   * The two-character ISO-3166-1 alpha-2 country code of the counterparty. For example, **US** or **NL**.  &gt; Either &#x60;counterparty&#x60; or &#x60;country&#x60; field must be provided in a transfer route request.
254
   * @return country
255
  **/
256
  @ApiModelProperty(value = "The two-character ISO-3166-1 alpha-2 country code of the counterparty. For example, **US** or **NL**.  > Either `counterparty` or `country` field must be provided in a transfer route request.")
257
  @JsonProperty(JSON_PROPERTY_COUNTRY)
258
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
259

260
  public String getCountry() {
261
    return country;
×
262
  }
263

264

265
  @JsonProperty(JSON_PROPERTY_COUNTRY)
266
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
267
  public void setCountry(String country) {
268
    this.country = country;
×
269
  }
×
270

271

272
  public TransferRouteRequest currency(String currency) {
273
    this.currency = currency;
×
274
    return this;
×
275
  }
276

277
   /**
278
   * The three-character ISO currency code of transfer. For example, **USD** or **EUR**.
279
   * @return currency
280
  **/
281
  @ApiModelProperty(required = true, value = "The three-character ISO currency code of transfer. For example, **USD** or **EUR**.")
282
  @JsonProperty(JSON_PROPERTY_CURRENCY)
283
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
284

285
  public String getCurrency() {
286
    return currency;
×
287
  }
288

289

290
  @JsonProperty(JSON_PROPERTY_CURRENCY)
291
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
292
  public void setCurrency(String currency) {
293
    this.currency = currency;
×
294
  }
×
295

296

297
  public TransferRouteRequest priorities(List<PrioritiesEnum> priorities) {
298
    this.priorities = priorities;
×
299
    return this;
×
300
  }
301

302
  public TransferRouteRequest addPrioritiesItem(PrioritiesEnum prioritiesItem) {
303
    if (this.priorities == null) {
×
304
      this.priorities = new ArrayList<>();
×
305
    }
306
    this.priorities.add(prioritiesItem);
×
307
    return this;
×
308
  }
309

310
   /**
311
   * The list of priorities for the bank transfer. Priorities set the speed at which the transfer is sent and the fees that you have to pay. Multiple values can be provided. 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).
312
   * @return priorities
313
  **/
314
  @ApiModelProperty(value = "The list of priorities for the bank transfer. Priorities set the speed at which the transfer is sent and the fees that you have to pay. Multiple values can be provided. 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).")
315
  @JsonProperty(JSON_PROPERTY_PRIORITIES)
316
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
317

318
  public List<PrioritiesEnum> getPriorities() {
319
    return priorities;
×
320
  }
321

322

323
  @JsonProperty(JSON_PROPERTY_PRIORITIES)
324
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
325
  public void setPriorities(List<PrioritiesEnum> priorities) {
326
    this.priorities = priorities;
×
327
  }
×
328

329

330
  /**
331
   * Return true if this TransferRouteRequest object is equal to o.
332
   */
333
  @Override
334
  public boolean equals(Object o) {
335
    if (this == o) {
×
336
      return true;
×
337
    }
338
    if (o == null || getClass() != o.getClass()) {
×
339
      return false;
×
340
    }
341
    TransferRouteRequest transferRouteRequest = (TransferRouteRequest) o;
×
342
    return Objects.equals(this.balanceAccountId, transferRouteRequest.balanceAccountId) &&
×
343
        Objects.equals(this.balancePlatform, transferRouteRequest.balancePlatform) &&
×
344
        Objects.equals(this.category, transferRouteRequest.category) &&
×
345
        Objects.equals(this.counterparty, transferRouteRequest.counterparty) &&
×
346
        Objects.equals(this.country, transferRouteRequest.country) &&
×
347
        Objects.equals(this.currency, transferRouteRequest.currency) &&
×
348
        Objects.equals(this.priorities, transferRouteRequest.priorities);
×
349
  }
350

351
  @Override
352
  public int hashCode() {
353
    return Objects.hash(balanceAccountId, balancePlatform, category, counterparty, country, currency, priorities);
×
354
  }
355

356
  @Override
357
  public String toString() {
358
    StringBuilder sb = new StringBuilder();
×
359
    sb.append("class TransferRouteRequest {\n");
×
360
    sb.append("    balanceAccountId: ").append(toIndentedString(balanceAccountId)).append("\n");
×
361
    sb.append("    balancePlatform: ").append(toIndentedString(balancePlatform)).append("\n");
×
362
    sb.append("    category: ").append(toIndentedString(category)).append("\n");
×
363
    sb.append("    counterparty: ").append(toIndentedString(counterparty)).append("\n");
×
364
    sb.append("    country: ").append(toIndentedString(country)).append("\n");
×
365
    sb.append("    currency: ").append(toIndentedString(currency)).append("\n");
×
366
    sb.append("    priorities: ").append(toIndentedString(priorities)).append("\n");
×
367
    sb.append("}");
×
368
    return sb.toString();
×
369
  }
370

371
  /**
372
   * Convert the given object to string with each line indented by 4 spaces
373
   * (except the first line).
374
   */
375
  private String toIndentedString(Object o) {
376
    if (o == null) {
×
377
      return "null";
×
378
    }
379
    return o.toString().replace("\n", "\n    ");
×
380
  }
381

382
/**
383
   * Create an instance of TransferRouteRequest given an JSON string
384
   *
385
   * @param jsonString JSON string
386
   * @return An instance of TransferRouteRequest
387
   * @throws JsonProcessingException if the JSON string is invalid with respect to TransferRouteRequest
388
   */
389
  public static TransferRouteRequest fromJson(String jsonString) throws JsonProcessingException {
390
    return JSON.getMapper().readValue(jsonString, TransferRouteRequest.class);
×
391
  }
392
/**
393
  * Convert an instance of TransferRouteRequest to an JSON string
394
  *
395
  * @return JSON string
396
  */
397
  public String toJson() throws JsonProcessingException {
398
    return JSON.getMapper().writeValueAsString(this);
×
399
  }
400
}
401

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

© 2026 Coveralls, Inc