• 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

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

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

45
  /**
46
   * 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**.
47
   */
48
  public enum FundingSourceEnum {
×
49
    CREDIT("credit"),
×
50
    
51
    DEBIT("debit");
×
52

53
    private String value;
54

55
    FundingSourceEnum(String value) {
×
56
      this.value = value;
×
57
    }
×
58

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

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

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

80
  public static final String JSON_PROPERTY_FUNDING_SOURCE = "fundingSource";
81
  private FundingSourceEnum fundingSource;
82

83
  public static final String JSON_PROPERTY_SUBTYPE = "subtype";
84
  private String subtype;
85

86
  /**
87
   * **visacheckout**
88
   */
89
  public enum TypeEnum {
1✔
90
    VISACHECKOUT("visacheckout");
1✔
91

92
    private String value;
93

94
    TypeEnum(String value) {
1✔
95
      this.value = value;
1✔
96
    }
1✔
97

98
    @JsonValue
99
    public String getValue() {
100
      return value;
1✔
101
    }
102

103
    @Override
104
    public String toString() {
105
      return String.valueOf(value);
×
106
    }
107

108
    @JsonCreator
109
    public static TypeEnum fromValue(String value) {
110
      for (TypeEnum b : TypeEnum.values()) {
1✔
111
        if (b.value.equals(value)) {
1✔
112
          return b;
×
113
        }
114
      }
115
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
1✔
116
    }
117
  }
118

119
  public static final String JSON_PROPERTY_TYPE = "type";
120
  private TypeEnum type;
121

122
  public static final String JSON_PROPERTY_VISA_CHECKOUT_CALL_ID = "visaCheckoutCallId";
123
  private String visaCheckoutCallId;
124

125
  public VisaCheckoutDetails() { 
1✔
126
  }
1✔
127

128
  public VisaCheckoutDetails 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
  public VisaCheckoutDetails fundingSource(FundingSourceEnum fundingSource) {
159
    this.fundingSource = fundingSource;
×
160
    return this;
×
161
  }
162

163
   /**
164
   * 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**.
165
   * @return fundingSource
166
  **/
167
  @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**.")
168
  @JsonProperty(JSON_PROPERTY_FUNDING_SOURCE)
169
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
170

171
  public FundingSourceEnum getFundingSource() {
172
    return fundingSource;
×
173
  }
174

175

176
 /**
177
  * 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**.
178
  *
179
  * @param fundingSource
180
  */ 
181
  @JsonProperty(JSON_PROPERTY_FUNDING_SOURCE)
182
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
183
  public void setFundingSource(FundingSourceEnum fundingSource) {
184
    this.fundingSource = fundingSource;
×
185
  }
×
186

187

188
  public VisaCheckoutDetails subtype(String subtype) {
NEW
189
    this.subtype = subtype;
×
NEW
190
    return this;
×
191
  }
192

193
   /**
194
   * The payment method subtype.
195
   * @return subtype
196
  **/
197
  @ApiModelProperty(value = "The payment method subtype.")
198
  @JsonProperty(JSON_PROPERTY_SUBTYPE)
199
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
200

201
  public String getSubtype() {
NEW
202
    return subtype;
×
203
  }
204

205

206
 /**
207
  * The payment method subtype.
208
  *
209
  * @param subtype
210
  */ 
211
  @JsonProperty(JSON_PROPERTY_SUBTYPE)
212
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
213
  public void setSubtype(String subtype) {
NEW
214
    this.subtype = subtype;
×
NEW
215
  }
×
216

217

218
  public VisaCheckoutDetails type(TypeEnum type) {
219
    this.type = type;
×
220
    return this;
×
221
  }
222

223
   /**
224
   * **visacheckout**
225
   * @return type
226
  **/
227
  @ApiModelProperty(value = "**visacheckout**")
228
  @JsonProperty(JSON_PROPERTY_TYPE)
229
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
230

231
  public TypeEnum getType() {
232
    return type;
×
233
  }
234

235

236
 /**
237
  * **visacheckout**
238
  *
239
  * @param type
240
  */ 
241
  @JsonProperty(JSON_PROPERTY_TYPE)
242
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
243
  public void setType(TypeEnum type) {
244
    this.type = type;
×
245
  }
×
246

247

248
  public VisaCheckoutDetails visaCheckoutCallId(String visaCheckoutCallId) {
249
    this.visaCheckoutCallId = visaCheckoutCallId;
×
250
    return this;
×
251
  }
252

253
   /**
254
   * The Visa Click to Pay Call ID value. When your shopper selects a payment and/or a shipping address from Visa Click to Pay, you will receive a Visa Click to Pay Call ID.
255
   * @return visaCheckoutCallId
256
  **/
257
  @ApiModelProperty(required = true, value = "The Visa Click to Pay Call ID value. When your shopper selects a payment and/or a shipping address from Visa Click to Pay, you will receive a Visa Click to Pay Call ID.")
258
  @JsonProperty(JSON_PROPERTY_VISA_CHECKOUT_CALL_ID)
259
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
260

261
  public String getVisaCheckoutCallId() {
262
    return visaCheckoutCallId;
×
263
  }
264

265

266
 /**
267
  * The Visa Click to Pay Call ID value. When your shopper selects a payment and/or a shipping address from Visa Click to Pay, you will receive a Visa Click to Pay Call ID.
268
  *
269
  * @param visaCheckoutCallId
270
  */ 
271
  @JsonProperty(JSON_PROPERTY_VISA_CHECKOUT_CALL_ID)
272
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
273
  public void setVisaCheckoutCallId(String visaCheckoutCallId) {
274
    this.visaCheckoutCallId = visaCheckoutCallId;
×
275
  }
×
276

277

278
  /**
279
   * Return true if this VisaCheckoutDetails object is equal to o.
280
   */
281
  @Override
282
  public boolean equals(Object o) {
283
    if (this == o) {
×
284
      return true;
×
285
    }
286
    if (o == null || getClass() != o.getClass()) {
×
287
      return false;
×
288
    }
289
    VisaCheckoutDetails visaCheckoutDetails = (VisaCheckoutDetails) o;
×
290
    return Objects.equals(this.checkoutAttemptId, visaCheckoutDetails.checkoutAttemptId) &&
×
291
        Objects.equals(this.fundingSource, visaCheckoutDetails.fundingSource) &&
×
NEW
292
        Objects.equals(this.subtype, visaCheckoutDetails.subtype) &&
×
293
        Objects.equals(this.type, visaCheckoutDetails.type) &&
×
294
        Objects.equals(this.visaCheckoutCallId, visaCheckoutDetails.visaCheckoutCallId);
×
295
  }
296

297
  @Override
298
  public int hashCode() {
NEW
299
    return Objects.hash(checkoutAttemptId, fundingSource, subtype, type, visaCheckoutCallId);
×
300
  }
301

302
  @Override
303
  public String toString() {
304
    StringBuilder sb = new StringBuilder();
×
305
    sb.append("class VisaCheckoutDetails {\n");
×
306
    sb.append("    checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n");
×
307
    sb.append("    fundingSource: ").append(toIndentedString(fundingSource)).append("\n");
×
NEW
308
    sb.append("    subtype: ").append(toIndentedString(subtype)).append("\n");
×
309
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
310
    sb.append("    visaCheckoutCallId: ").append(toIndentedString(visaCheckoutCallId)).append("\n");
×
311
    sb.append("}");
×
312
    return sb.toString();
×
313
  }
314

315
  /**
316
   * Convert the given object to string with each line indented by 4 spaces
317
   * (except the first line).
318
   */
319
  private String toIndentedString(Object o) {
320
    if (o == null) {
×
321
      return "null";
×
322
    }
323
    return o.toString().replace("\n", "\n    ");
×
324
  }
325

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

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