• 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

72.46
/src/main/java/com/adyen/model/checkout/PaymentDetails.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
 * PaymentDetails
32
 */
33
@JsonPropertyOrder({
34
  PaymentDetails.JSON_PROPERTY_CHECKOUT_ATTEMPT_ID,
35
  PaymentDetails.JSON_PROPERTY_SUBTYPE,
36
  PaymentDetails.JSON_PROPERTY_TYPE
37
})
38

39
public class PaymentDetails {
40
  public static final String JSON_PROPERTY_CHECKOUT_ATTEMPT_ID = "checkoutAttemptId";
41
  private String checkoutAttemptId;
42

43
  public static final String JSON_PROPERTY_SUBTYPE = "subtype";
44
  private String subtype;
45

46
  /**
47
   * The payment method type.
48
   */
49
  public enum TypeEnum {
1✔
50
    ALIPAY("alipay"),
1✔
51
    
52
    MULTIBANCO("multibanco"),
1✔
53
    
54
    PAYBRIGHT("paybright"),
1✔
55
    
56
    PAYNOW("paynow"),
1✔
57
    
58
    AFFIRM("affirm"),
1✔
59
    
60
    AFFIRM_POS("affirm_pos"),
1✔
61
    
62
    TRUSTLY("trustly"),
1✔
63
    
64
    TRUSTLYVECTOR("trustlyvector"),
1✔
65
    
66
    ONEY("oney"),
1✔
67
    
68
    FACILYPAY("facilypay"),
1✔
69
    
70
    FACILYPAY_3X("facilypay_3x"),
1✔
71
    
72
    FACILYPAY_4X("facilypay_4x"),
1✔
73
    
74
    FACILYPAY_6X("facilypay_6x"),
1✔
75
    
76
    FACILYPAY_10X("facilypay_10x"),
1✔
77
    
78
    FACILYPAY_12X("facilypay_12x"),
1✔
79
    
80
    UNIONPAY("unionpay"),
1✔
81
    
82
    KCP_BANKTRANSFER("kcp_banktransfer"),
1✔
83
    
84
    KCP_PAYCO("kcp_payco"),
1✔
85
    
86
    KCP_CREDITCARD("kcp_creditcard"),
1✔
87
    
88
    WECHATPAYSDK("wechatpaySDK"),
1✔
89
    
90
    WECHATPAYQR("wechatpayQR"),
1✔
91
    
92
    WECHATPAYWEB("wechatpayWeb"),
1✔
93
    
94
    MOLPAY_BOOST("molpay_boost"),
1✔
95
    
96
    WALLET_IN("wallet_IN"),
1✔
97
    
98
    PAYU_IN_CASHCARD("payu_IN_cashcard"),
1✔
99
    
100
    PAYU_IN_NB("payu_IN_nb"),
1✔
101
    
102
    UPI_QR("upi_qr"),
1✔
103
    
104
    PAYTM("paytm"),
1✔
105
    
106
    MOLPAY_EBANKING_VN("molpay_ebanking_VN"),
1✔
107
    
108
    PAYBYBANK("paybybank"),
1✔
109
    
110
    EBANKING_FI("ebanking_FI"),
1✔
111
    
112
    MOLPAY_EBANKING_MY("molpay_ebanking_MY"),
1✔
113
    
114
    MOLPAY_EBANKING_DIRECT_MY("molpay_ebanking_direct_MY"),
1✔
115
    
116
    SWISH("swish"),
1✔
117
    
118
    PIX("pix"),
1✔
119
    
120
    WALLEY("walley"),
1✔
121
    
122
    WALLEY_B2B("walley_b2b"),
1✔
123
    
124
    ALMA("alma"),
1✔
125
    
126
    PAYPO("paypo"),
1✔
127
    
128
    SCALAPAY("scalapay"),
1✔
129
    
130
    SCALAPAY_3X("scalapay_3x"),
1✔
131
    
132
    SCALAPAY_4X("scalapay_4x"),
1✔
133
    
134
    MOLPAY_FPX("molpay_fpx"),
1✔
135
    
136
    KONBINI("konbini"),
1✔
137
    
138
    DIRECTEBANKING("directEbanking"),
1✔
139
    
140
    BOLETOBANCARIO("boletobancario"),
1✔
141
    
142
    NETELLER("neteller"),
1✔
143
    
144
    PAYSAFECARD("paysafecard"),
1✔
145
    
146
    CASHTICKET("cashticket"),
1✔
147
    
148
    IKANO("ikano"),
1✔
149
    
150
    KARENMILLEN("karenmillen"),
1✔
151
    
152
    OASIS("oasis"),
1✔
153
    
154
    WAREHOUSE("warehouse"),
1✔
155
    
156
    PRIMEIROPAY_BOLETO("primeiropay_boleto"),
1✔
157
    
158
    MADA("mada"),
1✔
159
    
160
    BENEFIT("benefit"),
1✔
161
    
162
    KNET("knet"),
1✔
163
    
164
    OMANNET("omannet"),
1✔
165
    
166
    GOPAY_WALLET("gopay_wallet"),
1✔
167
    
168
    KCP_NAVERPAY("kcp_naverpay"),
1✔
169
    
170
    ONLINEBANKING_IN("onlinebanking_IN"),
1✔
171
    
172
    FAWRY("fawry"),
1✔
173
    
174
    ATOME("atome"),
1✔
175
    
176
    MONEYBOOKERS("moneybookers"),
1✔
177
    
178
    NAPS("naps"),
1✔
179
    
180
    NORDEA("nordea"),
1✔
181
    
182
    BOLETOBANCARIO_BRADESCO("boletobancario_bradesco"),
1✔
183
    
184
    BOLETOBANCARIO_ITAU("boletobancario_itau"),
1✔
185
    
186
    BOLETOBANCARIO_SANTANDER("boletobancario_santander"),
1✔
187
    
188
    BOLETOBANCARIO_BANCODOBRASIL("boletobancario_bancodobrasil"),
1✔
189
    
190
    BOLETOBANCARIO_HSBC("boletobancario_hsbc"),
1✔
191
    
192
    MOLPAY_MAYBANK2U("molpay_maybank2u"),
1✔
193
    
194
    MOLPAY_CIMB("molpay_cimb"),
1✔
195
    
196
    MOLPAY_RHB("molpay_rhb"),
1✔
197
    
198
    MOLPAY_AMB("molpay_amb"),
1✔
199
    
200
    MOLPAY_HLB("molpay_hlb"),
1✔
201
    
202
    MOLPAY_AFFIN_EPG("molpay_affin_epg"),
1✔
203
    
204
    MOLPAY_BANKISLAM("molpay_bankislam"),
1✔
205
    
206
    MOLPAY_PUBLICBANK("molpay_publicbank"),
1✔
207
    
208
    FPX_AGROBANK("fpx_agrobank"),
1✔
209
    
210
    TOUCHNGO("touchngo"),
1✔
211
    
212
    MAYBANK2U_MAE("maybank2u_mae"),
1✔
213
    
214
    DUITNOW("duitnow"),
1✔
215
    
216
    PROMPTPAY("promptpay"),
1✔
217
    
218
    TWINT_POS("twint_pos"),
1✔
219
    
220
    ALIPAY_HK("alipay_hk"),
1✔
221
    
222
    ALIPAY_HK_WEB("alipay_hk_web"),
1✔
223
    
224
    ALIPAY_HK_WAP("alipay_hk_wap"),
1✔
225
    
226
    ALIPAY_WAP("alipay_wap"),
1✔
227
    
228
    BALANCEPLATFORM("balanceplatform");
1✔
229

230
    private String value;
231

232
    TypeEnum(String value) {
1✔
233
      this.value = value;
1✔
234
    }
1✔
235

236
    @JsonValue
237
    public String getValue() {
238
      return value;
1✔
239
    }
240

241
    @Override
242
    public String toString() {
243
      return String.valueOf(value);
×
244
    }
245

246
    @JsonCreator
247
    public static TypeEnum fromValue(String value) {
248
      for (TypeEnum b : TypeEnum.values()) {
1✔
249
        if (b.value.equals(value)) {
1✔
250
          return b;
×
251
        }
252
      }
253
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
1✔
254
    }
255
  }
256

257
  public static final String JSON_PROPERTY_TYPE = "type";
258
  private TypeEnum type;
259

260
  public PaymentDetails() { 
1✔
261
  }
1✔
262

263
  public PaymentDetails checkoutAttemptId(String checkoutAttemptId) {
264
    this.checkoutAttemptId = checkoutAttemptId;
×
265
    return this;
×
266
  }
267

268
   /**
269
   * The checkout attempt identifier.
270
   * @return checkoutAttemptId
271
  **/
272
  @ApiModelProperty(value = "The checkout attempt identifier.")
273
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
274
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
275

276
  public String getCheckoutAttemptId() {
277
    return checkoutAttemptId;
×
278
  }
279

280

281
 /**
282
  * The checkout attempt identifier.
283
  *
284
  * @param checkoutAttemptId
285
  */ 
286
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
287
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
288
  public void setCheckoutAttemptId(String checkoutAttemptId) {
289
    this.checkoutAttemptId = checkoutAttemptId;
×
290
  }
×
291

292

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

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

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

310

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

322

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

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

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

340

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

352

353
  /**
354
   * Return true if this PaymentDetails object is equal to o.
355
   */
356
  @Override
357
  public boolean equals(Object o) {
358
    if (this == o) {
×
359
      return true;
×
360
    }
361
    if (o == null || getClass() != o.getClass()) {
×
362
      return false;
×
363
    }
364
    PaymentDetails paymentDetails = (PaymentDetails) o;
×
365
    return Objects.equals(this.checkoutAttemptId, paymentDetails.checkoutAttemptId) &&
×
NEW
366
        Objects.equals(this.subtype, paymentDetails.subtype) &&
×
367
        Objects.equals(this.type, paymentDetails.type);
×
368
  }
369

370
  @Override
371
  public int hashCode() {
NEW
372
    return Objects.hash(checkoutAttemptId, subtype, type);
×
373
  }
374

375
  @Override
376
  public String toString() {
377
    StringBuilder sb = new StringBuilder();
×
378
    sb.append("class PaymentDetails {\n");
×
379
    sb.append("    checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n");
×
NEW
380
    sb.append("    subtype: ").append(toIndentedString(subtype)).append("\n");
×
381
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
382
    sb.append("}");
×
383
    return sb.toString();
×
384
  }
385

386
  /**
387
   * Convert the given object to string with each line indented by 4 spaces
388
   * (except the first line).
389
   */
390
  private String toIndentedString(Object o) {
391
    if (o == null) {
×
392
      return "null";
×
393
    }
394
    return o.toString().replace("\n", "\n    ");
×
395
  }
396

397
/**
398
   * Create an instance of PaymentDetails given an JSON string
399
   *
400
   * @param jsonString JSON string
401
   * @return An instance of PaymentDetails
402
   * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentDetails
403
   */
404
  public static PaymentDetails fromJson(String jsonString) throws JsonProcessingException {
405
    return JSON.getMapper().readValue(jsonString, PaymentDetails.class);
×
406
  }
407
/**
408
  * Convert an instance of PaymentDetails to an JSON string
409
  *
410
  * @return JSON string
411
  */
412
  public String toJson() throws JsonProcessingException {
413
    return JSON.getMapper().writeValueAsString(this);
×
414
  }
415
}
416

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