• 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/UpdateCompanyUserRequest.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
 * UpdateCompanyUserRequest
35
 */
36
@JsonPropertyOrder({
37
  UpdateCompanyUserRequest.JSON_PROPERTY_ACCOUNT_GROUPS,
38
  UpdateCompanyUserRequest.JSON_PROPERTY_ACTIVE,
39
  UpdateCompanyUserRequest.JSON_PROPERTY_ASSOCIATED_MERCHANT_ACCOUNTS,
40
  UpdateCompanyUserRequest.JSON_PROPERTY_EMAIL,
41
  UpdateCompanyUserRequest.JSON_PROPERTY_LOGIN_METHOD,
42
  UpdateCompanyUserRequest.JSON_PROPERTY_NAME,
43
  UpdateCompanyUserRequest.JSON_PROPERTY_ROLES,
44
  UpdateCompanyUserRequest.JSON_PROPERTY_TIME_ZONE_CODE
45
})
46

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

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

54
  public static final String JSON_PROPERTY_ASSOCIATED_MERCHANT_ACCOUNTS = "associatedMerchantAccounts";
55
  private List<String> associatedMerchantAccounts = null;
×
56

57
  public static final String JSON_PROPERTY_EMAIL = "email";
58
  private String email;
59

60
  public static final String JSON_PROPERTY_LOGIN_METHOD = "loginMethod";
61
  private String loginMethod;
62

63
  public static final String JSON_PROPERTY_NAME = "name";
64
  private Name2 name;
65

66
  public static final String JSON_PROPERTY_ROLES = "roles";
67
  private List<String> roles = null;
×
68

69
  public static final String JSON_PROPERTY_TIME_ZONE_CODE = "timeZoneCode";
70
  private String timeZoneCode;
71

72
  public UpdateCompanyUserRequest() { 
×
73
  }
×
74

75
  public UpdateCompanyUserRequest accountGroups(List<String> accountGroups) {
76
    this.accountGroups = accountGroups;
×
77
    return this;
×
78
  }
79

80
  public UpdateCompanyUserRequest addAccountGroupsItem(String accountGroupsItem) {
81
    if (this.accountGroups == null) {
×
82
      this.accountGroups = new ArrayList<>();
×
83
    }
84
    this.accountGroups.add(accountGroupsItem);
×
85
    return this;
×
86
  }
87

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

96
  public List<String> getAccountGroups() {
97
    return accountGroups;
×
98
  }
99

100

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

112

113
  public UpdateCompanyUserRequest active(Boolean active) {
114
    this.active = active;
×
115
    return this;
×
116
  }
117

118
   /**
119
   * Indicates whether this user is active.
120
   * @return active
121
  **/
122
  @ApiModelProperty(value = "Indicates whether this user is active.")
123
  @JsonProperty(JSON_PROPERTY_ACTIVE)
124
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
125

126
  public Boolean getActive() {
127
    return active;
×
128
  }
129

130

131
 /**
132
  * Indicates whether this user is active.
133
  *
134
  * @param active
135
  */ 
136
  @JsonProperty(JSON_PROPERTY_ACTIVE)
137
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
138
  public void setActive(Boolean active) {
139
    this.active = active;
×
140
  }
×
141

142

143
  public UpdateCompanyUserRequest associatedMerchantAccounts(List<String> associatedMerchantAccounts) {
144
    this.associatedMerchantAccounts = associatedMerchantAccounts;
×
145
    return this;
×
146
  }
147

148
  public UpdateCompanyUserRequest addAssociatedMerchantAccountsItem(String associatedMerchantAccountsItem) {
149
    if (this.associatedMerchantAccounts == null) {
×
150
      this.associatedMerchantAccounts = new ArrayList<>();
×
151
    }
152
    this.associatedMerchantAccounts.add(associatedMerchantAccountsItem);
×
153
    return this;
×
154
  }
155

156
   /**
157
   * The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) to associate the user with.
158
   * @return associatedMerchantAccounts
159
  **/
160
  @ApiModelProperty(value = "The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) to associate the user with.")
161
  @JsonProperty(JSON_PROPERTY_ASSOCIATED_MERCHANT_ACCOUNTS)
162
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
163

164
  public List<String> getAssociatedMerchantAccounts() {
165
    return associatedMerchantAccounts;
×
166
  }
167

168

169
 /**
170
  * The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) to associate the user with.
171
  *
172
  * @param associatedMerchantAccounts
173
  */ 
174
  @JsonProperty(JSON_PROPERTY_ASSOCIATED_MERCHANT_ACCOUNTS)
175
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
176
  public void setAssociatedMerchantAccounts(List<String> associatedMerchantAccounts) {
177
    this.associatedMerchantAccounts = associatedMerchantAccounts;
×
178
  }
×
179

180

181
  public UpdateCompanyUserRequest email(String email) {
182
    this.email = email;
×
183
    return this;
×
184
  }
185

186
   /**
187
   * The email address of the user.
188
   * @return email
189
  **/
190
  @ApiModelProperty(value = "The email address of the user.")
191
  @JsonProperty(JSON_PROPERTY_EMAIL)
192
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
193

194
  public String getEmail() {
195
    return email;
×
196
  }
197

198

199
 /**
200
  * The email address of the user.
201
  *
202
  * @param email
203
  */ 
204
  @JsonProperty(JSON_PROPERTY_EMAIL)
205
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
206
  public void setEmail(String email) {
207
    this.email = email;
×
208
  }
×
209

210

211
  public UpdateCompanyUserRequest loginMethod(String loginMethod) {
NEW
212
    this.loginMethod = loginMethod;
×
NEW
213
    return this;
×
214
  }
215

216
   /**
217
   * 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** 
218
   * @return loginMethod
219
  **/
220
  @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** ")
221
  @JsonProperty(JSON_PROPERTY_LOGIN_METHOD)
222
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
223

224
  public String getLoginMethod() {
NEW
225
    return loginMethod;
×
226
  }
227

228

229
 /**
230
  * 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** 
231
  *
232
  * @param loginMethod
233
  */ 
234
  @JsonProperty(JSON_PROPERTY_LOGIN_METHOD)
235
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
236
  public void setLoginMethod(String loginMethod) {
NEW
237
    this.loginMethod = loginMethod;
×
NEW
238
  }
×
239

240

241
  public UpdateCompanyUserRequest name(Name2 name) {
242
    this.name = name;
×
243
    return this;
×
244
  }
245

246
   /**
247
   * Get name
248
   * @return name
249
  **/
250
  @ApiModelProperty(value = "")
251
  @JsonProperty(JSON_PROPERTY_NAME)
252
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
253

254
  public Name2 getName() {
255
    return name;
×
256
  }
257

258

259
 /**
260
  * name
261
  *
262
  * @param name
263
  */ 
264
  @JsonProperty(JSON_PROPERTY_NAME)
265
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
266
  public void setName(Name2 name) {
267
    this.name = name;
×
268
  }
×
269

270

271
  public UpdateCompanyUserRequest roles(List<String> roles) {
272
    this.roles = roles;
×
273
    return this;
×
274
  }
275

276
  public UpdateCompanyUserRequest addRolesItem(String rolesItem) {
277
    if (this.roles == null) {
×
278
      this.roles = new ArrayList<>();
×
279
    }
280
    this.roles.add(rolesItem);
×
281
    return this;
×
282
  }
283

284
   /**
285
   * The list of [roles](https://docs.adyen.com/account/user-roles) for this user.
286
   * @return roles
287
  **/
288
  @ApiModelProperty(value = "The list of [roles](https://docs.adyen.com/account/user-roles) for this user.")
289
  @JsonProperty(JSON_PROPERTY_ROLES)
290
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
291

292
  public List<String> getRoles() {
293
    return roles;
×
294
  }
295

296

297
 /**
298
  * The list of [roles](https://docs.adyen.com/account/user-roles) for this user.
299
  *
300
  * @param roles
301
  */ 
302
  @JsonProperty(JSON_PROPERTY_ROLES)
303
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
304
  public void setRoles(List<String> roles) {
305
    this.roles = roles;
×
306
  }
×
307

308

309
  public UpdateCompanyUserRequest timeZoneCode(String timeZoneCode) {
310
    this.timeZoneCode = timeZoneCode;
×
311
    return this;
×
312
  }
313

314
   /**
315
   * 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**.
316
   * @return timeZoneCode
317
  **/
318
  @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**.")
319
  @JsonProperty(JSON_PROPERTY_TIME_ZONE_CODE)
320
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
321

322
  public String getTimeZoneCode() {
323
    return timeZoneCode;
×
324
  }
325

326

327
 /**
328
  * 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**.
329
  *
330
  * @param timeZoneCode
331
  */ 
332
  @JsonProperty(JSON_PROPERTY_TIME_ZONE_CODE)
333
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
334
  public void setTimeZoneCode(String timeZoneCode) {
335
    this.timeZoneCode = timeZoneCode;
×
336
  }
×
337

338

339
  /**
340
   * Return true if this UpdateCompanyUserRequest object is equal to o.
341
   */
342
  @Override
343
  public boolean equals(Object o) {
344
    if (this == o) {
×
345
      return true;
×
346
    }
347
    if (o == null || getClass() != o.getClass()) {
×
348
      return false;
×
349
    }
350
    UpdateCompanyUserRequest updateCompanyUserRequest = (UpdateCompanyUserRequest) o;
×
351
    return Objects.equals(this.accountGroups, updateCompanyUserRequest.accountGroups) &&
×
352
        Objects.equals(this.active, updateCompanyUserRequest.active) &&
×
353
        Objects.equals(this.associatedMerchantAccounts, updateCompanyUserRequest.associatedMerchantAccounts) &&
×
354
        Objects.equals(this.email, updateCompanyUserRequest.email) &&
×
NEW
355
        Objects.equals(this.loginMethod, updateCompanyUserRequest.loginMethod) &&
×
356
        Objects.equals(this.name, updateCompanyUserRequest.name) &&
×
357
        Objects.equals(this.roles, updateCompanyUserRequest.roles) &&
×
358
        Objects.equals(this.timeZoneCode, updateCompanyUserRequest.timeZoneCode);
×
359
  }
360

361
  @Override
362
  public int hashCode() {
NEW
363
    return Objects.hash(accountGroups, active, associatedMerchantAccounts, email, loginMethod, name, roles, timeZoneCode);
×
364
  }
365

366
  @Override
367
  public String toString() {
368
    StringBuilder sb = new StringBuilder();
×
369
    sb.append("class UpdateCompanyUserRequest {\n");
×
370
    sb.append("    accountGroups: ").append(toIndentedString(accountGroups)).append("\n");
×
371
    sb.append("    active: ").append(toIndentedString(active)).append("\n");
×
372
    sb.append("    associatedMerchantAccounts: ").append(toIndentedString(associatedMerchantAccounts)).append("\n");
×
373
    sb.append("    email: ").append(toIndentedString(email)).append("\n");
×
NEW
374
    sb.append("    loginMethod: ").append(toIndentedString(loginMethod)).append("\n");
×
375
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
×
376
    sb.append("    roles: ").append(toIndentedString(roles)).append("\n");
×
377
    sb.append("    timeZoneCode: ").append(toIndentedString(timeZoneCode)).append("\n");
×
378
    sb.append("}");
×
379
    return sb.toString();
×
380
  }
381

382
  /**
383
   * Convert the given object to string with each line indented by 4 spaces
384
   * (except the first line).
385
   */
386
  private String toIndentedString(Object o) {
387
    if (o == null) {
×
388
      return "null";
×
389
    }
390
    return o.toString().replace("\n", "\n    ");
×
391
  }
392

393
/**
394
   * Create an instance of UpdateCompanyUserRequest given an JSON string
395
   *
396
   * @param jsonString JSON string
397
   * @return An instance of UpdateCompanyUserRequest
398
   * @throws JsonProcessingException if the JSON string is invalid with respect to UpdateCompanyUserRequest
399
   */
400
  public static UpdateCompanyUserRequest fromJson(String jsonString) throws JsonProcessingException {
401
    return JSON.getMapper().readValue(jsonString, UpdateCompanyUserRequest.class);
×
402
  }
403
/**
404
  * Convert an instance of UpdateCompanyUserRequest to an JSON string
405
  *
406
  * @return JSON string
407
  */
408
  public String toJson() throws JsonProcessingException {
409
    return JSON.getMapper().writeValueAsString(this);
×
410
  }
411
}
412

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