• 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

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

44
public class RatepayDetails {
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
   * **ratepay**
69
   */
70
  public enum TypeEnum {
1✔
71
    RATEPAY("ratepay"),
1✔
72
    
73
    RATEPAY_DIRECTDEBIT("ratepay_directdebit");
1✔
74

75
    private String value;
76

77
    TypeEnum(String value) {
1✔
78
      this.value = value;
1✔
79
    }
1✔
80

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

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

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

102
  public static final String JSON_PROPERTY_TYPE = "type";
103
  private TypeEnum type;
104

105
  public RatepayDetails() { 
1✔
106
  }
1✔
107

108
  public RatepayDetails billingAddress(String billingAddress) {
109
    this.billingAddress = billingAddress;
×
110
    return this;
×
111
  }
112

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

121
  public String getBillingAddress() {
122
    return billingAddress;
×
123
  }
124

125

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

137

138
  public RatepayDetails checkoutAttemptId(String checkoutAttemptId) {
139
    this.checkoutAttemptId = checkoutAttemptId;
×
140
    return this;
×
141
  }
142

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

151
  public String getCheckoutAttemptId() {
152
    return checkoutAttemptId;
×
153
  }
154

155

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

167

168
  public RatepayDetails deliveryAddress(String deliveryAddress) {
169
    this.deliveryAddress = deliveryAddress;
×
170
    return this;
×
171
  }
172

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

181
  public String getDeliveryAddress() {
182
    return deliveryAddress;
×
183
  }
184

185

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

197

198
  public RatepayDetails personalDetails(String personalDetails) {
199
    this.personalDetails = personalDetails;
×
200
    return this;
×
201
  }
202

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

211
  public String getPersonalDetails() {
212
    return personalDetails;
×
213
  }
214

215

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

227

228
  @Deprecated
229
  public RatepayDetails recurringDetailReference(String recurringDetailReference) {
230
    this.recurringDetailReference = recurringDetailReference;
×
231
    return this;
×
232
  }
233

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

244
  public String getRecurringDetailReference() {
245
    return recurringDetailReference;
×
246
  }
247

248

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

261

262
  public RatepayDetails storedPaymentMethodId(String storedPaymentMethodId) {
263
    this.storedPaymentMethodId = storedPaymentMethodId;
×
264
    return this;
×
265
  }
266

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

275
  public String getStoredPaymentMethodId() {
276
    return storedPaymentMethodId;
×
277
  }
278

279

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

291

292
  public RatepayDetails subtype(String subtype) {
NEW
293
    this.subtype = subtype;
×
NEW
294
    return this;
×
295
  }
296

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

305
  public String getSubtype() {
NEW
306
    return subtype;
×
307
  }
308

309

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

321

322
  public RatepayDetails type(TypeEnum type) {
323
    this.type = type;
×
324
    return this;
×
325
  }
326

327
   /**
328
   * **ratepay**
329
   * @return type
330
  **/
331
  @ApiModelProperty(required = true, value = "**ratepay**")
332
  @JsonProperty(JSON_PROPERTY_TYPE)
333
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
334

335
  public TypeEnum getType() {
336
    return type;
×
337
  }
338

339

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

351

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

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

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

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

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

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