• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Adyen / adyen-java-api-library / #2879

27 Nov 2023 10:42AM UTC coverage: 12.858%. First build
#2879

push

web-flow
Merge 6520eafda into e27e7377f

6 of 461 new or added lines in 28 files covered. (1.3%)

12465 of 96943 relevant lines covered (12.86%)

0.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

17.39
/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_TYPE,
37
  VisaCheckoutDetails.JSON_PROPERTY_VISA_CHECKOUT_CALL_ID
38
})
39

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

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

52
    private String value;
53

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

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

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

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

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

82
  /**
83
   * **visacheckout**
84
   */
85
  public enum TypeEnum {
1✔
86
    VISACHECKOUT("visacheckout");
1✔
87

88
    private String value;
89

90
    TypeEnum(String value) {
1✔
91
      this.value = value;
1✔
92
    }
1✔
93

94
    @JsonValue
95
    public String getValue() {
96
      return value;
1✔
97
    }
98

99
    @Override
100
    public String toString() {
101
      return String.valueOf(value);
×
102
    }
103

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

115
  public static final String JSON_PROPERTY_TYPE = "type";
116
  private TypeEnum type = TypeEnum.VISACHECKOUT;
1✔
117

118
  public static final String JSON_PROPERTY_VISA_CHECKOUT_CALL_ID = "visaCheckoutCallId";
119
  private String visaCheckoutCallId;
120

121
  public VisaCheckoutDetails() { 
1✔
122
  }
1✔
123

124
  public VisaCheckoutDetails checkoutAttemptId(String checkoutAttemptId) {
125
    this.checkoutAttemptId = checkoutAttemptId;
×
126
    return this;
×
127
  }
128

129
   /**
130
   * The checkout attempt identifier.
131
   * @return checkoutAttemptId
132
  **/
133
  @ApiModelProperty(value = "The checkout attempt identifier.")
134
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
135
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
136

137
  public String getCheckoutAttemptId() {
138
    return checkoutAttemptId;
×
139
  }
140

141

142
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
143
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
144
  public void setCheckoutAttemptId(String checkoutAttemptId) {
145
    this.checkoutAttemptId = checkoutAttemptId;
×
146
  }
×
147

148

149
  public VisaCheckoutDetails fundingSource(FundingSourceEnum fundingSource) {
150
    this.fundingSource = fundingSource;
×
151
    return this;
×
152
  }
153

154
   /**
155
   * 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**.
156
   * @return fundingSource
157
  **/
158
  @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**.")
159
  @JsonProperty(JSON_PROPERTY_FUNDING_SOURCE)
160
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
161

162
  public FundingSourceEnum getFundingSource() {
163
    return fundingSource;
×
164
  }
165

166

167
  @JsonProperty(JSON_PROPERTY_FUNDING_SOURCE)
168
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
169
  public void setFundingSource(FundingSourceEnum fundingSource) {
170
    this.fundingSource = fundingSource;
×
171
  }
×
172

173

174
  public VisaCheckoutDetails type(TypeEnum type) {
175
    this.type = type;
×
176
    return this;
×
177
  }
178

179
   /**
180
   * **visacheckout**
181
   * @return type
182
  **/
183
  @ApiModelProperty(value = "**visacheckout**")
184
  @JsonProperty(JSON_PROPERTY_TYPE)
185
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
186

187
  public TypeEnum getType() {
188
    return type;
×
189
  }
190

191

192
  @JsonProperty(JSON_PROPERTY_TYPE)
193
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
194
  public void setType(TypeEnum type) {
195
    this.type = type;
×
196
  }
×
197

198

199
  public VisaCheckoutDetails visaCheckoutCallId(String visaCheckoutCallId) {
200
    this.visaCheckoutCallId = visaCheckoutCallId;
×
201
    return this;
×
202
  }
203

204
   /**
205
   * 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.
206
   * @return visaCheckoutCallId
207
  **/
208
  @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.")
209
  @JsonProperty(JSON_PROPERTY_VISA_CHECKOUT_CALL_ID)
210
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
211

212
  public String getVisaCheckoutCallId() {
213
    return visaCheckoutCallId;
×
214
  }
215

216

217
  @JsonProperty(JSON_PROPERTY_VISA_CHECKOUT_CALL_ID)
218
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
219
  public void setVisaCheckoutCallId(String visaCheckoutCallId) {
220
    this.visaCheckoutCallId = visaCheckoutCallId;
×
221
  }
×
222

223

224
  /**
225
   * Return true if this VisaCheckoutDetails object is equal to o.
226
   */
227
  @Override
228
  public boolean equals(Object o) {
229
    if (this == o) {
×
230
      return true;
×
231
    }
232
    if (o == null || getClass() != o.getClass()) {
×
233
      return false;
×
234
    }
235
    VisaCheckoutDetails visaCheckoutDetails = (VisaCheckoutDetails) o;
×
236
    return Objects.equals(this.checkoutAttemptId, visaCheckoutDetails.checkoutAttemptId) &&
×
237
        Objects.equals(this.fundingSource, visaCheckoutDetails.fundingSource) &&
×
238
        Objects.equals(this.type, visaCheckoutDetails.type) &&
×
239
        Objects.equals(this.visaCheckoutCallId, visaCheckoutDetails.visaCheckoutCallId);
×
240
  }
241

242
  @Override
243
  public int hashCode() {
244
    return Objects.hash(checkoutAttemptId, fundingSource, type, visaCheckoutCallId);
×
245
  }
246

247
  @Override
248
  public String toString() {
249
    StringBuilder sb = new StringBuilder();
×
250
    sb.append("class VisaCheckoutDetails {\n");
×
251
    sb.append("    checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n");
×
252
    sb.append("    fundingSource: ").append(toIndentedString(fundingSource)).append("\n");
×
253
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
254
    sb.append("    visaCheckoutCallId: ").append(toIndentedString(visaCheckoutCallId)).append("\n");
×
255
    sb.append("}");
×
256
    return sb.toString();
×
257
  }
258

259
  /**
260
   * Convert the given object to string with each line indented by 4 spaces
261
   * (except the first line).
262
   */
263
  private String toIndentedString(Object o) {
264
    if (o == null) {
×
265
      return "null";
×
266
    }
267
    return o.toString().replace("\n", "\n    ");
×
268
  }
269

270
/**
271
   * Create an instance of VisaCheckoutDetails given an JSON string
272
   *
273
   * @param jsonString JSON string
274
   * @return An instance of VisaCheckoutDetails
275
   * @throws JsonProcessingException if the JSON string is invalid with respect to VisaCheckoutDetails
276
   */
277
  public static VisaCheckoutDetails fromJson(String jsonString) throws JsonProcessingException {
278
    return JSON.getMapper().readValue(jsonString, VisaCheckoutDetails.class);
×
279
  }
280
/**
281
  * Convert an instance of VisaCheckoutDetails to an JSON string
282
  *
283
  * @return JSON string
284
  */
285
  public String toJson() throws JsonProcessingException {
286
    return JSON.getMapper().writeValueAsString(this);
×
287
  }
288
}
289

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