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

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

17 Jun 2024 09:47AM UTC coverage: 11.93%. First build
#3326

push

web-flow
Merge aba0ddaab into ac91e3ca5

7 of 696 new or added lines in 57 files covered. (1.01%)

12492 of 104711 relevant lines covered (11.93%)

0.12 hits per line

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

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

42
public class ZipDetails {
43
  public static final String JSON_PROPERTY_CHECKOUT_ATTEMPT_ID = "checkoutAttemptId";
44
  private String checkoutAttemptId;
45

46
  public static final String JSON_PROPERTY_CLICK_AND_COLLECT = "clickAndCollect";
47
  private String clickAndCollect;
48

49
  public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference";
50
  @Deprecated
51
  private String recurringDetailReference;
52

53
  public static final String JSON_PROPERTY_STORED_PAYMENT_METHOD_ID = "storedPaymentMethodId";
54
  private String storedPaymentMethodId;
55

56
  public static final String JSON_PROPERTY_SUBTYPE = "subtype";
57
  private String subtype;
58

59
  /**
60
   * **zip**
61
   */
62
  public enum TypeEnum {
1✔
63
    ZIP("zip"),
1✔
64
    
65
    ZIP_POS("zip_pos");
1✔
66

67
    private String value;
68

69
    TypeEnum(String value) {
1✔
70
      this.value = value;
1✔
71
    }
1✔
72

73
    @JsonValue
74
    public String getValue() {
75
      return value;
1✔
76
    }
77

78
    @Override
79
    public String toString() {
80
      return String.valueOf(value);
×
81
    }
82

83
    @JsonCreator
84
    public static TypeEnum fromValue(String value) {
85
      for (TypeEnum b : TypeEnum.values()) {
1✔
86
        if (b.value.equals(value)) {
1✔
87
          return b;
×
88
        }
89
      }
90
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
1✔
91
    }
92
  }
93

94
  public static final String JSON_PROPERTY_TYPE = "type";
95
  private TypeEnum type;
96

97
  public ZipDetails() { 
1✔
98
  }
1✔
99

100
  public ZipDetails checkoutAttemptId(String checkoutAttemptId) {
101
    this.checkoutAttemptId = checkoutAttemptId;
×
102
    return this;
×
103
  }
104

105
   /**
106
   * The checkout attempt identifier.
107
   * @return checkoutAttemptId
108
  **/
109
  @ApiModelProperty(value = "The checkout attempt identifier.")
110
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
111
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
112

113
  public String getCheckoutAttemptId() {
114
    return checkoutAttemptId;
×
115
  }
116

117

118
 /**
119
  * The checkout attempt identifier.
120
  *
121
  * @param checkoutAttemptId
122
  */ 
123
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
124
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
125
  public void setCheckoutAttemptId(String checkoutAttemptId) {
126
    this.checkoutAttemptId = checkoutAttemptId;
×
127
  }
×
128

129

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

135
   /**
136
   * Set this to **true** if the shopper would like to pick up and collect their order, instead of having the goods delivered to them.
137
   * @return clickAndCollect
138
  **/
139
  @ApiModelProperty(value = "Set this to **true** if the shopper would like to pick up and collect their order, instead of having the goods delivered to them.")
140
  @JsonProperty(JSON_PROPERTY_CLICK_AND_COLLECT)
141
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
142

143
  public String getClickAndCollect() {
144
    return clickAndCollect;
×
145
  }
146

147

148
 /**
149
  * Set this to **true** if the shopper would like to pick up and collect their order, instead of having the goods delivered to them.
150
  *
151
  * @param clickAndCollect
152
  */ 
153
  @JsonProperty(JSON_PROPERTY_CLICK_AND_COLLECT)
154
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
155
  public void setClickAndCollect(String clickAndCollect) {
156
    this.clickAndCollect = clickAndCollect;
×
157
  }
×
158

159

160
  @Deprecated
161
  public ZipDetails 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 ZipDetails 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 ZipDetails 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 ZipDetails type(TypeEnum type) {
255
    this.type = type;
×
256
    return this;
×
257
  }
258

259
   /**
260
   * **zip**
261
   * @return type
262
  **/
263
  @ApiModelProperty(value = "**zip**")
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
  * **zip**
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 ZipDetails 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
    ZipDetails zipDetails = (ZipDetails) o;
×
296
    return Objects.equals(this.checkoutAttemptId, zipDetails.checkoutAttemptId) &&
×
297
        Objects.equals(this.clickAndCollect, zipDetails.clickAndCollect) &&
×
298
        Objects.equals(this.recurringDetailReference, zipDetails.recurringDetailReference) &&
×
299
        Objects.equals(this.storedPaymentMethodId, zipDetails.storedPaymentMethodId) &&
×
NEW
300
        Objects.equals(this.subtype, zipDetails.subtype) &&
×
301
        Objects.equals(this.type, zipDetails.type);
×
302
  }
303

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

309
  @Override
310
  public String toString() {
311
    StringBuilder sb = new StringBuilder();
×
312
    sb.append("class ZipDetails {\n");
×
313
    sb.append("    checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n");
×
314
    sb.append("    clickAndCollect: ").append(toIndentedString(clickAndCollect)).append("\n");
×
315
    sb.append("    recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n");
×
316
    sb.append("    storedPaymentMethodId: ").append(toIndentedString(storedPaymentMethodId)).append("\n");
×
NEW
317
    sb.append("    subtype: ").append(toIndentedString(subtype)).append("\n");
×
318
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
319
    sb.append("}");
×
320
    return sb.toString();
×
321
  }
322

323
  /**
324
   * Convert the given object to string with each line indented by 4 spaces
325
   * (except the first line).
326
   */
327
  private String toIndentedString(Object o) {
328
    if (o == null) {
×
329
      return "null";
×
330
    }
331
    return o.toString().replace("\n", "\n    ");
×
332
  }
333

334
/**
335
   * Create an instance of ZipDetails given an JSON string
336
   *
337
   * @param jsonString JSON string
338
   * @return An instance of ZipDetails
339
   * @throws JsonProcessingException if the JSON string is invalid with respect to ZipDetails
340
   */
341
  public static ZipDetails fromJson(String jsonString) throws JsonProcessingException {
342
    return JSON.getMapper().readValue(jsonString, ZipDetails.class);
×
343
  }
344
/**
345
  * Convert an instance of ZipDetails to an JSON string
346
  *
347
  * @return JSON string
348
  */
349
  public String toJson() throws JsonProcessingException {
350
    return JSON.getMapper().writeValueAsString(this);
×
351
  }
352
}
353

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