• 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

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

41
public class StoredPaymentMethodDetails {
42
  public static final String JSON_PROPERTY_CHECKOUT_ATTEMPT_ID = "checkoutAttemptId";
43
  private String checkoutAttemptId;
44

45
  public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference";
46
  @Deprecated
47
  private String recurringDetailReference;
48

49
  public static final String JSON_PROPERTY_STORED_PAYMENT_METHOD_ID = "storedPaymentMethodId";
50
  private String storedPaymentMethodId;
51

52
  public static final String JSON_PROPERTY_SUBTYPE = "subtype";
53
  private String subtype;
54

55
  /**
56
   * The payment method type.
57
   */
58
  public enum TypeEnum {
1✔
59
    BCMC_MOBILE("bcmc_mobile"),
1✔
60
    
61
    BCMC_MOBILE_QR("bcmc_mobile_QR"),
1✔
62
    
63
    BCMC_MOBILE_APP("bcmc_mobile_app"),
1✔
64
    
65
    BANKTRANSFER_IBAN("bankTransfer_IBAN"),
1✔
66
    
67
    MOMO_WALLET("momo_wallet"),
1✔
68
    
69
    MOMO_WALLET_APP("momo_wallet_app"),
1✔
70
    
71
    TWINT("twint"),
1✔
72
    
73
    PAYMAYA_WALLET("paymaya_wallet"),
1✔
74
    
75
    GRABPAY_SG("grabpay_SG"),
1✔
76
    
77
    GRABPAY_MY("grabpay_MY"),
1✔
78
    
79
    GRABPAY_TH("grabpay_TH"),
1✔
80
    
81
    GRABPAY_ID("grabpay_ID"),
1✔
82
    
83
    GRABPAY_VN("grabpay_VN"),
1✔
84
    
85
    GRABPAY_PH("grabpay_PH"),
1✔
86
    
87
    OXXO("oxxo"),
1✔
88
    
89
    GCASH("gcash"),
1✔
90
    
91
    DANA("dana"),
1✔
92
    
93
    KAKAOPAY("kakaopay"),
1✔
94
    
95
    TRUEMONEY("truemoney");
1✔
96

97
    private String value;
98

99
    TypeEnum(String value) {
1✔
100
      this.value = value;
1✔
101
    }
1✔
102

103
    @JsonValue
104
    public String getValue() {
105
      return value;
1✔
106
    }
107

108
    @Override
109
    public String toString() {
110
      return String.valueOf(value);
×
111
    }
112

113
    @JsonCreator
114
    public static TypeEnum fromValue(String value) {
115
      for (TypeEnum b : TypeEnum.values()) {
1✔
116
        if (b.value.equals(value)) {
1✔
117
          return b;
×
118
        }
119
      }
120
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
1✔
121
    }
122
  }
123

124
  public static final String JSON_PROPERTY_TYPE = "type";
125
  private TypeEnum type;
126

127
  public StoredPaymentMethodDetails() { 
1✔
128
  }
1✔
129

130
  public StoredPaymentMethodDetails checkoutAttemptId(String checkoutAttemptId) {
131
    this.checkoutAttemptId = checkoutAttemptId;
×
132
    return this;
×
133
  }
134

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

143
  public String getCheckoutAttemptId() {
144
    return checkoutAttemptId;
×
145
  }
146

147

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

159

160
  @Deprecated
161
  public StoredPaymentMethodDetails recurringDetailReference(String recurringDetailReference) {
162
    this.recurringDetailReference = recurringDetailReference;
×
163
    return this;
×
164
  }
165

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

176
  public String getRecurringDetailReference() {
177
    return recurringDetailReference;
×
178
  }
179

180

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

193

194
  public StoredPaymentMethodDetails storedPaymentMethodId(String storedPaymentMethodId) {
195
    this.storedPaymentMethodId = storedPaymentMethodId;
×
196
    return this;
×
197
  }
198

199
   /**
200
   * This is the `recurringDetailReference` returned in the response when you created the token.
201
   * @return storedPaymentMethodId
202
  **/
203
  @ApiModelProperty(value = "This is the `recurringDetailReference` returned in the response when you created the token.")
204
  @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID)
205
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
206

207
  public String getStoredPaymentMethodId() {
208
    return storedPaymentMethodId;
×
209
  }
210

211

212
 /**
213
  * This is the `recurringDetailReference` returned in the response when you created the token.
214
  *
215
  * @param storedPaymentMethodId
216
  */ 
217
  @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID)
218
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
219
  public void setStoredPaymentMethodId(String storedPaymentMethodId) {
220
    this.storedPaymentMethodId = storedPaymentMethodId;
×
221
  }
×
222

223

224
  public StoredPaymentMethodDetails subtype(String subtype) {
NEW
225
    this.subtype = subtype;
×
NEW
226
    return this;
×
227
  }
228

229
   /**
230
   * The payment method subtype.
231
   * @return subtype
232
  **/
233
  @ApiModelProperty(value = "The payment method subtype.")
234
  @JsonProperty(JSON_PROPERTY_SUBTYPE)
235
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
236

237
  public String getSubtype() {
NEW
238
    return subtype;
×
239
  }
240

241

242
 /**
243
  * The payment method subtype.
244
  *
245
  * @param subtype
246
  */ 
247
  @JsonProperty(JSON_PROPERTY_SUBTYPE)
248
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
249
  public void setSubtype(String subtype) {
NEW
250
    this.subtype = subtype;
×
NEW
251
  }
×
252

253

254
  public StoredPaymentMethodDetails type(TypeEnum type) {
255
    this.type = type;
×
256
    return this;
×
257
  }
258

259
   /**
260
   * The payment method type.
261
   * @return type
262
  **/
263
  @ApiModelProperty(value = "The payment method type.")
264
  @JsonProperty(JSON_PROPERTY_TYPE)
265
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
266

267
  public TypeEnum getType() {
268
    return type;
×
269
  }
270

271

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

283

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

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

308
  @Override
309
  public String toString() {
310
    StringBuilder sb = new StringBuilder();
×
311
    sb.append("class StoredPaymentMethodDetails {\n");
×
312
    sb.append("    checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n");
×
313
    sb.append("    recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n");
×
314
    sb.append("    storedPaymentMethodId: ").append(toIndentedString(storedPaymentMethodId)).append("\n");
×
NEW
315
    sb.append("    subtype: ").append(toIndentedString(subtype)).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 StoredPaymentMethodDetails given an JSON string
334
   *
335
   * @param jsonString JSON string
336
   * @return An instance of StoredPaymentMethodDetails
337
   * @throws JsonProcessingException if the JSON string is invalid with respect to StoredPaymentMethodDetails
338
   */
339
  public static StoredPaymentMethodDetails fromJson(String jsonString) throws JsonProcessingException {
340
    return JSON.getMapper().readValue(jsonString, StoredPaymentMethodDetails.class);
×
341
  }
342
/**
343
  * Convert an instance of StoredPaymentMethodDetails 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