• 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

16.09
/src/main/java/com/adyen/model/checkout/AfterpayDetails.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
 * AfterpayDetails
32
 */
33
@JsonPropertyOrder({
34
  AfterpayDetails.JSON_PROPERTY_BILLING_ADDRESS,
35
  AfterpayDetails.JSON_PROPERTY_CHECKOUT_ATTEMPT_ID,
36
  AfterpayDetails.JSON_PROPERTY_DELIVERY_ADDRESS,
37
  AfterpayDetails.JSON_PROPERTY_PERSONAL_DETAILS,
38
  AfterpayDetails.JSON_PROPERTY_RECURRING_DETAIL_REFERENCE,
39
  AfterpayDetails.JSON_PROPERTY_STORED_PAYMENT_METHOD_ID,
40
  AfterpayDetails.JSON_PROPERTY_SUBTYPE,
41
  AfterpayDetails.JSON_PROPERTY_TYPE
42
})
43

44
public class AfterpayDetails {
45
  public static final String JSON_PROPERTY_BILLING_ADDRESS = "billingAddress";
46
  private String billingAddress;
47

48
  public static final String JSON_PROPERTY_CHECKOUT_ATTEMPT_ID = "checkoutAttemptId";
49
  private String checkoutAttemptId;
50

51
  public static final String JSON_PROPERTY_DELIVERY_ADDRESS = "deliveryAddress";
52
  private String deliveryAddress;
53

54
  public static final String JSON_PROPERTY_PERSONAL_DETAILS = "personalDetails";
55
  private String personalDetails;
56

57
  public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference";
58
  @Deprecated
59
  private String recurringDetailReference;
60

61
  public static final String JSON_PROPERTY_STORED_PAYMENT_METHOD_ID = "storedPaymentMethodId";
62
  private String storedPaymentMethodId;
63

64
  public static final String JSON_PROPERTY_SUBTYPE = "subtype";
65
  private String subtype;
66

67
  /**
68
   * **afterpay_default**
69
   */
70
  public enum TypeEnum {
1✔
71
    AFTERPAY_DEFAULT("afterpay_default"),
1✔
72
    
73
    AFTERPAYTOUCH("afterpaytouch"),
1✔
74
    
75
    AFTERPAY_B2B("afterpay_b2b"),
1✔
76
    
77
    CLEARPAY("clearpay");
1✔
78

79
    private String value;
80

81
    TypeEnum(String value) {
1✔
82
      this.value = value;
1✔
83
    }
1✔
84

85
    @JsonValue
86
    public String getValue() {
87
      return value;
1✔
88
    }
89

90
    @Override
91
    public String toString() {
92
      return String.valueOf(value);
×
93
    }
94

95
    @JsonCreator
96
    public static TypeEnum fromValue(String value) {
97
      for (TypeEnum b : TypeEnum.values()) {
1✔
98
        if (b.value.equals(value)) {
1✔
99
          return b;
×
100
        }
101
      }
102
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
1✔
103
    }
104
  }
105

106
  public static final String JSON_PROPERTY_TYPE = "type";
107
  private TypeEnum type;
108

109
  public AfterpayDetails() { 
1✔
110
  }
1✔
111

112
  public AfterpayDetails billingAddress(String billingAddress) {
113
    this.billingAddress = billingAddress;
×
114
    return this;
×
115
  }
116

117
   /**
118
   * The address where to send the invoice.
119
   * @return billingAddress
120
  **/
121
  @ApiModelProperty(value = "The address where to send the invoice.")
122
  @JsonProperty(JSON_PROPERTY_BILLING_ADDRESS)
123
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
124

125
  public String getBillingAddress() {
126
    return billingAddress;
×
127
  }
128

129

130
 /**
131
  * The address where to send the invoice.
132
  *
133
  * @param billingAddress
134
  */ 
135
  @JsonProperty(JSON_PROPERTY_BILLING_ADDRESS)
136
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
137
  public void setBillingAddress(String billingAddress) {
138
    this.billingAddress = billingAddress;
×
139
  }
×
140

141

142
  public AfterpayDetails checkoutAttemptId(String checkoutAttemptId) {
143
    this.checkoutAttemptId = checkoutAttemptId;
×
144
    return this;
×
145
  }
146

147
   /**
148
   * The checkout attempt identifier.
149
   * @return checkoutAttemptId
150
  **/
151
  @ApiModelProperty(value = "The checkout attempt identifier.")
152
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
153
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
154

155
  public String getCheckoutAttemptId() {
156
    return checkoutAttemptId;
×
157
  }
158

159

160
 /**
161
  * The checkout attempt identifier.
162
  *
163
  * @param checkoutAttemptId
164
  */ 
165
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
166
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
167
  public void setCheckoutAttemptId(String checkoutAttemptId) {
168
    this.checkoutAttemptId = checkoutAttemptId;
×
169
  }
×
170

171

172
  public AfterpayDetails deliveryAddress(String deliveryAddress) {
173
    this.deliveryAddress = deliveryAddress;
×
174
    return this;
×
175
  }
176

177
   /**
178
   * The address where the goods should be delivered.
179
   * @return deliveryAddress
180
  **/
181
  @ApiModelProperty(value = "The address where the goods should be delivered.")
182
  @JsonProperty(JSON_PROPERTY_DELIVERY_ADDRESS)
183
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
184

185
  public String getDeliveryAddress() {
186
    return deliveryAddress;
×
187
  }
188

189

190
 /**
191
  * The address where the goods should be delivered.
192
  *
193
  * @param deliveryAddress
194
  */ 
195
  @JsonProperty(JSON_PROPERTY_DELIVERY_ADDRESS)
196
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
197
  public void setDeliveryAddress(String deliveryAddress) {
198
    this.deliveryAddress = deliveryAddress;
×
199
  }
×
200

201

202
  public AfterpayDetails personalDetails(String personalDetails) {
203
    this.personalDetails = personalDetails;
×
204
    return this;
×
205
  }
206

207
   /**
208
   * Shopper name, date of birth, phone number, and email address.
209
   * @return personalDetails
210
  **/
211
  @ApiModelProperty(value = "Shopper name, date of birth, phone number, and email address.")
212
  @JsonProperty(JSON_PROPERTY_PERSONAL_DETAILS)
213
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
214

215
  public String getPersonalDetails() {
216
    return personalDetails;
×
217
  }
218

219

220
 /**
221
  * Shopper name, date of birth, phone number, and email address.
222
  *
223
  * @param personalDetails
224
  */ 
225
  @JsonProperty(JSON_PROPERTY_PERSONAL_DETAILS)
226
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
227
  public void setPersonalDetails(String personalDetails) {
228
    this.personalDetails = personalDetails;
×
229
  }
×
230

231

232
  @Deprecated
233
  public AfterpayDetails recurringDetailReference(String recurringDetailReference) {
234
    this.recurringDetailReference = recurringDetailReference;
×
235
    return this;
×
236
  }
237

238
   /**
239
   * This is the `recurringDetailReference` returned in the response when you created the token.
240
   * @return recurringDetailReference
241
   * @deprecated
242
  **/
243
  @Deprecated
244
  @ApiModelProperty(value = "This is the `recurringDetailReference` returned in the response when you created the token.")
245
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
246
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
247

248
  public String getRecurringDetailReference() {
249
    return recurringDetailReference;
×
250
  }
251

252

253
 /**
254
  * This is the `recurringDetailReference` returned in the response when you created the token.
255
  *
256
  * @param recurringDetailReference
257
  */ 
258
  @Deprecated
259
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
260
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
261
  public void setRecurringDetailReference(String recurringDetailReference) {
262
    this.recurringDetailReference = recurringDetailReference;
×
263
  }
×
264

265

266
  public AfterpayDetails storedPaymentMethodId(String storedPaymentMethodId) {
267
    this.storedPaymentMethodId = storedPaymentMethodId;
×
268
    return this;
×
269
  }
270

271
   /**
272
   * This is the `recurringDetailReference` returned in the response when you created the token.
273
   * @return storedPaymentMethodId
274
  **/
275
  @ApiModelProperty(value = "This is the `recurringDetailReference` returned in the response when you created the token.")
276
  @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID)
277
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
278

279
  public String getStoredPaymentMethodId() {
280
    return storedPaymentMethodId;
×
281
  }
282

283

284
 /**
285
  * This is the `recurringDetailReference` returned in the response when you created the token.
286
  *
287
  * @param storedPaymentMethodId
288
  */ 
289
  @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID)
290
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
291
  public void setStoredPaymentMethodId(String storedPaymentMethodId) {
292
    this.storedPaymentMethodId = storedPaymentMethodId;
×
293
  }
×
294

295

296
  public AfterpayDetails subtype(String subtype) {
NEW
297
    this.subtype = subtype;
×
NEW
298
    return this;
×
299
  }
300

301
   /**
302
   * The payment method subtype.
303
   * @return subtype
304
  **/
305
  @ApiModelProperty(value = "The payment method subtype.")
306
  @JsonProperty(JSON_PROPERTY_SUBTYPE)
307
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
308

309
  public String getSubtype() {
NEW
310
    return subtype;
×
311
  }
312

313

314
 /**
315
  * The payment method subtype.
316
  *
317
  * @param subtype
318
  */ 
319
  @JsonProperty(JSON_PROPERTY_SUBTYPE)
320
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
321
  public void setSubtype(String subtype) {
NEW
322
    this.subtype = subtype;
×
NEW
323
  }
×
324

325

326
  public AfterpayDetails type(TypeEnum type) {
327
    this.type = type;
×
328
    return this;
×
329
  }
330

331
   /**
332
   * **afterpay_default**
333
   * @return type
334
  **/
335
  @ApiModelProperty(required = true, value = "**afterpay_default**")
336
  @JsonProperty(JSON_PROPERTY_TYPE)
337
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
338

339
  public TypeEnum getType() {
340
    return type;
×
341
  }
342

343

344
 /**
345
  * **afterpay_default**
346
  *
347
  * @param type
348
  */ 
349
  @JsonProperty(JSON_PROPERTY_TYPE)
350
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
351
  public void setType(TypeEnum type) {
352
    this.type = type;
×
353
  }
×
354

355

356
  /**
357
   * Return true if this AfterpayDetails object is equal to o.
358
   */
359
  @Override
360
  public boolean equals(Object o) {
361
    if (this == o) {
×
362
      return true;
×
363
    }
364
    if (o == null || getClass() != o.getClass()) {
×
365
      return false;
×
366
    }
367
    AfterpayDetails afterpayDetails = (AfterpayDetails) o;
×
368
    return Objects.equals(this.billingAddress, afterpayDetails.billingAddress) &&
×
369
        Objects.equals(this.checkoutAttemptId, afterpayDetails.checkoutAttemptId) &&
×
370
        Objects.equals(this.deliveryAddress, afterpayDetails.deliveryAddress) &&
×
371
        Objects.equals(this.personalDetails, afterpayDetails.personalDetails) &&
×
372
        Objects.equals(this.recurringDetailReference, afterpayDetails.recurringDetailReference) &&
×
373
        Objects.equals(this.storedPaymentMethodId, afterpayDetails.storedPaymentMethodId) &&
×
NEW
374
        Objects.equals(this.subtype, afterpayDetails.subtype) &&
×
375
        Objects.equals(this.type, afterpayDetails.type);
×
376
  }
377

378
  @Override
379
  public int hashCode() {
NEW
380
    return Objects.hash(billingAddress, checkoutAttemptId, deliveryAddress, personalDetails, recurringDetailReference, storedPaymentMethodId, subtype, type);
×
381
  }
382

383
  @Override
384
  public String toString() {
385
    StringBuilder sb = new StringBuilder();
×
386
    sb.append("class AfterpayDetails {\n");
×
387
    sb.append("    billingAddress: ").append(toIndentedString(billingAddress)).append("\n");
×
388
    sb.append("    checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n");
×
389
    sb.append("    deliveryAddress: ").append(toIndentedString(deliveryAddress)).append("\n");
×
390
    sb.append("    personalDetails: ").append(toIndentedString(personalDetails)).append("\n");
×
391
    sb.append("    recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n");
×
392
    sb.append("    storedPaymentMethodId: ").append(toIndentedString(storedPaymentMethodId)).append("\n");
×
NEW
393
    sb.append("    subtype: ").append(toIndentedString(subtype)).append("\n");
×
394
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
395
    sb.append("}");
×
396
    return sb.toString();
×
397
  }
398

399
  /**
400
   * Convert the given object to string with each line indented by 4 spaces
401
   * (except the first line).
402
   */
403
  private String toIndentedString(Object o) {
404
    if (o == null) {
×
405
      return "null";
×
406
    }
407
    return o.toString().replace("\n", "\n    ");
×
408
  }
409

410
/**
411
   * Create an instance of AfterpayDetails given an JSON string
412
   *
413
   * @param jsonString JSON string
414
   * @return An instance of AfterpayDetails
415
   * @throws JsonProcessingException if the JSON string is invalid with respect to AfterpayDetails
416
   */
417
  public static AfterpayDetails fromJson(String jsonString) throws JsonProcessingException {
418
    return JSON.getMapper().readValue(jsonString, AfterpayDetails.class);
×
419
  }
420
/**
421
  * Convert an instance of AfterpayDetails to an JSON string
422
  *
423
  * @return JSON string
424
  */
425
  public String toJson() throws JsonProcessingException {
426
    return JSON.getMapper().writeValueAsString(this);
×
427
  }
428
}
429

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