• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Adyen / adyen-java-api-library / #3177

21 Mar 2024 10:28AM UTC coverage: 12.294%. First build
#3177

push

web-flow
Merge 3d6ff7572 into d61048882

0 of 208 new or added lines in 10 files covered. (0.0%)

12446 of 101233 relevant lines covered (12.29%)

0.12 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

15.71
/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_TYPE
40
})
41

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

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

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

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

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

59
  /**
60
   * **upi_intent**
61
   */
62
  public enum TypeEnum {
1✔
63
    UPI_INTENT("upi_intent");
1✔
64

65
    private String value;
66

67
    TypeEnum(String value) {
1✔
68
      this.value = value;
1✔
69
    }
1✔
70

71
    @JsonValue
72
    public String getValue() {
73
      return value;
1✔
74
    }
75

76
    @Override
77
    public String toString() {
78
      return String.valueOf(value);
×
79
    }
80

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

92
  public static final String JSON_PROPERTY_TYPE = "type";
93
  private TypeEnum type;
94

95
  public UpiIntentDetails() { 
1✔
96
  }
1✔
97

98
  public UpiIntentDetails appId(String appId) {
NEW
99
    this.appId = appId;
×
NEW
100
    return this;
×
101
  }
102

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

111
  public String getAppId() {
NEW
112
    return appId;
×
113
  }
114

115

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

127

128
  public UpiIntentDetails checkoutAttemptId(String checkoutAttemptId) {
129
    this.checkoutAttemptId = checkoutAttemptId;
×
130
    return this;
×
131
  }
132

133
   /**
134
   * The checkout attempt identifier.
135
   * @return checkoutAttemptId
136
  **/
137
  @ApiModelProperty(value = "The checkout attempt identifier.")
138
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
139
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
140

141
  public String getCheckoutAttemptId() {
142
    return checkoutAttemptId;
×
143
  }
144

145

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

157

158
  @Deprecated
159
  public UpiIntentDetails recurringDetailReference(String recurringDetailReference) {
160
    this.recurringDetailReference = recurringDetailReference;
×
161
    return this;
×
162
  }
163

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

174
  public String getRecurringDetailReference() {
175
    return recurringDetailReference;
×
176
  }
177

178

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

191

192
  public UpiIntentDetails shopperNotificationReference(String shopperNotificationReference) {
193
    this.shopperNotificationReference = shopperNotificationReference;
×
194
    return this;
×
195
  }
196

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

205
  public String getShopperNotificationReference() {
206
    return shopperNotificationReference;
×
207
  }
208

209

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

221

222
  public UpiIntentDetails storedPaymentMethodId(String storedPaymentMethodId) {
223
    this.storedPaymentMethodId = storedPaymentMethodId;
×
224
    return this;
×
225
  }
226

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

235
  public String getStoredPaymentMethodId() {
236
    return storedPaymentMethodId;
×
237
  }
238

239

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

251

252
  public UpiIntentDetails type(TypeEnum type) {
253
    this.type = type;
×
254
    return this;
×
255
  }
256

257
   /**
258
   * **upi_intent**
259
   * @return type
260
  **/
261
  @ApiModelProperty(required = true, value = "**upi_intent**")
262
  @JsonProperty(JSON_PROPERTY_TYPE)
263
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
264

265
  public TypeEnum getType() {
266
    return type;
×
267
  }
268

269

270
 /**
271
  * **upi_intent**
272
  *
273
  * @param type
274
  */ 
275
  @JsonProperty(JSON_PROPERTY_TYPE)
276
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
277
  public void setType(TypeEnum type) {
278
    this.type = type;
×
279
  }
×
280

281

282
  /**
283
   * Return true if this UpiIntentDetails object is equal to o.
284
   */
285
  @Override
286
  public boolean equals(Object o) {
287
    if (this == o) {
×
288
      return true;
×
289
    }
290
    if (o == null || getClass() != o.getClass()) {
×
291
      return false;
×
292
    }
293
    UpiIntentDetails upiIntentDetails = (UpiIntentDetails) o;
×
NEW
294
    return Objects.equals(this.appId, upiIntentDetails.appId) &&
×
NEW
295
        Objects.equals(this.checkoutAttemptId, upiIntentDetails.checkoutAttemptId) &&
×
296
        Objects.equals(this.recurringDetailReference, upiIntentDetails.recurringDetailReference) &&
×
297
        Objects.equals(this.shopperNotificationReference, upiIntentDetails.shopperNotificationReference) &&
×
298
        Objects.equals(this.storedPaymentMethodId, upiIntentDetails.storedPaymentMethodId) &&
×
299
        Objects.equals(this.type, upiIntentDetails.type);
×
300
  }
301

302
  @Override
303
  public int hashCode() {
NEW
304
    return Objects.hash(appId, checkoutAttemptId, recurringDetailReference, shopperNotificationReference, storedPaymentMethodId, type);
×
305
  }
306

307
  @Override
308
  public String toString() {
309
    StringBuilder sb = new StringBuilder();
×
310
    sb.append("class UpiIntentDetails {\n");
×
NEW
311
    sb.append("    appId: ").append(toIndentedString(appId)).append("\n");
×
312
    sb.append("    checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n");
×
313
    sb.append("    recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n");
×
314
    sb.append("    shopperNotificationReference: ").append(toIndentedString(shopperNotificationReference)).append("\n");
×
315
    sb.append("    storedPaymentMethodId: ").append(toIndentedString(storedPaymentMethodId)).append("\n");
×
316
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
317
    sb.append("}");
×
318
    return sb.toString();
×
319
  }
320

321
  /**
322
   * Convert the given object to string with each line indented by 4 spaces
323
   * (except the first line).
324
   */
325
  private String toIndentedString(Object o) {
326
    if (o == null) {
×
327
      return "null";
×
328
    }
329
    return o.toString().replace("\n", "\n    ");
×
330
  }
331

332
/**
333
   * Create an instance of UpiIntentDetails given an JSON string
334
   *
335
   * @param jsonString JSON string
336
   * @return An instance of UpiIntentDetails
337
   * @throws JsonProcessingException if the JSON string is invalid with respect to UpiIntentDetails
338
   */
339
  public static UpiIntentDetails fromJson(String jsonString) throws JsonProcessingException {
340
    return JSON.getMapper().readValue(jsonString, UpiIntentDetails.class);
×
341
  }
342
/**
343
  * Convert an instance of UpiIntentDetails to an JSON string
344
  *
345
  * @return JSON string
346
  */
347
  public String toJson() throws JsonProcessingException {
348
    return JSON.getMapper().writeValueAsString(this);
×
349
  }
350
}
351

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