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

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

50
  public static final String JSON_PROPERTY_EMAIL = "email";
51
  private String email;
52

53
  public static final String JSON_PROPERTY_LOGIN_METHOD = "loginMethod";
54
  private String loginMethod;
55

56
  public static final String JSON_PROPERTY_NAME = "name";
57
  private Name name;
58

59
  public static final String JSON_PROPERTY_ROLES = "roles";
60
  private List<String> roles = null;
×
61

62
  public static final String JSON_PROPERTY_TIME_ZONE_CODE = "timeZoneCode";
63
  private String timeZoneCode;
64

65
  public static final String JSON_PROPERTY_USERNAME = "username";
66
  private String username;
67

68
  public CreateMerchantUserRequest() { 
×
69
  }
×
70

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

76
  public CreateMerchantUserRequest 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 CreateMerchantUserRequest email(String email) {
110
    this.email = email;
×
111
    return this;
×
112
  }
113

114
   /**
115
   * The email address of the user.
116
   * @return email
117
  **/
118
  @ApiModelProperty(required = true, value = "The email address of the user.")
119
  @JsonProperty(JSON_PROPERTY_EMAIL)
120
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
121

122
  public String getEmail() {
123
    return email;
×
124
  }
125

126

127
 /**
128
  * The email address of the user.
129
  *
130
  * @param email
131
  */ 
132
  @JsonProperty(JSON_PROPERTY_EMAIL)
133
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
134
  public void setEmail(String email) {
135
    this.email = email;
×
136
  }
×
137

138

139
  public CreateMerchantUserRequest loginMethod(String loginMethod) {
NEW
140
    this.loginMethod = loginMethod;
×
NEW
141
    return this;
×
142
  }
143

144
   /**
145
   * 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** 
146
   * @return loginMethod
147
  **/
148
  @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** ")
149
  @JsonProperty(JSON_PROPERTY_LOGIN_METHOD)
150
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
151

152
  public String getLoginMethod() {
NEW
153
    return loginMethod;
×
154
  }
155

156

157
 /**
158
  * 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** 
159
  *
160
  * @param loginMethod
161
  */ 
162
  @JsonProperty(JSON_PROPERTY_LOGIN_METHOD)
163
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
164
  public void setLoginMethod(String loginMethod) {
NEW
165
    this.loginMethod = loginMethod;
×
NEW
166
  }
×
167

168

169
  public CreateMerchantUserRequest name(Name name) {
170
    this.name = name;
×
171
    return this;
×
172
  }
173

174
   /**
175
   * Get name
176
   * @return name
177
  **/
178
  @ApiModelProperty(required = true, value = "")
179
  @JsonProperty(JSON_PROPERTY_NAME)
180
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
181

182
  public Name getName() {
183
    return name;
×
184
  }
185

186

187
 /**
188
  * name
189
  *
190
  * @param name
191
  */ 
192
  @JsonProperty(JSON_PROPERTY_NAME)
193
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
194
  public void setName(Name name) {
195
    this.name = name;
×
196
  }
×
197

198

199
  public CreateMerchantUserRequest roles(List<String> roles) {
200
    this.roles = roles;
×
201
    return this;
×
202
  }
203

204
  public CreateMerchantUserRequest addRolesItem(String rolesItem) {
205
    if (this.roles == null) {
×
206
      this.roles = new ArrayList<>();
×
207
    }
208
    this.roles.add(rolesItem);
×
209
    return this;
×
210
  }
211

212
   /**
213
   * The list of [roles](https://docs.adyen.com/account/user-roles) for this user.
214
   * @return roles
215
  **/
216
  @ApiModelProperty(value = "The list of [roles](https://docs.adyen.com/account/user-roles) for this user.")
217
  @JsonProperty(JSON_PROPERTY_ROLES)
218
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
219

220
  public List<String> getRoles() {
221
    return roles;
×
222
  }
223

224

225
 /**
226
  * The list of [roles](https://docs.adyen.com/account/user-roles) for this user.
227
  *
228
  * @param roles
229
  */ 
230
  @JsonProperty(JSON_PROPERTY_ROLES)
231
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
232
  public void setRoles(List<String> roles) {
233
    this.roles = roles;
×
234
  }
×
235

236

237
  public CreateMerchantUserRequest timeZoneCode(String timeZoneCode) {
238
    this.timeZoneCode = timeZoneCode;
×
239
    return this;
×
240
  }
241

242
   /**
243
   * 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**.
244
   * @return timeZoneCode
245
  **/
246
  @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**.")
247
  @JsonProperty(JSON_PROPERTY_TIME_ZONE_CODE)
248
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
249

250
  public String getTimeZoneCode() {
251
    return timeZoneCode;
×
252
  }
253

254

255
 /**
256
  * 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**.
257
  *
258
  * @param timeZoneCode
259
  */ 
260
  @JsonProperty(JSON_PROPERTY_TIME_ZONE_CODE)
261
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
262
  public void setTimeZoneCode(String timeZoneCode) {
263
    this.timeZoneCode = timeZoneCode;
×
264
  }
×
265

266

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

272
   /**
273
   * The user&#39;s email address that will be their username. Must be the same as the one in the &#x60;email&#x60; field.
274
   * @return username
275
  **/
276
  @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.")
277
  @JsonProperty(JSON_PROPERTY_USERNAME)
278
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
279

280
  public String getUsername() {
281
    return username;
×
282
  }
283

284

285
 /**
286
  * The user&#39;s email address that will be their username. Must be the same as the one in the &#x60;email&#x60; field.
287
  *
288
  * @param username
289
  */ 
290
  @JsonProperty(JSON_PROPERTY_USERNAME)
291
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
292
  public void setUsername(String username) {
293
    this.username = username;
×
294
  }
×
295

296

297
  /**
298
   * Return true if this CreateMerchantUserRequest 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
    CreateMerchantUserRequest createMerchantUserRequest = (CreateMerchantUserRequest) o;
×
309
    return Objects.equals(this.accountGroups, createMerchantUserRequest.accountGroups) &&
×
310
        Objects.equals(this.email, createMerchantUserRequest.email) &&
×
NEW
311
        Objects.equals(this.loginMethod, createMerchantUserRequest.loginMethod) &&
×
312
        Objects.equals(this.name, createMerchantUserRequest.name) &&
×
313
        Objects.equals(this.roles, createMerchantUserRequest.roles) &&
×
314
        Objects.equals(this.timeZoneCode, createMerchantUserRequest.timeZoneCode) &&
×
315
        Objects.equals(this.username, createMerchantUserRequest.username);
×
316
  }
317

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

323
  @Override
324
  public String toString() {
325
    StringBuilder sb = new StringBuilder();
×
326
    sb.append("class CreateMerchantUserRequest {\n");
×
327
    sb.append("    accountGroups: ").append(toIndentedString(accountGroups)).append("\n");
×
328
    sb.append("    email: ").append(toIndentedString(email)).append("\n");
×
NEW
329
    sb.append("    loginMethod: ").append(toIndentedString(loginMethod)).append("\n");
×
330
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
×
331
    sb.append("    roles: ").append(toIndentedString(roles)).append("\n");
×
332
    sb.append("    timeZoneCode: ").append(toIndentedString(timeZoneCode)).append("\n");
×
333
    sb.append("    username: ").append(toIndentedString(username)).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 CreateMerchantUserRequest given an JSON string
351
   *
352
   * @param jsonString JSON string
353
   * @return An instance of CreateMerchantUserRequest
354
   * @throws JsonProcessingException if the JSON string is invalid with respect to CreateMerchantUserRequest
355
   */
356
  public static CreateMerchantUserRequest fromJson(String jsonString) throws JsonProcessingException {
357
    return JSON.getMapper().readValue(jsonString, CreateMerchantUserRequest.class);
×
358
  }
359
/**
360
  * Convert an instance of CreateMerchantUserRequest 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