• 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

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

43
public class SamsungPayDetails {
44
  public static final String JSON_PROPERTY_CHECKOUT_ATTEMPT_ID = "checkoutAttemptId";
45
  private String checkoutAttemptId;
46

47
  /**
48
   * The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**.
49
   */
50
  public enum FundingSourceEnum {
×
51
    CREDIT("credit"),
×
52
    
53
    DEBIT("debit");
×
54

55
    private String value;
56

57
    FundingSourceEnum(String value) {
×
58
      this.value = value;
×
59
    }
×
60

61
    @JsonValue
62
    public String getValue() {
63
      return value;
×
64
    }
65

66
    @Override
67
    public String toString() {
68
      return String.valueOf(value);
×
69
    }
70

71
    @JsonCreator
72
    public static FundingSourceEnum fromValue(String value) {
73
      for (FundingSourceEnum b : FundingSourceEnum.values()) {
×
74
        if (b.value.equals(value)) {
×
75
          return b;
×
76
        }
77
      }
78
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
79
    }
80
  }
81

82
  public static final String JSON_PROPERTY_FUNDING_SOURCE = "fundingSource";
83
  private FundingSourceEnum fundingSource;
84

85
  public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference";
86
  @Deprecated
87
  private String recurringDetailReference;
88

89
  public static final String JSON_PROPERTY_SAMSUNG_PAY_TOKEN = "samsungPayToken";
90
  private String samsungPayToken;
91

92
  public static final String JSON_PROPERTY_STORED_PAYMENT_METHOD_ID = "storedPaymentMethodId";
93
  private String storedPaymentMethodId;
94

95
  public static final String JSON_PROPERTY_SUBTYPE = "subtype";
96
  private String subtype;
97

98
  /**
99
   * **samsungpay**
100
   */
101
  public enum TypeEnum {
1✔
102
    SAMSUNGPAY("samsungpay");
1✔
103

104
    private String value;
105

106
    TypeEnum(String value) {
1✔
107
      this.value = value;
1✔
108
    }
1✔
109

110
    @JsonValue
111
    public String getValue() {
112
      return value;
1✔
113
    }
114

115
    @Override
116
    public String toString() {
117
      return String.valueOf(value);
×
118
    }
119

120
    @JsonCreator
121
    public static TypeEnum fromValue(String value) {
122
      for (TypeEnum b : TypeEnum.values()) {
1✔
123
        if (b.value.equals(value)) {
1✔
124
          return b;
×
125
        }
126
      }
127
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
1✔
128
    }
129
  }
130

131
  public static final String JSON_PROPERTY_TYPE = "type";
132
  private TypeEnum type;
133

134
  public SamsungPayDetails() { 
1✔
135
  }
1✔
136

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

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

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

154

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

166

167
  public SamsungPayDetails fundingSource(FundingSourceEnum fundingSource) {
168
    this.fundingSource = fundingSource;
×
169
    return this;
×
170
  }
171

172
   /**
173
   * The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**.
174
   * @return fundingSource
175
  **/
176
  @ApiModelProperty(value = "The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**.")
177
  @JsonProperty(JSON_PROPERTY_FUNDING_SOURCE)
178
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
179

180
  public FundingSourceEnum getFundingSource() {
181
    return fundingSource;
×
182
  }
183

184

185
 /**
186
  * The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**.
187
  *
188
  * @param fundingSource
189
  */ 
190
  @JsonProperty(JSON_PROPERTY_FUNDING_SOURCE)
191
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
192
  public void setFundingSource(FundingSourceEnum fundingSource) {
193
    this.fundingSource = fundingSource;
×
194
  }
×
195

196

197
  @Deprecated
198
  public SamsungPayDetails recurringDetailReference(String recurringDetailReference) {
199
    this.recurringDetailReference = recurringDetailReference;
×
200
    return this;
×
201
  }
202

203
   /**
204
   * This is the `recurringDetailReference` returned in the response when you created the token.
205
   * @return recurringDetailReference
206
   * @deprecated
207
  **/
208
  @Deprecated
209
  @ApiModelProperty(value = "This is the `recurringDetailReference` returned in the response when you created the token.")
210
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
211
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
212

213
  public String getRecurringDetailReference() {
214
    return recurringDetailReference;
×
215
  }
216

217

218
 /**
219
  * This is the `recurringDetailReference` returned in the response when you created the token.
220
  *
221
  * @param recurringDetailReference
222
  */ 
223
  @Deprecated
224
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
225
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
226
  public void setRecurringDetailReference(String recurringDetailReference) {
227
    this.recurringDetailReference = recurringDetailReference;
×
228
  }
×
229

230

231
  public SamsungPayDetails samsungPayToken(String samsungPayToken) {
232
    this.samsungPayToken = samsungPayToken;
×
233
    return this;
×
234
  }
235

236
   /**
237
   * The payload you received from the Samsung Pay SDK response.
238
   * @return samsungPayToken
239
  **/
240
  @ApiModelProperty(required = true, value = "The payload you received from the Samsung Pay SDK response.")
241
  @JsonProperty(JSON_PROPERTY_SAMSUNG_PAY_TOKEN)
242
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
243

244
  public String getSamsungPayToken() {
245
    return samsungPayToken;
×
246
  }
247

248

249
 /**
250
  * The payload you received from the Samsung Pay SDK response.
251
  *
252
  * @param samsungPayToken
253
  */ 
254
  @JsonProperty(JSON_PROPERTY_SAMSUNG_PAY_TOKEN)
255
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
256
  public void setSamsungPayToken(String samsungPayToken) {
257
    this.samsungPayToken = samsungPayToken;
×
258
  }
×
259

260

261
  public SamsungPayDetails storedPaymentMethodId(String storedPaymentMethodId) {
262
    this.storedPaymentMethodId = storedPaymentMethodId;
×
263
    return this;
×
264
  }
265

266
   /**
267
   * This is the `recurringDetailReference` returned in the response when you created the token.
268
   * @return storedPaymentMethodId
269
  **/
270
  @ApiModelProperty(value = "This is the `recurringDetailReference` returned in the response when you created the token.")
271
  @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID)
272
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
273

274
  public String getStoredPaymentMethodId() {
275
    return storedPaymentMethodId;
×
276
  }
277

278

279
 /**
280
  * This is the `recurringDetailReference` returned in the response when you created the token.
281
  *
282
  * @param storedPaymentMethodId
283
  */ 
284
  @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID)
285
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
286
  public void setStoredPaymentMethodId(String storedPaymentMethodId) {
287
    this.storedPaymentMethodId = storedPaymentMethodId;
×
288
  }
×
289

290

291
  public SamsungPayDetails subtype(String subtype) {
NEW
292
    this.subtype = subtype;
×
NEW
293
    return this;
×
294
  }
295

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

304
  public String getSubtype() {
NEW
305
    return subtype;
×
306
  }
307

308

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

320

321
  public SamsungPayDetails type(TypeEnum type) {
322
    this.type = type;
×
323
    return this;
×
324
  }
325

326
   /**
327
   * **samsungpay**
328
   * @return type
329
  **/
330
  @ApiModelProperty(value = "**samsungpay**")
331
  @JsonProperty(JSON_PROPERTY_TYPE)
332
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
333

334
  public TypeEnum getType() {
335
    return type;
×
336
  }
337

338

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

350

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

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

377
  @Override
378
  public String toString() {
379
    StringBuilder sb = new StringBuilder();
×
380
    sb.append("class SamsungPayDetails {\n");
×
381
    sb.append("    checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n");
×
382
    sb.append("    fundingSource: ").append(toIndentedString(fundingSource)).append("\n");
×
383
    sb.append("    recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n");
×
384
    sb.append("    samsungPayToken: ").append(toIndentedString(samsungPayToken)).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("}");
×
389
    return sb.toString();
×
390
  }
391

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

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

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