• 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/PersonalDocumentData.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
 * PersonalDocumentData
33
 */
34
@JsonPropertyOrder({
35
  PersonalDocumentData.JSON_PROPERTY_EXPIRATION_DATE,
36
  PersonalDocumentData.JSON_PROPERTY_ISSUER_COUNTRY,
37
  PersonalDocumentData.JSON_PROPERTY_ISSUER_STATE,
38
  PersonalDocumentData.JSON_PROPERTY_NUMBER,
39
  PersonalDocumentData.JSON_PROPERTY_TYPE
40
})
41

42
public class PersonalDocumentData {
43
  public static final String JSON_PROPERTY_EXPIRATION_DATE = "expirationDate";
44
  private String expirationDate;
45

46
  public static final String JSON_PROPERTY_ISSUER_COUNTRY = "issuerCountry";
47
  private String issuerCountry;
48

49
  public static final String JSON_PROPERTY_ISSUER_STATE = "issuerState";
50
  private String issuerState;
51

52
  public static final String JSON_PROPERTY_NUMBER = "number";
53
  private String number;
54

55
  /**
56
   * The type of the document. Possible values: **ID**, **DRIVINGLICENSE**, **PASSPORT**, **SOCIALSECURITY**, **VISA**.  To delete an existing entry for a document `type`, send only the `type` field in your request. 
57
   */
58
  public enum TypeEnum {
×
59
    DRIVINGLICENSE("DRIVINGLICENSE"),
×
60
    
61
    ID("ID"),
×
62
    
63
    PASSPORT("PASSPORT"),
×
64
    
65
    SOCIALSECURITY("SOCIALSECURITY"),
×
66
    
67
    VISA("VISA");
×
68

69
    private String value;
70

71
    TypeEnum(String value) {
×
72
      this.value = value;
×
73
    }
×
74

75
    @JsonValue
76
    public String getValue() {
77
      return value;
×
78
    }
79

80
    @Override
81
    public String toString() {
82
      return String.valueOf(value);
×
83
    }
84

85
    @JsonCreator
86
    public static TypeEnum fromValue(String value) {
87
      for (TypeEnum b : TypeEnum.values()) {
×
88
        if (b.value.equals(value)) {
×
89
          return b;
×
90
        }
91
      }
92
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
93
    }
94
  }
95

96
  public static final String JSON_PROPERTY_TYPE = "type";
97
  private TypeEnum type;
98

99
  public PersonalDocumentData() { 
×
100
  }
×
101

102
  public PersonalDocumentData expirationDate(String expirationDate) {
103
    this.expirationDate = expirationDate;
×
104
    return this;
×
105
  }
106

107
   /**
108
   * The expiry date of the document,   in ISO-8601 YYYY-MM-DD format. For example, **2000-01-31**.
109
   * @return expirationDate
110
  **/
111
  @ApiModelProperty(value = "The expiry date of the document,   in ISO-8601 YYYY-MM-DD format. For example, **2000-01-31**.")
112
  @JsonProperty(JSON_PROPERTY_EXPIRATION_DATE)
113
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
114

115
  public String getExpirationDate() {
116
    return expirationDate;
×
117
  }
118

119

120
  @JsonProperty(JSON_PROPERTY_EXPIRATION_DATE)
121
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
122
  public void setExpirationDate(String expirationDate) {
123
    this.expirationDate = expirationDate;
×
124
  }
×
125

126

127
  public PersonalDocumentData issuerCountry(String issuerCountry) {
128
    this.issuerCountry = issuerCountry;
×
129
    return this;
×
130
  }
131

132
   /**
133
   * The country where the document was issued, in the two-character  [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **NL**.
134
   * @return issuerCountry
135
  **/
136
  @ApiModelProperty(value = "The country where the document was issued, in the two-character  [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **NL**.")
137
  @JsonProperty(JSON_PROPERTY_ISSUER_COUNTRY)
138
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
139

140
  public String getIssuerCountry() {
141
    return issuerCountry;
×
142
  }
143

144

145
  @JsonProperty(JSON_PROPERTY_ISSUER_COUNTRY)
146
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
147
  public void setIssuerCountry(String issuerCountry) {
148
    this.issuerCountry = issuerCountry;
×
149
  }
×
150

151

152
  public PersonalDocumentData issuerState(String issuerState) {
153
    this.issuerState = issuerState;
×
154
    return this;
×
155
  }
156

157
   /**
158
   * The state where the document was issued (if applicable).
159
   * @return issuerState
160
  **/
161
  @ApiModelProperty(value = "The state where the document was issued (if applicable).")
162
  @JsonProperty(JSON_PROPERTY_ISSUER_STATE)
163
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
164

165
  public String getIssuerState() {
166
    return issuerState;
×
167
  }
168

169

170
  @JsonProperty(JSON_PROPERTY_ISSUER_STATE)
171
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
172
  public void setIssuerState(String issuerState) {
173
    this.issuerState = issuerState;
×
174
  }
×
175

176

177
  public PersonalDocumentData number(String number) {
178
    this.number = number;
×
179
    return this;
×
180
  }
181

182
   /**
183
   * The number in the document.
184
   * @return number
185
  **/
186
  @ApiModelProperty(value = "The number in the document.")
187
  @JsonProperty(JSON_PROPERTY_NUMBER)
188
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
189

190
  public String getNumber() {
191
    return number;
×
192
  }
193

194

195
  @JsonProperty(JSON_PROPERTY_NUMBER)
196
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
197
  public void setNumber(String number) {
198
    this.number = number;
×
199
  }
×
200

201

202
  public PersonalDocumentData type(TypeEnum type) {
203
    this.type = type;
×
204
    return this;
×
205
  }
206

207
   /**
208
   * The type of the document. Possible values: **ID**, **DRIVINGLICENSE**, **PASSPORT**, **SOCIALSECURITY**, **VISA**.  To delete an existing entry for a document `type`, send only the `type` field in your request. 
209
   * @return type
210
  **/
211
  @ApiModelProperty(required = true, value = "The type of the document. Possible values: **ID**, **DRIVINGLICENSE**, **PASSPORT**, **SOCIALSECURITY**, **VISA**.  To delete an existing entry for a document `type`, send only the `type` field in your request. ")
212
  @JsonProperty(JSON_PROPERTY_TYPE)
213
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
214

215
  public TypeEnum getType() {
216
    return type;
×
217
  }
218

219

220
  @JsonProperty(JSON_PROPERTY_TYPE)
221
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
222
  public void setType(TypeEnum type) {
223
    this.type = type;
×
224
  }
×
225

226

227
  /**
228
   * Return true if this PersonalDocumentData object is equal to o.
229
   */
230
  @Override
231
  public boolean equals(Object o) {
232
    if (this == o) {
×
233
      return true;
×
234
    }
235
    if (o == null || getClass() != o.getClass()) {
×
236
      return false;
×
237
    }
238
    PersonalDocumentData personalDocumentData = (PersonalDocumentData) o;
×
239
    return Objects.equals(this.expirationDate, personalDocumentData.expirationDate) &&
×
240
        Objects.equals(this.issuerCountry, personalDocumentData.issuerCountry) &&
×
241
        Objects.equals(this.issuerState, personalDocumentData.issuerState) &&
×
242
        Objects.equals(this.number, personalDocumentData.number) &&
×
243
        Objects.equals(this.type, personalDocumentData.type);
×
244
  }
245

246
  @Override
247
  public int hashCode() {
248
    return Objects.hash(expirationDate, issuerCountry, issuerState, number, type);
×
249
  }
250

251
  @Override
252
  public String toString() {
253
    StringBuilder sb = new StringBuilder();
×
254
    sb.append("class PersonalDocumentData {\n");
×
255
    sb.append("    expirationDate: ").append(toIndentedString(expirationDate)).append("\n");
×
256
    sb.append("    issuerCountry: ").append(toIndentedString(issuerCountry)).append("\n");
×
257
    sb.append("    issuerState: ").append(toIndentedString(issuerState)).append("\n");
×
258
    sb.append("    number: ").append(toIndentedString(number)).append("\n");
×
259
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
260
    sb.append("}");
×
261
    return sb.toString();
×
262
  }
263

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

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

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