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

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

16 Oct 2023 09:08AM CUT coverage: 12.568%. First build
#2703

push

web-flow
Merge 5bb3765b7 into fe719ccb3

6014 of 6014 new or added lines in 86 files covered. (100.0%)

11852 of 94302 relevant lines covered (12.57%)

0.13 hits per line

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

35.82
/src/main/java/com/adyen/model/marketpaywebhooks/PersonalDocumentData.java
1
/*
2
 * Classic Platforms - Notifications
3
 *
4
 * The version of the OpenAPI document: 6
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.marketpaywebhooks;
14

15
import java.util.Objects;
16
import java.util.Arrays;
17
import java.util.Map;
18
import java.util.HashMap;
19
import com.fasterxml.jackson.annotation.JsonInclude;
20
import com.fasterxml.jackson.annotation.JsonProperty;
21
import com.fasterxml.jackson.annotation.JsonCreator;
22
import com.fasterxml.jackson.annotation.JsonTypeName;
23
import com.fasterxml.jackson.annotation.JsonValue;
24
import io.swagger.annotations.ApiModel;
25
import io.swagger.annotations.ApiModelProperty;
26
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
27
import com.fasterxml.jackson.core.JsonProcessingException;
28

29

30
/**
31
 * PersonalDocumentData
32
 */
33
@JsonPropertyOrder({
34
  PersonalDocumentData.JSON_PROPERTY_EXPIRATION_DATE,
35
  PersonalDocumentData.JSON_PROPERTY_ISSUER_COUNTRY,
36
  PersonalDocumentData.JSON_PROPERTY_ISSUER_STATE,
37
  PersonalDocumentData.JSON_PROPERTY_NUMBER,
38
  PersonalDocumentData.JSON_PROPERTY_TYPE
39
})
40

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

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

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

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

54
  /**
55
   * 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. 
56
   */
57
  public enum TypeEnum {
1✔
58
    DRIVINGLICENSE("DRIVINGLICENSE"),
1✔
59
    
60
    ID("ID"),
1✔
61
    
62
    PASSPORT("PASSPORT"),
1✔
63
    
64
    SOCIALSECURITY("SOCIALSECURITY"),
1✔
65
    
66
    VISA("VISA");
1✔
67

68
    private String value;
69

70
    TypeEnum(String value) {
1✔
71
      this.value = value;
1✔
72
    }
1✔
73

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

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

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

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

98
  public PersonalDocumentData() { 
1✔
99
  }
1✔
100

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

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

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

118

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

125

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

131
   /**
132
   * 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**.
133
   * @return issuerCountry
134
  **/
135
  @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**.")
136
  @JsonProperty(JSON_PROPERTY_ISSUER_COUNTRY)
137
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
138

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

143

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

150

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

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

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

168

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

175

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

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

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

193

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

200

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

206
   /**
207
   * 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. 
208
   * @return type
209
  **/
210
  @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. ")
211
  @JsonProperty(JSON_PROPERTY_TYPE)
212
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
213

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

218

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

225

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

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

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

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

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

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

© 2025 Coveralls, Inc