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

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

14 Jun 2024 07:13AM UTC coverage: 11.966%. First build
#3322

push

web-flow
Merge 673aaf237 into ac91e3ca5

6 of 369 new or added lines in 46 files covered. (1.63%)

12491 of 104390 relevant lines covered (11.97%)

0.12 hits per line

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

15.71
/src/main/java/com/adyen/model/checkout/VippsDetails.java
1
/*
2
 * Adyen Checkout API
3
 *
4
 * The version of the OpenAPI document: 71
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.checkout;
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
 * VippsDetails
32
 */
33
@JsonPropertyOrder({
34
  VippsDetails.JSON_PROPERTY_CHECKOUT_ATTEMPT_ID,
35
  VippsDetails.JSON_PROPERTY_RECURRING_DETAIL_REFERENCE,
36
  VippsDetails.JSON_PROPERTY_STORED_PAYMENT_METHOD_ID,
37
  VippsDetails.JSON_PROPERTY_SUBTYPE,
38
  VippsDetails.JSON_PROPERTY_TELEPHONE_NUMBER,
39
  VippsDetails.JSON_PROPERTY_TYPE
40
})
41

42
public class VippsDetails {
43
  public static final String JSON_PROPERTY_CHECKOUT_ATTEMPT_ID = "checkoutAttemptId";
44
  private String checkoutAttemptId;
45

46
  public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference";
47
  @Deprecated
48
  private String recurringDetailReference;
49

50
  public static final String JSON_PROPERTY_STORED_PAYMENT_METHOD_ID = "storedPaymentMethodId";
51
  private String storedPaymentMethodId;
52

53
  public static final String JSON_PROPERTY_SUBTYPE = "subtype";
54
  private String subtype;
55

56
  public static final String JSON_PROPERTY_TELEPHONE_NUMBER = "telephoneNumber";
57
  private String telephoneNumber;
58

59
  /**
60
   * **vipps**
61
   */
62
  public enum TypeEnum {
1✔
63
    VIPPS("vipps");
1✔
64

65
    private String value;
66

67
    TypeEnum(String value) {
1✔
68
      this.value = value;
1✔
69
    }
1✔
70

71
    @JsonValue
72
    public String getValue() {
73
      return value;
1✔
74
    }
75

76
    @Override
77
    public String toString() {
78
      return String.valueOf(value);
×
79
    }
80

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

92
  public static final String JSON_PROPERTY_TYPE = "type";
93
  private TypeEnum type;
94

95
  public VippsDetails() { 
1✔
96
  }
1✔
97

98
  public VippsDetails checkoutAttemptId(String checkoutAttemptId) {
99
    this.checkoutAttemptId = checkoutAttemptId;
×
100
    return this;
×
101
  }
102

103
   /**
104
   * The checkout attempt identifier.
105
   * @return checkoutAttemptId
106
  **/
107
  @ApiModelProperty(value = "The checkout attempt identifier.")
108
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
109
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
110

111
  public String getCheckoutAttemptId() {
112
    return checkoutAttemptId;
×
113
  }
114

115

116
 /**
117
  * The checkout attempt identifier.
118
  *
119
  * @param checkoutAttemptId
120
  */ 
121
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
122
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
123
  public void setCheckoutAttemptId(String checkoutAttemptId) {
124
    this.checkoutAttemptId = checkoutAttemptId;
×
125
  }
×
126

127

128
  @Deprecated
129
  public VippsDetails recurringDetailReference(String recurringDetailReference) {
130
    this.recurringDetailReference = recurringDetailReference;
×
131
    return this;
×
132
  }
133

134
   /**
135
   * This is the `recurringDetailReference` returned in the response when you created the token.
136
   * @return recurringDetailReference
137
   * @deprecated
138
  **/
139
  @Deprecated
140
  @ApiModelProperty(value = "This is the `recurringDetailReference` returned in the response when you created the token.")
141
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
142
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
143

144
  public String getRecurringDetailReference() {
145
    return recurringDetailReference;
×
146
  }
147

148

149
 /**
150
  * This is the `recurringDetailReference` returned in the response when you created the token.
151
  *
152
  * @param recurringDetailReference
153
  */ 
154
  @Deprecated
155
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
156
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
157
  public void setRecurringDetailReference(String recurringDetailReference) {
158
    this.recurringDetailReference = recurringDetailReference;
×
159
  }
×
160

161

162
  public VippsDetails storedPaymentMethodId(String storedPaymentMethodId) {
163
    this.storedPaymentMethodId = storedPaymentMethodId;
×
164
    return this;
×
165
  }
166

167
   /**
168
   * This is the `recurringDetailReference` returned in the response when you created the token.
169
   * @return storedPaymentMethodId
170
  **/
171
  @ApiModelProperty(value = "This is the `recurringDetailReference` returned in the response when you created the token.")
172
  @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID)
173
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
174

175
  public String getStoredPaymentMethodId() {
176
    return storedPaymentMethodId;
×
177
  }
178

179

180
 /**
181
  * This is the `recurringDetailReference` returned in the response when you created the token.
182
  *
183
  * @param storedPaymentMethodId
184
  */ 
185
  @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID)
186
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
187
  public void setStoredPaymentMethodId(String storedPaymentMethodId) {
188
    this.storedPaymentMethodId = storedPaymentMethodId;
×
189
  }
×
190

191

192
  public VippsDetails subtype(String subtype) {
NEW
193
    this.subtype = subtype;
×
NEW
194
    return this;
×
195
  }
196

197
   /**
198
   * The payment method subtype.
199
   * @return subtype
200
  **/
201
  @ApiModelProperty(value = "The payment method subtype.")
202
  @JsonProperty(JSON_PROPERTY_SUBTYPE)
203
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
204

205
  public String getSubtype() {
NEW
206
    return subtype;
×
207
  }
208

209

210
 /**
211
  * The payment method subtype.
212
  *
213
  * @param subtype
214
  */ 
215
  @JsonProperty(JSON_PROPERTY_SUBTYPE)
216
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
217
  public void setSubtype(String subtype) {
NEW
218
    this.subtype = subtype;
×
NEW
219
  }
×
220

221

222
  public VippsDetails telephoneNumber(String telephoneNumber) {
223
    this.telephoneNumber = telephoneNumber;
×
224
    return this;
×
225
  }
226

227
   /**
228
   * 
229
   * @return telephoneNumber
230
  **/
231
  @ApiModelProperty(required = true, value = "")
232
  @JsonProperty(JSON_PROPERTY_TELEPHONE_NUMBER)
233
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
234

235
  public String getTelephoneNumber() {
236
    return telephoneNumber;
×
237
  }
238

239

240
 /**
241
  * 
242
  *
243
  * @param telephoneNumber
244
  */ 
245
  @JsonProperty(JSON_PROPERTY_TELEPHONE_NUMBER)
246
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
247
  public void setTelephoneNumber(String telephoneNumber) {
248
    this.telephoneNumber = telephoneNumber;
×
249
  }
×
250

251

252
  public VippsDetails type(TypeEnum type) {
253
    this.type = type;
×
254
    return this;
×
255
  }
256

257
   /**
258
   * **vipps**
259
   * @return type
260
  **/
261
  @ApiModelProperty(value = "**vipps**")
262
  @JsonProperty(JSON_PROPERTY_TYPE)
263
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
264

265
  public TypeEnum getType() {
266
    return type;
×
267
  }
268

269

270
 /**
271
  * **vipps**
272
  *
273
  * @param type
274
  */ 
275
  @JsonProperty(JSON_PROPERTY_TYPE)
276
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
277
  public void setType(TypeEnum type) {
278
    this.type = type;
×
279
  }
×
280

281

282
  /**
283
   * Return true if this VippsDetails object is equal to o.
284
   */
285
  @Override
286
  public boolean equals(Object o) {
287
    if (this == o) {
×
288
      return true;
×
289
    }
290
    if (o == null || getClass() != o.getClass()) {
×
291
      return false;
×
292
    }
293
    VippsDetails vippsDetails = (VippsDetails) o;
×
294
    return Objects.equals(this.checkoutAttemptId, vippsDetails.checkoutAttemptId) &&
×
295
        Objects.equals(this.recurringDetailReference, vippsDetails.recurringDetailReference) &&
×
296
        Objects.equals(this.storedPaymentMethodId, vippsDetails.storedPaymentMethodId) &&
×
NEW
297
        Objects.equals(this.subtype, vippsDetails.subtype) &&
×
298
        Objects.equals(this.telephoneNumber, vippsDetails.telephoneNumber) &&
×
299
        Objects.equals(this.type, vippsDetails.type);
×
300
  }
301

302
  @Override
303
  public int hashCode() {
NEW
304
    return Objects.hash(checkoutAttemptId, recurringDetailReference, storedPaymentMethodId, subtype, telephoneNumber, type);
×
305
  }
306

307
  @Override
308
  public String toString() {
309
    StringBuilder sb = new StringBuilder();
×
310
    sb.append("class VippsDetails {\n");
×
311
    sb.append("    checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n");
×
312
    sb.append("    recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n");
×
313
    sb.append("    storedPaymentMethodId: ").append(toIndentedString(storedPaymentMethodId)).append("\n");
×
NEW
314
    sb.append("    subtype: ").append(toIndentedString(subtype)).append("\n");
×
315
    sb.append("    telephoneNumber: ").append(toIndentedString(telephoneNumber)).append("\n");
×
316
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
317
    sb.append("}");
×
318
    return sb.toString();
×
319
  }
320

321
  /**
322
   * Convert the given object to string with each line indented by 4 spaces
323
   * (except the first line).
324
   */
325
  private String toIndentedString(Object o) {
326
    if (o == null) {
×
327
      return "null";
×
328
    }
329
    return o.toString().replace("\n", "\n    ");
×
330
  }
331

332
/**
333
   * Create an instance of VippsDetails given an JSON string
334
   *
335
   * @param jsonString JSON string
336
   * @return An instance of VippsDetails
337
   * @throws JsonProcessingException if the JSON string is invalid with respect to VippsDetails
338
   */
339
  public static VippsDetails fromJson(String jsonString) throws JsonProcessingException {
340
    return JSON.getMapper().readValue(jsonString, VippsDetails.class);
×
341
  }
342
/**
343
  * Convert an instance of VippsDetails to an JSON string
344
  *
345
  * @return JSON string
346
  */
347
  public String toJson() throws JsonProcessingException {
348
    return JSON.getMapper().writeValueAsString(this);
×
349
  }
350
}
351

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