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

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

51
  public static final String JSON_PROPERTY_ASSOCIATED_MERCHANT_ACCOUNTS = "associatedMerchantAccounts";
52
  private List<String> associatedMerchantAccounts = null;
×
53

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

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

60
  public static final String JSON_PROPERTY_NAME = "name";
61
  private Name name;
62

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

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

69
  public static final String JSON_PROPERTY_USERNAME = "username";
70
  private String username;
71

72
  public CreateCompanyUserRequest() { 
×
73
  }
×
74

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

80
  public CreateCompanyUserRequest 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 CreateCompanyUserRequest associatedMerchantAccounts(List<String> associatedMerchantAccounts) {
114
    this.associatedMerchantAccounts = associatedMerchantAccounts;
×
115
    return this;
×
116
  }
117

118
  public CreateCompanyUserRequest addAssociatedMerchantAccountsItem(String associatedMerchantAccountsItem) {
119
    if (this.associatedMerchantAccounts == null) {
×
120
      this.associatedMerchantAccounts = new ArrayList<>();
×
121
    }
122
    this.associatedMerchantAccounts.add(associatedMerchantAccountsItem);
×
123
    return this;
×
124
  }
125

126
   /**
127
   * The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user.
128
   * @return associatedMerchantAccounts
129
  **/
130
  @ApiModelProperty(value = "The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user.")
131
  @JsonProperty(JSON_PROPERTY_ASSOCIATED_MERCHANT_ACCOUNTS)
132
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
133

134
  public List<String> getAssociatedMerchantAccounts() {
135
    return associatedMerchantAccounts;
×
136
  }
137

138

139
 /**
140
  * The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user.
141
  *
142
  * @param associatedMerchantAccounts
143
  */ 
144
  @JsonProperty(JSON_PROPERTY_ASSOCIATED_MERCHANT_ACCOUNTS)
145
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
146
  public void setAssociatedMerchantAccounts(List<String> associatedMerchantAccounts) {
147
    this.associatedMerchantAccounts = associatedMerchantAccounts;
×
148
  }
×
149

150

151
  public CreateCompanyUserRequest email(String email) {
152
    this.email = email;
×
153
    return this;
×
154
  }
155

156
   /**
157
   * The email address of the user.
158
   * @return email
159
  **/
160
  @ApiModelProperty(required = true, value = "The email address of the user.")
161
  @JsonProperty(JSON_PROPERTY_EMAIL)
162
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
163

164
  public String getEmail() {
165
    return email;
×
166
  }
167

168

169
 /**
170
  * The email address of the user.
171
  *
172
  * @param email
173
  */ 
174
  @JsonProperty(JSON_PROPERTY_EMAIL)
175
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
176
  public void setEmail(String email) {
177
    this.email = email;
×
178
  }
×
179

180

181
  public CreateCompanyUserRequest loginMethod(String loginMethod) {
NEW
182
    this.loginMethod = loginMethod;
×
NEW
183
    return this;
×
184
  }
185

186
   /**
187
   * 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** 
188
   * @return loginMethod
189
  **/
190
  @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** ")
191
  @JsonProperty(JSON_PROPERTY_LOGIN_METHOD)
192
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
193

194
  public String getLoginMethod() {
NEW
195
    return loginMethod;
×
196
  }
197

198

199
 /**
200
  * 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** 
201
  *
202
  * @param loginMethod
203
  */ 
204
  @JsonProperty(JSON_PROPERTY_LOGIN_METHOD)
205
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
206
  public void setLoginMethod(String loginMethod) {
NEW
207
    this.loginMethod = loginMethod;
×
NEW
208
  }
×
209

210

211
  public CreateCompanyUserRequest name(Name name) {
212
    this.name = name;
×
213
    return this;
×
214
  }
215

216
   /**
217
   * Get name
218
   * @return name
219
  **/
220
  @ApiModelProperty(required = true, value = "")
221
  @JsonProperty(JSON_PROPERTY_NAME)
222
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
223

224
  public Name getName() {
225
    return name;
×
226
  }
227

228

229
 /**
230
  * name
231
  *
232
  * @param name
233
  */ 
234
  @JsonProperty(JSON_PROPERTY_NAME)
235
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
236
  public void setName(Name name) {
237
    this.name = name;
×
238
  }
×
239

240

241
  public CreateCompanyUserRequest roles(List<String> roles) {
242
    this.roles = roles;
×
243
    return this;
×
244
  }
245

246
  public CreateCompanyUserRequest addRolesItem(String rolesItem) {
247
    if (this.roles == null) {
×
248
      this.roles = new ArrayList<>();
×
249
    }
250
    this.roles.add(rolesItem);
×
251
    return this;
×
252
  }
253

254
   /**
255
   * The list of [roles](https://docs.adyen.com/account/user-roles) for this user.
256
   * @return roles
257
  **/
258
  @ApiModelProperty(value = "The list of [roles](https://docs.adyen.com/account/user-roles) for this user.")
259
  @JsonProperty(JSON_PROPERTY_ROLES)
260
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
261

262
  public List<String> getRoles() {
263
    return roles;
×
264
  }
265

266

267
 /**
268
  * The list of [roles](https://docs.adyen.com/account/user-roles) for this user.
269
  *
270
  * @param roles
271
  */ 
272
  @JsonProperty(JSON_PROPERTY_ROLES)
273
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
274
  public void setRoles(List<String> roles) {
275
    this.roles = roles;
×
276
  }
×
277

278

279
  public CreateCompanyUserRequest timeZoneCode(String timeZoneCode) {
280
    this.timeZoneCode = timeZoneCode;
×
281
    return this;
×
282
  }
283

284
   /**
285
   * 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**.
286
   * @return timeZoneCode
287
  **/
288
  @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**.")
289
  @JsonProperty(JSON_PROPERTY_TIME_ZONE_CODE)
290
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
291

292
  public String getTimeZoneCode() {
293
    return timeZoneCode;
×
294
  }
295

296

297
 /**
298
  * 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**.
299
  *
300
  * @param timeZoneCode
301
  */ 
302
  @JsonProperty(JSON_PROPERTY_TIME_ZONE_CODE)
303
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
304
  public void setTimeZoneCode(String timeZoneCode) {
305
    this.timeZoneCode = timeZoneCode;
×
306
  }
×
307

308

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

314
   /**
315
   * The user&#39;s email address that will be their username. Must be the same as the one in the &#x60;email&#x60; field.
316
   * @return username
317
  **/
318
  @ApiModelProperty(required = true, value = "The user's email address that will be their username. Must be the same as the one in the `email` field.")
319
  @JsonProperty(JSON_PROPERTY_USERNAME)
320
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
321

322
  public String getUsername() {
323
    return username;
×
324
  }
325

326

327
 /**
328
  * The user&#39;s email address that will be their username. Must be the same as the one in the &#x60;email&#x60; field.
329
  *
330
  * @param username
331
  */ 
332
  @JsonProperty(JSON_PROPERTY_USERNAME)
333
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
334
  public void setUsername(String username) {
335
    this.username = username;
×
336
  }
×
337

338

339
  /**
340
   * Return true if this CreateCompanyUserRequest 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
    CreateCompanyUserRequest createCompanyUserRequest = (CreateCompanyUserRequest) o;
×
351
    return Objects.equals(this.accountGroups, createCompanyUserRequest.accountGroups) &&
×
352
        Objects.equals(this.associatedMerchantAccounts, createCompanyUserRequest.associatedMerchantAccounts) &&
×
353
        Objects.equals(this.email, createCompanyUserRequest.email) &&
×
NEW
354
        Objects.equals(this.loginMethod, createCompanyUserRequest.loginMethod) &&
×
355
        Objects.equals(this.name, createCompanyUserRequest.name) &&
×
356
        Objects.equals(this.roles, createCompanyUserRequest.roles) &&
×
357
        Objects.equals(this.timeZoneCode, createCompanyUserRequest.timeZoneCode) &&
×
358
        Objects.equals(this.username, createCompanyUserRequest.username);
×
359
  }
360

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

366
  @Override
367
  public String toString() {
368
    StringBuilder sb = new StringBuilder();
×
369
    sb.append("class CreateCompanyUserRequest {\n");
×
370
    sb.append("    accountGroups: ").append(toIndentedString(accountGroups)).append("\n");
×
371
    sb.append("    associatedMerchantAccounts: ").append(toIndentedString(associatedMerchantAccounts)).append("\n");
×
372
    sb.append("    email: ").append(toIndentedString(email)).append("\n");
×
NEW
373
    sb.append("    loginMethod: ").append(toIndentedString(loginMethod)).append("\n");
×
374
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
×
375
    sb.append("    roles: ").append(toIndentedString(roles)).append("\n");
×
376
    sb.append("    timeZoneCode: ").append(toIndentedString(timeZoneCode)).append("\n");
×
377
    sb.append("    username: ").append(toIndentedString(username)).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 CreateCompanyUserRequest given an JSON string
395
   *
396
   * @param jsonString JSON string
397
   * @return An instance of CreateCompanyUserRequest
398
   * @throws JsonProcessingException if the JSON string is invalid with respect to CreateCompanyUserRequest
399
   */
400
  public static CreateCompanyUserRequest fromJson(String jsonString) throws JsonProcessingException {
401
    return JSON.getMapper().readValue(jsonString, CreateCompanyUserRequest.class);
×
402
  }
403
/**
404
  * Convert an instance of CreateCompanyUserRequest 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