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

43
public class UpiIntentDetails {
44
  public static final String JSON_PROPERTY_APP_ID = "appId";
45
  private String appId;
46

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

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

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

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

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

63
  /**
64
   * **upi_intent**
65
   */
66
  public enum TypeEnum {
1✔
67
    UPI_INTENT("upi_intent");
1✔
68

69
    private String value;
70

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

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

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

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

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

99
  public UpiIntentDetails() { 
1✔
100
  }
1✔
101

102
  public UpiIntentDetails appId(String appId) {
103
    this.appId = appId;
×
104
    return this;
×
105
  }
106

107
   /**
108
   * TPAP (Third Party Application) Id that is being used to make the UPI payment
109
   * @return appId
110
  **/
111
  @ApiModelProperty(value = "TPAP (Third Party Application) Id that is being used to make the UPI payment")
112
  @JsonProperty(JSON_PROPERTY_APP_ID)
113
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
114

115
  public String getAppId() {
116
    return appId;
×
117
  }
118

119

120
 /**
121
  * TPAP (Third Party Application) Id that is being used to make the UPI payment
122
  *
123
  * @param appId
124
  */ 
125
  @JsonProperty(JSON_PROPERTY_APP_ID)
126
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
127
  public void setAppId(String appId) {
128
    this.appId = appId;
×
129
  }
×
130

131

132
  public UpiIntentDetails checkoutAttemptId(String checkoutAttemptId) {
133
    this.checkoutAttemptId = checkoutAttemptId;
×
134
    return this;
×
135
  }
136

137
   /**
138
   * The checkout attempt identifier.
139
   * @return checkoutAttemptId
140
  **/
141
  @ApiModelProperty(value = "The checkout attempt identifier.")
142
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
143
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
144

145
  public String getCheckoutAttemptId() {
146
    return checkoutAttemptId;
×
147
  }
148

149

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

161

162
  @Deprecated
163
  public UpiIntentDetails recurringDetailReference(String recurringDetailReference) {
164
    this.recurringDetailReference = recurringDetailReference;
×
165
    return this;
×
166
  }
167

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

178
  public String getRecurringDetailReference() {
179
    return recurringDetailReference;
×
180
  }
181

182

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

195

196
  public UpiIntentDetails shopperNotificationReference(String shopperNotificationReference) {
197
    this.shopperNotificationReference = shopperNotificationReference;
×
198
    return this;
×
199
  }
200

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

209
  public String getShopperNotificationReference() {
210
    return shopperNotificationReference;
×
211
  }
212

213

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

225

226
  public UpiIntentDetails storedPaymentMethodId(String storedPaymentMethodId) {
227
    this.storedPaymentMethodId = storedPaymentMethodId;
×
228
    return this;
×
229
  }
230

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

239
  public String getStoredPaymentMethodId() {
240
    return storedPaymentMethodId;
×
241
  }
242

243

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

255

256
  public UpiIntentDetails subtype(String subtype) {
NEW
257
    this.subtype = subtype;
×
NEW
258
    return this;
×
259
  }
260

261
   /**
262
   * The payment method subtype.
263
   * @return subtype
264
  **/
265
  @ApiModelProperty(value = "The payment method subtype.")
266
  @JsonProperty(JSON_PROPERTY_SUBTYPE)
267
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
268

269
  public String getSubtype() {
NEW
270
    return subtype;
×
271
  }
272

273

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

285

286
  public UpiIntentDetails type(TypeEnum type) {
287
    this.type = type;
×
288
    return this;
×
289
  }
290

291
   /**
292
   * **upi_intent**
293
   * @return type
294
  **/
295
  @ApiModelProperty(required = true, value = "**upi_intent**")
296
  @JsonProperty(JSON_PROPERTY_TYPE)
297
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
298

299
  public TypeEnum getType() {
300
    return type;
×
301
  }
302

303

304
 /**
305
  * **upi_intent**
306
  *
307
  * @param type
308
  */ 
309
  @JsonProperty(JSON_PROPERTY_TYPE)
310
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
311
  public void setType(TypeEnum type) {
312
    this.type = type;
×
313
  }
×
314

315

316
  /**
317
   * Return true if this UpiIntentDetails object is equal to o.
318
   */
319
  @Override
320
  public boolean equals(Object o) {
321
    if (this == o) {
×
322
      return true;
×
323
    }
324
    if (o == null || getClass() != o.getClass()) {
×
325
      return false;
×
326
    }
327
    UpiIntentDetails upiIntentDetails = (UpiIntentDetails) o;
×
328
    return Objects.equals(this.appId, upiIntentDetails.appId) &&
×
329
        Objects.equals(this.checkoutAttemptId, upiIntentDetails.checkoutAttemptId) &&
×
330
        Objects.equals(this.recurringDetailReference, upiIntentDetails.recurringDetailReference) &&
×
331
        Objects.equals(this.shopperNotificationReference, upiIntentDetails.shopperNotificationReference) &&
×
332
        Objects.equals(this.storedPaymentMethodId, upiIntentDetails.storedPaymentMethodId) &&
×
NEW
333
        Objects.equals(this.subtype, upiIntentDetails.subtype) &&
×
334
        Objects.equals(this.type, upiIntentDetails.type);
×
335
  }
336

337
  @Override
338
  public int hashCode() {
NEW
339
    return Objects.hash(appId, checkoutAttemptId, recurringDetailReference, shopperNotificationReference, storedPaymentMethodId, subtype, type);
×
340
  }
341

342
  @Override
343
  public String toString() {
344
    StringBuilder sb = new StringBuilder();
×
345
    sb.append("class UpiIntentDetails {\n");
×
346
    sb.append("    appId: ").append(toIndentedString(appId)).append("\n");
×
347
    sb.append("    checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n");
×
348
    sb.append("    recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n");
×
349
    sb.append("    shopperNotificationReference: ").append(toIndentedString(shopperNotificationReference)).append("\n");
×
350
    sb.append("    storedPaymentMethodId: ").append(toIndentedString(storedPaymentMethodId)).append("\n");
×
NEW
351
    sb.append("    subtype: ").append(toIndentedString(subtype)).append("\n");
×
352
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
353
    sb.append("}");
×
354
    return sb.toString();
×
355
  }
356

357
  /**
358
   * Convert the given object to string with each line indented by 4 spaces
359
   * (except the first line).
360
   */
361
  private String toIndentedString(Object o) {
362
    if (o == null) {
×
363
      return "null";
×
364
    }
365
    return o.toString().replace("\n", "\n    ");
×
366
  }
367

368
/**
369
   * Create an instance of UpiIntentDetails given an JSON string
370
   *
371
   * @param jsonString JSON string
372
   * @return An instance of UpiIntentDetails
373
   * @throws JsonProcessingException if the JSON string is invalid with respect to UpiIntentDetails
374
   */
375
  public static UpiIntentDetails fromJson(String jsonString) throws JsonProcessingException {
376
    return JSON.getMapper().readValue(jsonString, UpiIntentDetails.class);
×
377
  }
378
/**
379
  * Convert an instance of UpiIntentDetails to an JSON string
380
  *
381
  * @return JSON string
382
  */
383
  public String toJson() throws JsonProcessingException {
384
    return JSON.getMapper().writeValueAsString(this);
×
385
  }
386
}
387

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