• 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

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

43
public class ApplePayDetails {
44
  public static final String JSON_PROPERTY_APPLE_PAY_TOKEN = "applePayToken";
45
  private String applePayToken;
46

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

50
  /**
51
   * 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**.
52
   */
53
  public enum FundingSourceEnum {
×
54
    CREDIT("credit"),
×
55
    
56
    DEBIT("debit");
×
57

58
    private String value;
59

60
    FundingSourceEnum(String value) {
×
61
      this.value = value;
×
62
    }
×
63

64
    @JsonValue
65
    public String getValue() {
66
      return value;
×
67
    }
68

69
    @Override
70
    public String toString() {
71
      return String.valueOf(value);
×
72
    }
73

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

85
  public static final String JSON_PROPERTY_FUNDING_SOURCE = "fundingSource";
86
  private FundingSourceEnum fundingSource;
87

88
  public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference";
89
  @Deprecated
90
  private String recurringDetailReference;
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
   * **applepay**
100
   */
101
  public enum TypeEnum {
1✔
102
    APPLEPAY("applepay");
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;
1✔
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 ApplePayDetails() { 
1✔
135
  }
1✔
136

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

142
   /**
143
   * The stringified and base64 encoded `paymentData` you retrieved from the Apple framework.
144
   * @return applePayToken
145
  **/
146
  @ApiModelProperty(required = true, value = "The stringified and base64 encoded `paymentData` you retrieved from the Apple framework.")
147
  @JsonProperty(JSON_PROPERTY_APPLE_PAY_TOKEN)
148
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
149

150
  public String getApplePayToken() {
151
    return applePayToken;
1✔
152
  }
153

154

155
 /**
156
  * The stringified and base64 encoded `paymentData` you retrieved from the Apple framework.
157
  *
158
  * @param applePayToken
159
  */ 
160
  @JsonProperty(JSON_PROPERTY_APPLE_PAY_TOKEN)
161
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
162
  public void setApplePayToken(String applePayToken) {
163
    this.applePayToken = applePayToken;
1✔
164
  }
1✔
165

166

167
  public ApplePayDetails checkoutAttemptId(String checkoutAttemptId) {
168
    this.checkoutAttemptId = checkoutAttemptId;
×
169
    return this;
×
170
  }
171

172
   /**
173
   * The checkout attempt identifier.
174
   * @return checkoutAttemptId
175
  **/
176
  @ApiModelProperty(value = "The checkout attempt identifier.")
177
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
178
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
179

180
  public String getCheckoutAttemptId() {
181
    return checkoutAttemptId;
1✔
182
  }
183

184

185
 /**
186
  * The checkout attempt identifier.
187
  *
188
  * @param checkoutAttemptId
189
  */ 
190
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
191
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
192
  public void setCheckoutAttemptId(String checkoutAttemptId) {
193
    this.checkoutAttemptId = checkoutAttemptId;
×
194
  }
×
195

196

197
  public ApplePayDetails fundingSource(FundingSourceEnum fundingSource) {
198
    this.fundingSource = fundingSource;
×
199
    return this;
×
200
  }
201

202
   /**
203
   * 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**.
204
   * @return fundingSource
205
  **/
206
  @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**.")
207
  @JsonProperty(JSON_PROPERTY_FUNDING_SOURCE)
208
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
209

210
  public FundingSourceEnum getFundingSource() {
211
    return fundingSource;
1✔
212
  }
213

214

215
 /**
216
  * 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**.
217
  *
218
  * @param fundingSource
219
  */ 
220
  @JsonProperty(JSON_PROPERTY_FUNDING_SOURCE)
221
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
222
  public void setFundingSource(FundingSourceEnum fundingSource) {
223
    this.fundingSource = fundingSource;
×
224
  }
×
225

226

227
  @Deprecated
228
  public ApplePayDetails recurringDetailReference(String recurringDetailReference) {
229
    this.recurringDetailReference = recurringDetailReference;
×
230
    return this;
×
231
  }
232

233
   /**
234
   * This is the `recurringDetailReference` returned in the response when you created the token.
235
   * @return recurringDetailReference
236
   * @deprecated
237
  **/
238
  @Deprecated
239
  @ApiModelProperty(value = "This is the `recurringDetailReference` returned in the response when you created the token.")
240
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
241
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
242

243
  public String getRecurringDetailReference() {
244
    return recurringDetailReference;
1✔
245
  }
246

247

248
 /**
249
  * This is the `recurringDetailReference` returned in the response when you created the token.
250
  *
251
  * @param recurringDetailReference
252
  */ 
253
  @Deprecated
254
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
255
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
256
  public void setRecurringDetailReference(String recurringDetailReference) {
257
    this.recurringDetailReference = recurringDetailReference;
×
258
  }
×
259

260

261
  public ApplePayDetails 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;
1✔
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 ApplePayDetails 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() {
305
    return subtype;
1✔
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 ApplePayDetails type(TypeEnum type) {
322
    this.type = type;
×
323
    return this;
×
324
  }
325

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

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

338

339
 /**
340
  * **applepay**
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;
1✔
348
  }
1✔
349

350

351
  /**
352
   * Return true if this ApplePayDetails 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
    ApplePayDetails applePayDetails = (ApplePayDetails) o;
×
363
    return Objects.equals(this.applePayToken, applePayDetails.applePayToken) &&
×
364
        Objects.equals(this.checkoutAttemptId, applePayDetails.checkoutAttemptId) &&
×
365
        Objects.equals(this.fundingSource, applePayDetails.fundingSource) &&
×
366
        Objects.equals(this.recurringDetailReference, applePayDetails.recurringDetailReference) &&
×
367
        Objects.equals(this.storedPaymentMethodId, applePayDetails.storedPaymentMethodId) &&
×
NEW
368
        Objects.equals(this.subtype, applePayDetails.subtype) &&
×
369
        Objects.equals(this.type, applePayDetails.type);
×
370
  }
371

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

377
  @Override
378
  public String toString() {
379
    StringBuilder sb = new StringBuilder();
×
380
    sb.append("class ApplePayDetails {\n");
×
381
    sb.append("    applePayToken: ").append(toIndentedString(applePayToken)).append("\n");
×
382
    sb.append("    checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n");
×
383
    sb.append("    fundingSource: ").append(toIndentedString(fundingSource)).append("\n");
×
384
    sb.append("    recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).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 ApplePayDetails given an JSON string
405
   *
406
   * @param jsonString JSON string
407
   * @return An instance of ApplePayDetails
408
   * @throws JsonProcessingException if the JSON string is invalid with respect to ApplePayDetails
409
   */
410
  public static ApplePayDetails fromJson(String jsonString) throws JsonProcessingException {
411
    return JSON.getMapper().readValue(jsonString, ApplePayDetails.class);
×
412
  }
413
/**
414
  * Convert an instance of ApplePayDetails 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