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

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

10 Nov 2023 09:29AM UTC coverage: 12.829%. First build
#2841

push

web-flow
Merge f5e54db9e into 5fe92c1d1

2 of 200 new or added lines in 10 files covered. (1.0%)

12395 of 96617 relevant lines covered (12.83%)

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/configurationwebhooks/SweepConfigurationV2.java
1
/*
2
 * Configuration webhooks
3
 *
4
 * The version of the OpenAPI document: 1
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.configurationwebhooks;
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.configurationwebhooks.Amount;
20
import com.adyen.model.configurationwebhooks.SweepCounterparty;
21
import com.adyen.model.configurationwebhooks.SweepSchedule;
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
 * SweepConfigurationV2
35
 */
36
@JsonPropertyOrder({
37
  SweepConfigurationV2.JSON_PROPERTY_COUNTERPARTY,
38
  SweepConfigurationV2.JSON_PROPERTY_CURRENCY,
39
  SweepConfigurationV2.JSON_PROPERTY_DESCRIPTION,
40
  SweepConfigurationV2.JSON_PROPERTY_ID,
41
  SweepConfigurationV2.JSON_PROPERTY_REASON,
42
  SweepConfigurationV2.JSON_PROPERTY_SCHEDULE,
43
  SweepConfigurationV2.JSON_PROPERTY_STATUS,
44
  SweepConfigurationV2.JSON_PROPERTY_SWEEP_AMOUNT,
45
  SweepConfigurationV2.JSON_PROPERTY_TARGET_AMOUNT,
46
  SweepConfigurationV2.JSON_PROPERTY_TRIGGER_AMOUNT,
47
  SweepConfigurationV2.JSON_PROPERTY_TYPE
48
})
49

50
public class SweepConfigurationV2 {
51
  public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty";
52
  private SweepCounterparty counterparty;
53

54
  public static final String JSON_PROPERTY_CURRENCY = "currency";
55
  private String currency;
56

57
  public static final String JSON_PROPERTY_DESCRIPTION = "description";
58
  private String description;
59

60
  public static final String JSON_PROPERTY_ID = "id";
61
  private String id;
62

63
  /**
64
   * The reason for disabling the sweep.
65
   */
66
  public enum ReasonEnum {
×
67
    AMOUNTLIMITEXCEEDED("amountLimitExceeded"),
×
68
    
69
    APPROVED("approved"),
×
70
    
NEW
71
    BALANCEACCOUNTTEMPORARILYBLOCKEDBYTRANSACTIONRULE("balanceAccountTemporarilyBlockedByTransactionRule"),
×
72
    
73
    COUNTERPARTYACCOUNTBLOCKED("counterpartyAccountBlocked"),
×
74
    
75
    COUNTERPARTYACCOUNTCLOSED("counterpartyAccountClosed"),
×
76
    
77
    COUNTERPARTYACCOUNTNOTFOUND("counterpartyAccountNotFound"),
×
78
    
79
    COUNTERPARTYADDRESSREQUIRED("counterpartyAddressRequired"),
×
80
    
81
    COUNTERPARTYBANKTIMEDOUT("counterpartyBankTimedOut"),
×
82
    
83
    COUNTERPARTYBANKUNAVAILABLE("counterpartyBankUnavailable"),
×
84
    
NEW
85
    DECLINEDBYTRANSACTIONRULE("declinedByTransactionRule"),
×
86
    
87
    ERROR("error"),
×
88
    
89
    NOTENOUGHBALANCE("notEnoughBalance"),
×
90
    
91
    REFUSEDBYCOUNTERPARTYBANK("refusedByCounterpartyBank"),
×
92
    
93
    ROUTENOTFOUND("routeNotFound"),
×
94
    
NEW
95
    SCAFAILED("scaFailed"),
×
96
    
97
    UNKNOWN("unknown");
×
98

99
    private String value;
100

101
    ReasonEnum(String value) {
×
102
      this.value = value;
×
103
    }
×
104

105
    @JsonValue
106
    public String getValue() {
107
      return value;
×
108
    }
109

110
    @Override
111
    public String toString() {
112
      return String.valueOf(value);
×
113
    }
114

115
    @JsonCreator
116
    public static ReasonEnum fromValue(String value) {
117
      for (ReasonEnum b : ReasonEnum.values()) {
×
118
        if (b.value.equals(value)) {
×
119
          return b;
×
120
        }
121
      }
122
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
123
    }
124
  }
125

126
  public static final String JSON_PROPERTY_REASON = "reason";
127
  private ReasonEnum reason;
128

129
  public static final String JSON_PROPERTY_SCHEDULE = "schedule";
130
  private SweepSchedule schedule;
131

132
  /**
133
   * The status of the sweep. If not provided, by default, this is set to **active**.  Possible values:    * **active**:  the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration.    * **inactive**: the sweep is disabled and cannot be triggered.   
134
   */
135
  public enum StatusEnum {
×
136
    ACTIVE("active"),
×
137
    
138
    INACTIVE("inactive");
×
139

140
    private String value;
141

142
    StatusEnum(String value) {
×
143
      this.value = value;
×
144
    }
×
145

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

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

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

167
  public static final String JSON_PROPERTY_STATUS = "status";
168
  private StatusEnum status;
169

170
  public static final String JSON_PROPERTY_SWEEP_AMOUNT = "sweepAmount";
171
  private Amount sweepAmount;
172

173
  public static final String JSON_PROPERTY_TARGET_AMOUNT = "targetAmount";
174
  private Amount targetAmount;
175

176
  public static final String JSON_PROPERTY_TRIGGER_AMOUNT = "triggerAmount";
177
  private Amount triggerAmount;
178

179
  /**
180
   * The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**.  Possible values:   * **push**: _push out funds_ to a destination balance account or transfer instrument.   * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account.
181
   */
182
  public enum TypeEnum {
×
183
    PULL("pull"),
×
184
    
185
    PUSH("push");
×
186

187
    private String value;
188

189
    TypeEnum(String value) {
×
190
      this.value = value;
×
191
    }
×
192

193
    @JsonValue
194
    public String getValue() {
195
      return value;
×
196
    }
197

198
    @Override
199
    public String toString() {
200
      return String.valueOf(value);
×
201
    }
202

203
    @JsonCreator
204
    public static TypeEnum fromValue(String value) {
205
      for (TypeEnum b : TypeEnum.values()) {
×
206
        if (b.value.equals(value)) {
×
207
          return b;
×
208
        }
209
      }
210
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
211
    }
212
  }
213

214
  public static final String JSON_PROPERTY_TYPE = "type";
215
  private TypeEnum type = TypeEnum.PUSH;
×
216

217
  public SweepConfigurationV2() { 
×
218
  }
×
219

220
  public SweepConfigurationV2 counterparty(SweepCounterparty counterparty) {
221
    this.counterparty = counterparty;
×
222
    return this;
×
223
  }
224

225
   /**
226
   * Get counterparty
227
   * @return counterparty
228
  **/
229
  @ApiModelProperty(required = true, value = "")
230
  @JsonProperty(JSON_PROPERTY_COUNTERPARTY)
231
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
232

233
  public SweepCounterparty getCounterparty() {
234
    return counterparty;
×
235
  }
236

237

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

244

245
  public SweepConfigurationV2 currency(String currency) {
246
    this.currency = currency;
×
247
    return this;
×
248
  }
249

250
   /**
251
   * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) in uppercase. For example, **EUR**.  The sweep currency must match any of the [balances currencies](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__resParam_balances).
252
   * @return currency
253
  **/
254
  @ApiModelProperty(required = true, value = "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) in uppercase. For example, **EUR**.  The sweep currency must match any of the [balances currencies](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__resParam_balances).")
255
  @JsonProperty(JSON_PROPERTY_CURRENCY)
256
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
257

258
  public String getCurrency() {
259
    return currency;
×
260
  }
261

262

263
  @JsonProperty(JSON_PROPERTY_CURRENCY)
264
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
265
  public void setCurrency(String currency) {
266
    this.currency = currency;
×
267
  }
×
268

269

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

275
   /**
276
   * The message that will be used in the sweep transfer's description body with a maximum length of 140 characters.  If the message is longer after replacing placeholders, the message will be cut off at 140 characters.
277
   * @return description
278
  **/
279
  @ApiModelProperty(value = "The message that will be used in the sweep transfer's description body with a maximum length of 140 characters.  If the message is longer after replacing placeholders, the message will be cut off at 140 characters.")
280
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
281
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
282

283
  public String getDescription() {
284
    return description;
×
285
  }
286

287

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

294

295
  public SweepConfigurationV2 id(String id) {
296
    this.id = id;
×
297
    return this;
×
298
  }
299

300
   /**
301
   * The unique identifier of the sweep.
302
   * @return id
303
  **/
304
  @ApiModelProperty(required = true, value = "The unique identifier of the sweep.")
305
  @JsonProperty(JSON_PROPERTY_ID)
306
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
307

308
  public String getId() {
309
    return id;
×
310
  }
311

312

313
  @JsonProperty(JSON_PROPERTY_ID)
314
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
315
  public void setId(String id) {
316
    this.id = id;
×
317
  }
×
318

319

320
  public SweepConfigurationV2 reason(ReasonEnum reason) {
321
    this.reason = reason;
×
322
    return this;
×
323
  }
324

325
   /**
326
   * The reason for disabling the sweep.
327
   * @return reason
328
  **/
329
  @ApiModelProperty(value = "The reason for disabling the sweep.")
330
  @JsonProperty(JSON_PROPERTY_REASON)
331
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
332

333
  public ReasonEnum getReason() {
334
    return reason;
×
335
  }
336

337

338
  @JsonProperty(JSON_PROPERTY_REASON)
339
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
340
  public void setReason(ReasonEnum reason) {
341
    this.reason = reason;
×
342
  }
×
343

344

345
  public SweepConfigurationV2 schedule(SweepSchedule schedule) {
346
    this.schedule = schedule;
×
347
    return this;
×
348
  }
349

350
   /**
351
   * Get schedule
352
   * @return schedule
353
  **/
354
  @ApiModelProperty(required = true, value = "")
355
  @JsonProperty(JSON_PROPERTY_SCHEDULE)
356
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
357

358
  public SweepSchedule getSchedule() {
359
    return schedule;
×
360
  }
361

362

363
  @JsonProperty(JSON_PROPERTY_SCHEDULE)
364
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
365
  public void setSchedule(SweepSchedule schedule) {
366
    this.schedule = schedule;
×
367
  }
×
368

369

370
  public SweepConfigurationV2 status(StatusEnum status) {
371
    this.status = status;
×
372
    return this;
×
373
  }
374

375
   /**
376
   * The status of the sweep. If not provided, by default, this is set to **active**.  Possible values:    * **active**:  the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration.    * **inactive**: the sweep is disabled and cannot be triggered.   
377
   * @return status
378
  **/
379
  @ApiModelProperty(value = "The status of the sweep. If not provided, by default, this is set to **active**.  Possible values:    * **active**:  the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration.    * **inactive**: the sweep is disabled and cannot be triggered.   ")
380
  @JsonProperty(JSON_PROPERTY_STATUS)
381
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
382

383
  public StatusEnum getStatus() {
384
    return status;
×
385
  }
386

387

388
  @JsonProperty(JSON_PROPERTY_STATUS)
389
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
390
  public void setStatus(StatusEnum status) {
391
    this.status = status;
×
392
  }
×
393

394

395
  public SweepConfigurationV2 sweepAmount(Amount sweepAmount) {
396
    this.sweepAmount = sweepAmount;
×
397
    return this;
×
398
  }
399

400
   /**
401
   * Get sweepAmount
402
   * @return sweepAmount
403
  **/
404
  @ApiModelProperty(value = "")
405
  @JsonProperty(JSON_PROPERTY_SWEEP_AMOUNT)
406
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
407

408
  public Amount getSweepAmount() {
409
    return sweepAmount;
×
410
  }
411

412

413
  @JsonProperty(JSON_PROPERTY_SWEEP_AMOUNT)
414
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
415
  public void setSweepAmount(Amount sweepAmount) {
416
    this.sweepAmount = sweepAmount;
×
417
  }
×
418

419

420
  public SweepConfigurationV2 targetAmount(Amount targetAmount) {
421
    this.targetAmount = targetAmount;
×
422
    return this;
×
423
  }
424

425
   /**
426
   * Get targetAmount
427
   * @return targetAmount
428
  **/
429
  @ApiModelProperty(value = "")
430
  @JsonProperty(JSON_PROPERTY_TARGET_AMOUNT)
431
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
432

433
  public Amount getTargetAmount() {
434
    return targetAmount;
×
435
  }
436

437

438
  @JsonProperty(JSON_PROPERTY_TARGET_AMOUNT)
439
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
440
  public void setTargetAmount(Amount targetAmount) {
441
    this.targetAmount = targetAmount;
×
442
  }
×
443

444

445
  public SweepConfigurationV2 triggerAmount(Amount triggerAmount) {
446
    this.triggerAmount = triggerAmount;
×
447
    return this;
×
448
  }
449

450
   /**
451
   * Get triggerAmount
452
   * @return triggerAmount
453
  **/
454
  @ApiModelProperty(value = "")
455
  @JsonProperty(JSON_PROPERTY_TRIGGER_AMOUNT)
456
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
457

458
  public Amount getTriggerAmount() {
459
    return triggerAmount;
×
460
  }
461

462

463
  @JsonProperty(JSON_PROPERTY_TRIGGER_AMOUNT)
464
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
465
  public void setTriggerAmount(Amount triggerAmount) {
466
    this.triggerAmount = triggerAmount;
×
467
  }
×
468

469

470
  public SweepConfigurationV2 type(TypeEnum type) {
471
    this.type = type;
×
472
    return this;
×
473
  }
474

475
   /**
476
   * The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**.  Possible values:   * **push**: _push out funds_ to a destination balance account or transfer instrument.   * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account.
477
   * @return type
478
  **/
479
  @ApiModelProperty(value = "The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**.  Possible values:   * **push**: _push out funds_ to a destination balance account or transfer instrument.   * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account.")
480
  @JsonProperty(JSON_PROPERTY_TYPE)
481
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
482

483
  public TypeEnum getType() {
484
    return type;
×
485
  }
486

487

488
  @JsonProperty(JSON_PROPERTY_TYPE)
489
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
490
  public void setType(TypeEnum type) {
491
    this.type = type;
×
492
  }
×
493

494

495
  /**
496
   * Return true if this SweepConfigurationV2 object is equal to o.
497
   */
498
  @Override
499
  public boolean equals(Object o) {
500
    if (this == o) {
×
501
      return true;
×
502
    }
503
    if (o == null || getClass() != o.getClass()) {
×
504
      return false;
×
505
    }
506
    SweepConfigurationV2 sweepConfigurationV2 = (SweepConfigurationV2) o;
×
507
    return Objects.equals(this.counterparty, sweepConfigurationV2.counterparty) &&
×
508
        Objects.equals(this.currency, sweepConfigurationV2.currency) &&
×
509
        Objects.equals(this.description, sweepConfigurationV2.description) &&
×
510
        Objects.equals(this.id, sweepConfigurationV2.id) &&
×
511
        Objects.equals(this.reason, sweepConfigurationV2.reason) &&
×
512
        Objects.equals(this.schedule, sweepConfigurationV2.schedule) &&
×
513
        Objects.equals(this.status, sweepConfigurationV2.status) &&
×
514
        Objects.equals(this.sweepAmount, sweepConfigurationV2.sweepAmount) &&
×
515
        Objects.equals(this.targetAmount, sweepConfigurationV2.targetAmount) &&
×
516
        Objects.equals(this.triggerAmount, sweepConfigurationV2.triggerAmount) &&
×
517
        Objects.equals(this.type, sweepConfigurationV2.type);
×
518
  }
519

520
  @Override
521
  public int hashCode() {
522
    return Objects.hash(counterparty, currency, description, id, reason, schedule, status, sweepAmount, targetAmount, triggerAmount, type);
×
523
  }
524

525
  @Override
526
  public String toString() {
527
    StringBuilder sb = new StringBuilder();
×
528
    sb.append("class SweepConfigurationV2 {\n");
×
529
    sb.append("    counterparty: ").append(toIndentedString(counterparty)).append("\n");
×
530
    sb.append("    currency: ").append(toIndentedString(currency)).append("\n");
×
531
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
532
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
×
533
    sb.append("    reason: ").append(toIndentedString(reason)).append("\n");
×
534
    sb.append("    schedule: ").append(toIndentedString(schedule)).append("\n");
×
535
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
×
536
    sb.append("    sweepAmount: ").append(toIndentedString(sweepAmount)).append("\n");
×
537
    sb.append("    targetAmount: ").append(toIndentedString(targetAmount)).append("\n");
×
538
    sb.append("    triggerAmount: ").append(toIndentedString(triggerAmount)).append("\n");
×
539
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
540
    sb.append("}");
×
541
    return sb.toString();
×
542
  }
543

544
  /**
545
   * Convert the given object to string with each line indented by 4 spaces
546
   * (except the first line).
547
   */
548
  private String toIndentedString(Object o) {
549
    if (o == null) {
×
550
      return "null";
×
551
    }
552
    return o.toString().replace("\n", "\n    ");
×
553
  }
554

555
/**
556
   * Create an instance of SweepConfigurationV2 given an JSON string
557
   *
558
   * @param jsonString JSON string
559
   * @return An instance of SweepConfigurationV2
560
   * @throws JsonProcessingException if the JSON string is invalid with respect to SweepConfigurationV2
561
   */
562
  public static SweepConfigurationV2 fromJson(String jsonString) throws JsonProcessingException {
563
    return JSON.getMapper().readValue(jsonString, SweepConfigurationV2.class);
×
564
  }
565
/**
566
  * Convert an instance of SweepConfigurationV2 to an JSON string
567
  *
568
  * @return JSON string
569
  */
570
  public String toJson() throws JsonProcessingException {
571
    return JSON.getMapper().writeValueAsString(this);
×
572
  }
573
}
574

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