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

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

10 Jul 2024 02:20PM UTC coverage: 11.978%. First build
#3387

push

web-flow
Merge bdc77c74a into d27083dc3

3 of 62 new or added lines in 6 files covered. (4.84%)

12515 of 104487 relevant lines covered (11.98%)

0.12 hits per line

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

0.0
/src/main/java/com/adyen/model/management/UpdateMerchantUserRequest.java
1
/*
2
 * Management 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.management;
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.management.Name2;
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
 * UpdateMerchantUserRequest
35
 */
36
@JsonPropertyOrder({
37
  UpdateMerchantUserRequest.JSON_PROPERTY_ACCOUNT_GROUPS,
38
  UpdateMerchantUserRequest.JSON_PROPERTY_ACTIVE,
39
  UpdateMerchantUserRequest.JSON_PROPERTY_EMAIL,
40
  UpdateMerchantUserRequest.JSON_PROPERTY_LOGIN_METHOD,
41
  UpdateMerchantUserRequest.JSON_PROPERTY_NAME,
42
  UpdateMerchantUserRequest.JSON_PROPERTY_ROLES,
43
  UpdateMerchantUserRequest.JSON_PROPERTY_TIME_ZONE_CODE
44
})
45

46
public class UpdateMerchantUserRequest {
47
  public static final String JSON_PROPERTY_ACCOUNT_GROUPS = "accountGroups";
48
  private List<String> accountGroups = null;
×
49

50
  public static final String JSON_PROPERTY_ACTIVE = "active";
51
  private Boolean active;
52

53
  public static final String JSON_PROPERTY_EMAIL = "email";
54
  private String email;
55

56
  public static final String JSON_PROPERTY_LOGIN_METHOD = "loginMethod";
57
  private String loginMethod;
58

59
  public static final String JSON_PROPERTY_NAME = "name";
60
  private Name2 name;
61

62
  public static final String JSON_PROPERTY_ROLES = "roles";
63
  private List<String> roles = null;
×
64

65
  public static final String JSON_PROPERTY_TIME_ZONE_CODE = "timeZoneCode";
66
  private String timeZoneCode;
67

68
  public UpdateMerchantUserRequest() { 
×
69
  }
×
70

71
  public UpdateMerchantUserRequest accountGroups(List<String> accountGroups) {
72
    this.accountGroups = accountGroups;
×
73
    return this;
×
74
  }
75

76
  public UpdateMerchantUserRequest addAccountGroupsItem(String accountGroupsItem) {
77
    if (this.accountGroups == null) {
×
78
      this.accountGroups = new ArrayList<>();
×
79
    }
80
    this.accountGroups.add(accountGroupsItem);
×
81
    return this;
×
82
  }
83

84
   /**
85
   * The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user.
86
   * @return accountGroups
87
  **/
88
  @ApiModelProperty(value = "The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user.")
89
  @JsonProperty(JSON_PROPERTY_ACCOUNT_GROUPS)
90
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
91

92
  public List<String> getAccountGroups() {
93
    return accountGroups;
×
94
  }
95

96

97
 /**
98
  * The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user.
99
  *
100
  * @param accountGroups
101
  */ 
102
  @JsonProperty(JSON_PROPERTY_ACCOUNT_GROUPS)
103
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
104
  public void setAccountGroups(List<String> accountGroups) {
105
    this.accountGroups = accountGroups;
×
106
  }
×
107

108

109
  public UpdateMerchantUserRequest active(Boolean active) {
110
    this.active = active;
×
111
    return this;
×
112
  }
113

114
   /**
115
   * Sets the status of the user to active (**true**) or inactive (**false**).
116
   * @return active
117
  **/
118
  @ApiModelProperty(value = "Sets the status of the user to active (**true**) or inactive (**false**).")
119
  @JsonProperty(JSON_PROPERTY_ACTIVE)
120
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
121

122
  public Boolean getActive() {
123
    return active;
×
124
  }
125

126

127
 /**
128
  * Sets the status of the user to active (**true**) or inactive (**false**).
129
  *
130
  * @param active
131
  */ 
132
  @JsonProperty(JSON_PROPERTY_ACTIVE)
133
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
134
  public void setActive(Boolean active) {
135
    this.active = active;
×
136
  }
×
137

138

139
  public UpdateMerchantUserRequest email(String email) {
140
    this.email = email;
×
141
    return this;
×
142
  }
143

144
   /**
145
   * The email address of the user.
146
   * @return email
147
  **/
148
  @ApiModelProperty(value = "The email address of the user.")
149
  @JsonProperty(JSON_PROPERTY_EMAIL)
150
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
151

152
  public String getEmail() {
153
    return email;
×
154
  }
155

156

157
 /**
158
  * The email address of the user.
159
  *
160
  * @param email
161
  */ 
162
  @JsonProperty(JSON_PROPERTY_EMAIL)
163
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
164
  public void setEmail(String email) {
165
    this.email = email;
×
166
  }
×
167

168

169
  public UpdateMerchantUserRequest loginMethod(String loginMethod) {
NEW
170
    this.loginMethod = loginMethod;
×
NEW
171
    return this;
×
172
  }
173

174
   /**
175
   * The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user.  Possible values: **Username &amp; account**, **Email**, or **SSO** 
176
   * @return loginMethod
177
  **/
178
  @ApiModelProperty(value = "The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user.  Possible values: **Username & account**, **Email**, or **SSO** ")
179
  @JsonProperty(JSON_PROPERTY_LOGIN_METHOD)
180
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
181

182
  public String getLoginMethod() {
NEW
183
    return loginMethod;
×
184
  }
185

186

187
 /**
188
  * The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user.  Possible values: **Username &amp; account**, **Email**, or **SSO** 
189
  *
190
  * @param loginMethod
191
  */ 
192
  @JsonProperty(JSON_PROPERTY_LOGIN_METHOD)
193
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
194
  public void setLoginMethod(String loginMethod) {
NEW
195
    this.loginMethod = loginMethod;
×
NEW
196
  }
×
197

198

199
  public UpdateMerchantUserRequest name(Name2 name) {
200
    this.name = name;
×
201
    return this;
×
202
  }
203

204
   /**
205
   * Get name
206
   * @return name
207
  **/
208
  @ApiModelProperty(value = "")
209
  @JsonProperty(JSON_PROPERTY_NAME)
210
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
211

212
  public Name2 getName() {
213
    return name;
×
214
  }
215

216

217
 /**
218
  * name
219
  *
220
  * @param name
221
  */ 
222
  @JsonProperty(JSON_PROPERTY_NAME)
223
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
224
  public void setName(Name2 name) {
225
    this.name = name;
×
226
  }
×
227

228

229
  public UpdateMerchantUserRequest roles(List<String> roles) {
230
    this.roles = roles;
×
231
    return this;
×
232
  }
233

234
  public UpdateMerchantUserRequest addRolesItem(String rolesItem) {
235
    if (this.roles == null) {
×
236
      this.roles = new ArrayList<>();
×
237
    }
238
    this.roles.add(rolesItem);
×
239
    return this;
×
240
  }
241

242
   /**
243
   * The list of [roles](https://docs.adyen.com/account/user-roles) for this user.
244
   * @return roles
245
  **/
246
  @ApiModelProperty(value = "The list of [roles](https://docs.adyen.com/account/user-roles) for this user.")
247
  @JsonProperty(JSON_PROPERTY_ROLES)
248
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
249

250
  public List<String> getRoles() {
251
    return roles;
×
252
  }
253

254

255
 /**
256
  * The list of [roles](https://docs.adyen.com/account/user-roles) for this user.
257
  *
258
  * @param roles
259
  */ 
260
  @JsonProperty(JSON_PROPERTY_ROLES)
261
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
262
  public void setRoles(List<String> roles) {
263
    this.roles = roles;
×
264
  }
×
265

266

267
  public UpdateMerchantUserRequest timeZoneCode(String timeZoneCode) {
268
    this.timeZoneCode = timeZoneCode;
×
269
    return this;
×
270
  }
271

272
   /**
273
   * The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**.
274
   * @return timeZoneCode
275
  **/
276
  @ApiModelProperty(value = "The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**.")
277
  @JsonProperty(JSON_PROPERTY_TIME_ZONE_CODE)
278
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
279

280
  public String getTimeZoneCode() {
281
    return timeZoneCode;
×
282
  }
283

284

285
 /**
286
  * The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**.
287
  *
288
  * @param timeZoneCode
289
  */ 
290
  @JsonProperty(JSON_PROPERTY_TIME_ZONE_CODE)
291
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
292
  public void setTimeZoneCode(String timeZoneCode) {
293
    this.timeZoneCode = timeZoneCode;
×
294
  }
×
295

296

297
  /**
298
   * Return true if this UpdateMerchantUserRequest object is equal to o.
299
   */
300
  @Override
301
  public boolean equals(Object o) {
302
    if (this == o) {
×
303
      return true;
×
304
    }
305
    if (o == null || getClass() != o.getClass()) {
×
306
      return false;
×
307
    }
308
    UpdateMerchantUserRequest updateMerchantUserRequest = (UpdateMerchantUserRequest) o;
×
309
    return Objects.equals(this.accountGroups, updateMerchantUserRequest.accountGroups) &&
×
310
        Objects.equals(this.active, updateMerchantUserRequest.active) &&
×
311
        Objects.equals(this.email, updateMerchantUserRequest.email) &&
×
NEW
312
        Objects.equals(this.loginMethod, updateMerchantUserRequest.loginMethod) &&
×
313
        Objects.equals(this.name, updateMerchantUserRequest.name) &&
×
314
        Objects.equals(this.roles, updateMerchantUserRequest.roles) &&
×
315
        Objects.equals(this.timeZoneCode, updateMerchantUserRequest.timeZoneCode);
×
316
  }
317

318
  @Override
319
  public int hashCode() {
NEW
320
    return Objects.hash(accountGroups, active, email, loginMethod, name, roles, timeZoneCode);
×
321
  }
322

323
  @Override
324
  public String toString() {
325
    StringBuilder sb = new StringBuilder();
×
326
    sb.append("class UpdateMerchantUserRequest {\n");
×
327
    sb.append("    accountGroups: ").append(toIndentedString(accountGroups)).append("\n");
×
328
    sb.append("    active: ").append(toIndentedString(active)).append("\n");
×
329
    sb.append("    email: ").append(toIndentedString(email)).append("\n");
×
NEW
330
    sb.append("    loginMethod: ").append(toIndentedString(loginMethod)).append("\n");
×
331
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
×
332
    sb.append("    roles: ").append(toIndentedString(roles)).append("\n");
×
333
    sb.append("    timeZoneCode: ").append(toIndentedString(timeZoneCode)).append("\n");
×
334
    sb.append("}");
×
335
    return sb.toString();
×
336
  }
337

338
  /**
339
   * Convert the given object to string with each line indented by 4 spaces
340
   * (except the first line).
341
   */
342
  private String toIndentedString(Object o) {
343
    if (o == null) {
×
344
      return "null";
×
345
    }
346
    return o.toString().replace("\n", "\n    ");
×
347
  }
348

349
/**
350
   * Create an instance of UpdateMerchantUserRequest given an JSON string
351
   *
352
   * @param jsonString JSON string
353
   * @return An instance of UpdateMerchantUserRequest
354
   * @throws JsonProcessingException if the JSON string is invalid with respect to UpdateMerchantUserRequest
355
   */
356
  public static UpdateMerchantUserRequest fromJson(String jsonString) throws JsonProcessingException {
357
    return JSON.getMapper().readValue(jsonString, UpdateMerchantUserRequest.class);
×
358
  }
359
/**
360
  * Convert an instance of UpdateMerchantUserRequest to an JSON string
361
  *
362
  * @return JSON string
363
  */
364
  public String toJson() throws JsonProcessingException {
365
    return JSON.getMapper().writeValueAsString(this);
×
366
  }
367
}
368

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