• 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

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

44
public class UpiCollectDetails {
45
  public static final String JSON_PROPERTY_BILLING_SEQUENCE_NUMBER = "billingSequenceNumber";
46
  private String billingSequenceNumber;
47

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

51
  public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference";
52
  @Deprecated
53
  private String recurringDetailReference;
54

55
  public static final String JSON_PROPERTY_SHOPPER_NOTIFICATION_REFERENCE = "shopperNotificationReference";
56
  private String shopperNotificationReference;
57

58
  public static final String JSON_PROPERTY_STORED_PAYMENT_METHOD_ID = "storedPaymentMethodId";
59
  private String storedPaymentMethodId;
60

61
  public static final String JSON_PROPERTY_SUBTYPE = "subtype";
62
  private String subtype;
63

64
  /**
65
   * **upi_collect**
66
   */
67
  public enum TypeEnum {
1✔
68
    UPI_COLLECT("upi_collect");
1✔
69

70
    private String value;
71

72
    TypeEnum(String value) {
1✔
73
      this.value = value;
1✔
74
    }
1✔
75

76
    @JsonValue
77
    public String getValue() {
78
      return value;
1✔
79
    }
80

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

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

97
  public static final String JSON_PROPERTY_TYPE = "type";
98
  private TypeEnum type;
99

100
  public static final String JSON_PROPERTY_VIRTUAL_PAYMENT_ADDRESS = "virtualPaymentAddress";
101
  private String virtualPaymentAddress;
102

103
  public UpiCollectDetails() { 
1✔
104
  }
1✔
105

106
  public UpiCollectDetails billingSequenceNumber(String billingSequenceNumber) {
107
    this.billingSequenceNumber = billingSequenceNumber;
×
108
    return this;
×
109
  }
110

111
   /**
112
   * The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper.
113
   * @return billingSequenceNumber
114
  **/
115
  @ApiModelProperty(required = true, value = "The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper.")
116
  @JsonProperty(JSON_PROPERTY_BILLING_SEQUENCE_NUMBER)
117
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
118

119
  public String getBillingSequenceNumber() {
120
    return billingSequenceNumber;
×
121
  }
122

123

124
 /**
125
  * The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper.
126
  *
127
  * @param billingSequenceNumber
128
  */ 
129
  @JsonProperty(JSON_PROPERTY_BILLING_SEQUENCE_NUMBER)
130
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
131
  public void setBillingSequenceNumber(String billingSequenceNumber) {
132
    this.billingSequenceNumber = billingSequenceNumber;
×
133
  }
×
134

135

136
  public UpiCollectDetails checkoutAttemptId(String checkoutAttemptId) {
137
    this.checkoutAttemptId = checkoutAttemptId;
×
138
    return this;
×
139
  }
140

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

149
  public String getCheckoutAttemptId() {
150
    return checkoutAttemptId;
×
151
  }
152

153

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

165

166
  @Deprecated
167
  public UpiCollectDetails recurringDetailReference(String recurringDetailReference) {
168
    this.recurringDetailReference = recurringDetailReference;
×
169
    return this;
×
170
  }
171

172
   /**
173
   * This is the `recurringDetailReference` returned in the response when you created the token.
174
   * @return recurringDetailReference
175
   * @deprecated
176
  **/
177
  @Deprecated
178
  @ApiModelProperty(value = "This is the `recurringDetailReference` returned in the response when you created the token.")
179
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
180
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
181

182
  public String getRecurringDetailReference() {
183
    return recurringDetailReference;
×
184
  }
185

186

187
 /**
188
  * This is the `recurringDetailReference` returned in the response when you created the token.
189
  *
190
  * @param recurringDetailReference
191
  */ 
192
  @Deprecated
193
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
194
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
195
  public void setRecurringDetailReference(String recurringDetailReference) {
196
    this.recurringDetailReference = recurringDetailReference;
×
197
  }
×
198

199

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

205
   /**
206
   * The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only.
207
   * @return shopperNotificationReference
208
  **/
209
  @ApiModelProperty(value = "The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only.")
210
  @JsonProperty(JSON_PROPERTY_SHOPPER_NOTIFICATION_REFERENCE)
211
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
212

213
  public String getShopperNotificationReference() {
214
    return shopperNotificationReference;
×
215
  }
216

217

218
 /**
219
  * The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only.
220
  *
221
  * @param shopperNotificationReference
222
  */ 
223
  @JsonProperty(JSON_PROPERTY_SHOPPER_NOTIFICATION_REFERENCE)
224
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
225
  public void setShopperNotificationReference(String shopperNotificationReference) {
226
    this.shopperNotificationReference = shopperNotificationReference;
×
227
  }
×
228

229

230
  public UpiCollectDetails storedPaymentMethodId(String storedPaymentMethodId) {
231
    this.storedPaymentMethodId = storedPaymentMethodId;
×
232
    return this;
×
233
  }
234

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

243
  public String getStoredPaymentMethodId() {
244
    return storedPaymentMethodId;
×
245
  }
246

247

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

259

260
  public UpiCollectDetails subtype(String subtype) {
NEW
261
    this.subtype = subtype;
×
NEW
262
    return this;
×
263
  }
264

265
   /**
266
   * The payment method subtype.
267
   * @return subtype
268
  **/
269
  @ApiModelProperty(value = "The payment method subtype.")
270
  @JsonProperty(JSON_PROPERTY_SUBTYPE)
271
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
272

273
  public String getSubtype() {
NEW
274
    return subtype;
×
275
  }
276

277

278
 /**
279
  * The payment method subtype.
280
  *
281
  * @param subtype
282
  */ 
283
  @JsonProperty(JSON_PROPERTY_SUBTYPE)
284
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
285
  public void setSubtype(String subtype) {
NEW
286
    this.subtype = subtype;
×
NEW
287
  }
×
288

289

290
  public UpiCollectDetails type(TypeEnum type) {
291
    this.type = type;
×
292
    return this;
×
293
  }
294

295
   /**
296
   * **upi_collect**
297
   * @return type
298
  **/
299
  @ApiModelProperty(required = true, value = "**upi_collect**")
300
  @JsonProperty(JSON_PROPERTY_TYPE)
301
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
302

303
  public TypeEnum getType() {
304
    return type;
×
305
  }
306

307

308
 /**
309
  * **upi_collect**
310
  *
311
  * @param type
312
  */ 
313
  @JsonProperty(JSON_PROPERTY_TYPE)
314
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
315
  public void setType(TypeEnum type) {
316
    this.type = type;
×
317
  }
×
318

319

320
  public UpiCollectDetails virtualPaymentAddress(String virtualPaymentAddress) {
321
    this.virtualPaymentAddress = virtualPaymentAddress;
×
322
    return this;
×
323
  }
324

325
   /**
326
   * The virtual payment address for UPI.
327
   * @return virtualPaymentAddress
328
  **/
329
  @ApiModelProperty(value = "The virtual payment address for UPI.")
330
  @JsonProperty(JSON_PROPERTY_VIRTUAL_PAYMENT_ADDRESS)
331
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
332

333
  public String getVirtualPaymentAddress() {
334
    return virtualPaymentAddress;
×
335
  }
336

337

338
 /**
339
  * The virtual payment address for UPI.
340
  *
341
  * @param virtualPaymentAddress
342
  */ 
343
  @JsonProperty(JSON_PROPERTY_VIRTUAL_PAYMENT_ADDRESS)
344
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
345
  public void setVirtualPaymentAddress(String virtualPaymentAddress) {
346
    this.virtualPaymentAddress = virtualPaymentAddress;
×
347
  }
×
348

349

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

372
  @Override
373
  public int hashCode() {
NEW
374
    return Objects.hash(billingSequenceNumber, checkoutAttemptId, recurringDetailReference, shopperNotificationReference, storedPaymentMethodId, subtype, type, virtualPaymentAddress);
×
375
  }
376

377
  @Override
378
  public String toString() {
379
    StringBuilder sb = new StringBuilder();
×
380
    sb.append("class UpiCollectDetails {\n");
×
381
    sb.append("    billingSequenceNumber: ").append(toIndentedString(billingSequenceNumber)).append("\n");
×
382
    sb.append("    checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n");
×
383
    sb.append("    recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n");
×
384
    sb.append("    shopperNotificationReference: ").append(toIndentedString(shopperNotificationReference)).append("\n");
×
385
    sb.append("    storedPaymentMethodId: ").append(toIndentedString(storedPaymentMethodId)).append("\n");
×
NEW
386
    sb.append("    subtype: ").append(toIndentedString(subtype)).append("\n");
×
387
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
388
    sb.append("    virtualPaymentAddress: ").append(toIndentedString(virtualPaymentAddress)).append("\n");
×
389
    sb.append("}");
×
390
    return sb.toString();
×
391
  }
392

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

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

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