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

44
public class OpenInvoiceDetails {
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
   * **openinvoice**
69
   */
70
  public enum TypeEnum {
1✔
71
    OPENINVOICE("openinvoice"),
1✔
72
    
73
    AFTERPAY_DIRECTDEBIT("afterpay_directdebit"),
1✔
74
    
75
    ATOME_POS("atome_pos");
1✔
76

77
    private String value;
78

79
    TypeEnum(String value) {
1✔
80
      this.value = value;
1✔
81
    }
1✔
82

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

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

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

104
  public static final String JSON_PROPERTY_TYPE = "type";
105
  private TypeEnum type;
106

107
  public OpenInvoiceDetails() { 
1✔
108
  }
1✔
109

110
  public OpenInvoiceDetails billingAddress(String billingAddress) {
111
    this.billingAddress = billingAddress;
×
112
    return this;
×
113
  }
114

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

123
  public String getBillingAddress() {
124
    return billingAddress;
×
125
  }
126

127

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

139

140
  public OpenInvoiceDetails checkoutAttemptId(String checkoutAttemptId) {
141
    this.checkoutAttemptId = checkoutAttemptId;
×
142
    return this;
×
143
  }
144

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

153
  public String getCheckoutAttemptId() {
154
    return checkoutAttemptId;
×
155
  }
156

157

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

169

170
  public OpenInvoiceDetails deliveryAddress(String deliveryAddress) {
171
    this.deliveryAddress = deliveryAddress;
×
172
    return this;
×
173
  }
174

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

183
  public String getDeliveryAddress() {
184
    return deliveryAddress;
×
185
  }
186

187

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

199

200
  public OpenInvoiceDetails personalDetails(String personalDetails) {
201
    this.personalDetails = personalDetails;
×
202
    return this;
×
203
  }
204

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

213
  public String getPersonalDetails() {
214
    return personalDetails;
×
215
  }
216

217

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

229

230
  @Deprecated
231
  public OpenInvoiceDetails recurringDetailReference(String recurringDetailReference) {
232
    this.recurringDetailReference = recurringDetailReference;
×
233
    return this;
×
234
  }
235

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

246
  public String getRecurringDetailReference() {
247
    return recurringDetailReference;
×
248
  }
249

250

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

263

264
  public OpenInvoiceDetails storedPaymentMethodId(String storedPaymentMethodId) {
265
    this.storedPaymentMethodId = storedPaymentMethodId;
×
266
    return this;
×
267
  }
268

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

277
  public String getStoredPaymentMethodId() {
278
    return storedPaymentMethodId;
×
279
  }
280

281

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

293

294
  public OpenInvoiceDetails subtype(String subtype) {
NEW
295
    this.subtype = subtype;
×
NEW
296
    return this;
×
297
  }
298

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

307
  public String getSubtype() {
NEW
308
    return subtype;
×
309
  }
310

311

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

323

324
  public OpenInvoiceDetails type(TypeEnum type) {
325
    this.type = type;
×
326
    return this;
×
327
  }
328

329
   /**
330
   * **openinvoice**
331
   * @return type
332
  **/
333
  @ApiModelProperty(value = "**openinvoice**")
334
  @JsonProperty(JSON_PROPERTY_TYPE)
335
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
336

337
  public TypeEnum getType() {
338
    return type;
×
339
  }
340

341

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

353

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

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

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

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

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

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