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

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

22 Sep 2023 11:24AM UTC coverage: 12.611%. First build
#2661

push

web-flow
Merge 251f6ff51 into 9e36e9c01

9262 of 9262 new or added lines in 142 files covered. (100.0%)

11033 of 87486 relevant lines covered (12.61%)

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/marketpayaccount/UpdatePayoutScheduleRequest.java
1
/*
2
 * Account API
3
 * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead.  The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them.  For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example:   ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ```  Alternatively, you can use the username and password to connect to the API using basic authentication. For example:  ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints).  ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number.  For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ```
4
 *
5
 * The version of the OpenAPI document: 6
6
 * 
7
 *
8
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
 * https://openapi-generator.tech
10
 * Do not edit the class manually.
11
 */
12

13

14
package com.adyen.model.marketpayaccount;
15

16
import java.util.Objects;
17
import java.util.Arrays;
18
import java.util.Map;
19
import java.util.HashMap;
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 com.fasterxml.jackson.annotation.JsonPropertyOrder;
28
import com.fasterxml.jackson.core.JsonProcessingException;
29

30

31
/**
32
 * UpdatePayoutScheduleRequest
33
 */
34
@JsonPropertyOrder({
35
  UpdatePayoutScheduleRequest.JSON_PROPERTY_ACTION,
36
  UpdatePayoutScheduleRequest.JSON_PROPERTY_REASON,
37
  UpdatePayoutScheduleRequest.JSON_PROPERTY_SCHEDULE
38
})
39

40
public class UpdatePayoutScheduleRequest {
41
  /**
42
   * Direction on how to handle any payouts that have already been scheduled. Permitted values: * `CLOSE` will close the existing batch of payouts. * `UPDATE` will reschedule the existing batch to the new schedule. * `NOTHING` (**default**) will allow the payout to proceed.
43
   */
44
  public enum ActionEnum {
×
45
    CLOSE("CLOSE"),
×
46
    
47
    NOTHING("NOTHING"),
×
48
    
49
    UPDATE("UPDATE");
×
50

51
    private String value;
52

53
    ActionEnum(String value) {
×
54
      this.value = value;
×
55
    }
×
56

57
    @JsonValue
58
    public String getValue() {
59
      return value;
×
60
    }
61

62
    @Override
63
    public String toString() {
64
      return String.valueOf(value);
×
65
    }
66

67
    @JsonCreator
68
    public static ActionEnum fromValue(String value) {
69
      for (ActionEnum b : ActionEnum.values()) {
×
70
        if (b.value.equals(value)) {
×
71
          return b;
×
72
        }
73
      }
74
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
75
    }
76
  }
77

78
  public static final String JSON_PROPERTY_ACTION = "action";
79
  private ActionEnum action;
80

81
  public static final String JSON_PROPERTY_REASON = "reason";
82
  private String reason;
83

84
  /**
85
   * The payout schedule to which the account is to be updated. Permitted values: `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`. `HOLD` will prevent scheduled payouts from happening but will still allow manual payouts to occur.
86
   */
87
  public enum ScheduleEnum {
×
88
    BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT("BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT"),
×
89
    
90
    DAILY("DAILY"),
×
91
    
92
    DAILY_AU("DAILY_AU"),
×
93
    
94
    DAILY_EU("DAILY_EU"),
×
95
    
96
    DAILY_SG("DAILY_SG"),
×
97
    
98
    DAILY_US("DAILY_US"),
×
99
    
100
    HOLD("HOLD"),
×
101
    
102
    MONTHLY("MONTHLY"),
×
103
    
104
    WEEKLY("WEEKLY"),
×
105
    
106
    WEEKLY_MON_TO_FRI_AU("WEEKLY_MON_TO_FRI_AU"),
×
107
    
108
    WEEKLY_MON_TO_FRI_EU("WEEKLY_MON_TO_FRI_EU"),
×
109
    
110
    WEEKLY_MON_TO_FRI_US("WEEKLY_MON_TO_FRI_US"),
×
111
    
112
    WEEKLY_ON_TUE_FRI_MIDNIGHT("WEEKLY_ON_TUE_FRI_MIDNIGHT"),
×
113
    
114
    WEEKLY_SUN_TO_THU_AU("WEEKLY_SUN_TO_THU_AU"),
×
115
    
116
    WEEKLY_SUN_TO_THU_US("WEEKLY_SUN_TO_THU_US");
×
117

118
    private String value;
119

120
    ScheduleEnum(String value) {
×
121
      this.value = value;
×
122
    }
×
123

124
    @JsonValue
125
    public String getValue() {
126
      return value;
×
127
    }
128

129
    @Override
130
    public String toString() {
131
      return String.valueOf(value);
×
132
    }
133

134
    @JsonCreator
135
    public static ScheduleEnum fromValue(String value) {
136
      for (ScheduleEnum b : ScheduleEnum.values()) {
×
137
        if (b.value.equals(value)) {
×
138
          return b;
×
139
        }
140
      }
141
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
142
    }
143
  }
144

145
  public static final String JSON_PROPERTY_SCHEDULE = "schedule";
146
  private ScheduleEnum schedule;
147

148
  public UpdatePayoutScheduleRequest() { 
×
149
  }
×
150

151
  public UpdatePayoutScheduleRequest action(ActionEnum action) {
152
    this.action = action;
×
153
    return this;
×
154
  }
155

156
   /**
157
   * Direction on how to handle any payouts that have already been scheduled. Permitted values: * `CLOSE` will close the existing batch of payouts. * `UPDATE` will reschedule the existing batch to the new schedule. * `NOTHING` (**default**) will allow the payout to proceed.
158
   * @return action
159
  **/
160
  @ApiModelProperty(value = "Direction on how to handle any payouts that have already been scheduled. Permitted values: * `CLOSE` will close the existing batch of payouts. * `UPDATE` will reschedule the existing batch to the new schedule. * `NOTHING` (**default**) will allow the payout to proceed.")
161
  @JsonProperty(JSON_PROPERTY_ACTION)
162
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
163

164
  public ActionEnum getAction() {
165
    return action;
×
166
  }
167

168

169
  @JsonProperty(JSON_PROPERTY_ACTION)
170
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
171
  public void setAction(ActionEnum action) {
172
    this.action = action;
×
173
  }
×
174

175

176
  public UpdatePayoutScheduleRequest reason(String reason) {
177
    this.reason = reason;
×
178
    return this;
×
179
  }
180

181
   /**
182
   * The reason for the payout schedule update. > This field is required when the `schedule` parameter is set to `HOLD`.
183
   * @return reason
184
  **/
185
  @ApiModelProperty(value = "The reason for the payout schedule update. > This field is required when the `schedule` parameter is set to `HOLD`.")
186
  @JsonProperty(JSON_PROPERTY_REASON)
187
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
188

189
  public String getReason() {
190
    return reason;
×
191
  }
192

193

194
  @JsonProperty(JSON_PROPERTY_REASON)
195
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
196
  public void setReason(String reason) {
197
    this.reason = reason;
×
198
  }
×
199

200

201
  public UpdatePayoutScheduleRequest schedule(ScheduleEnum schedule) {
202
    this.schedule = schedule;
×
203
    return this;
×
204
  }
205

206
   /**
207
   * The payout schedule to which the account is to be updated. Permitted values: `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`. `HOLD` will prevent scheduled payouts from happening but will still allow manual payouts to occur.
208
   * @return schedule
209
  **/
210
  @ApiModelProperty(required = true, value = "The payout schedule to which the account is to be updated. Permitted values: `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`. `HOLD` will prevent scheduled payouts from happening but will still allow manual payouts to occur.")
211
  @JsonProperty(JSON_PROPERTY_SCHEDULE)
212
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
213

214
  public ScheduleEnum getSchedule() {
215
    return schedule;
×
216
  }
217

218

219
  @JsonProperty(JSON_PROPERTY_SCHEDULE)
220
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
221
  public void setSchedule(ScheduleEnum schedule) {
222
    this.schedule = schedule;
×
223
  }
×
224

225

226
  /**
227
   * Return true if this UpdatePayoutScheduleRequest object is equal to o.
228
   */
229
  @Override
230
  public boolean equals(Object o) {
231
    if (this == o) {
×
232
      return true;
×
233
    }
234
    if (o == null || getClass() != o.getClass()) {
×
235
      return false;
×
236
    }
237
    UpdatePayoutScheduleRequest updatePayoutScheduleRequest = (UpdatePayoutScheduleRequest) o;
×
238
    return Objects.equals(this.action, updatePayoutScheduleRequest.action) &&
×
239
        Objects.equals(this.reason, updatePayoutScheduleRequest.reason) &&
×
240
        Objects.equals(this.schedule, updatePayoutScheduleRequest.schedule);
×
241
  }
242

243
  @Override
244
  public int hashCode() {
245
    return Objects.hash(action, reason, schedule);
×
246
  }
247

248
  @Override
249
  public String toString() {
250
    StringBuilder sb = new StringBuilder();
×
251
    sb.append("class UpdatePayoutScheduleRequest {\n");
×
252
    sb.append("    action: ").append(toIndentedString(action)).append("\n");
×
253
    sb.append("    reason: ").append(toIndentedString(reason)).append("\n");
×
254
    sb.append("    schedule: ").append(toIndentedString(schedule)).append("\n");
×
255
    sb.append("}");
×
256
    return sb.toString();
×
257
  }
258

259
  /**
260
   * Convert the given object to string with each line indented by 4 spaces
261
   * (except the first line).
262
   */
263
  private String toIndentedString(Object o) {
264
    if (o == null) {
×
265
      return "null";
×
266
    }
267
    return o.toString().replace("\n", "\n    ");
×
268
  }
269

270
/**
271
   * Create an instance of UpdatePayoutScheduleRequest given an JSON string
272
   *
273
   * @param jsonString JSON string
274
   * @return An instance of UpdatePayoutScheduleRequest
275
   * @throws JsonProcessingException if the JSON string is invalid with respect to UpdatePayoutScheduleRequest
276
   */
277
  public static UpdatePayoutScheduleRequest fromJson(String jsonString) throws JsonProcessingException {
278
    return JSON.getMapper().readValue(jsonString, UpdatePayoutScheduleRequest.class);
×
279
  }
280
/**
281
  * Convert an instance of UpdatePayoutScheduleRequest to an JSON string
282
  *
283
  * @return JSON string
284
  */
285
  public String toJson() throws JsonProcessingException {
286
    return JSON.getMapper().writeValueAsString(this);
×
287
  }
288
}
289

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