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

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

26 Mar 2024 10:51AM UTC coverage: 12.292%. First build
#3188

push

web-flow
Merge bb2b851b6 into 78d4e3259

0 of 187 new or added lines in 22 files covered. (0.0%)

12444 of 101236 relevant lines covered (12.29%)

0.12 hits per line

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

0.0
/src/main/java/com/adyen/model/checkout/DeliveryMethod.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.adyen.model.checkout.Amount;
20
import com.fasterxml.jackson.annotation.JsonInclude;
21
import com.fasterxml.jackson.annotation.JsonProperty;
22
import com.fasterxml.jackson.annotation.JsonCreator;
23
import com.fasterxml.jackson.annotation.JsonTypeName;
24
import com.fasterxml.jackson.annotation.JsonValue;
25
import io.swagger.annotations.ApiModel;
26
import io.swagger.annotations.ApiModelProperty;
27
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
28
import com.fasterxml.jackson.core.JsonProcessingException;
29

30

31
/**
32
 * DeliveryMethod
33
 */
34
@JsonPropertyOrder({
35
  DeliveryMethod.JSON_PROPERTY_AMOUNT,
36
  DeliveryMethod.JSON_PROPERTY_DESCRIPTION,
37
  DeliveryMethod.JSON_PROPERTY_REFERENCE,
38
  DeliveryMethod.JSON_PROPERTY_SELECTED,
39
  DeliveryMethod.JSON_PROPERTY_TYPE
40
})
41

42
public class DeliveryMethod {
43
  public static final String JSON_PROPERTY_AMOUNT = "amount";
44
  private Amount amount;
45

46
  public static final String JSON_PROPERTY_DESCRIPTION = "description";
47
  private String description;
48

49
  public static final String JSON_PROPERTY_REFERENCE = "reference";
50
  private String reference;
51

52
  public static final String JSON_PROPERTY_SELECTED = "selected";
53
  private Boolean selected;
54

55
  /**
56
   * The type of the delivery method.
57
   */
NEW
58
  public enum TypeEnum {
×
NEW
59
    SHIPPING("Shipping");
×
60

61
    private String value;
62

NEW
63
    TypeEnum(String value) {
×
NEW
64
      this.value = value;
×
NEW
65
    }
×
66

67
    @JsonValue
68
    public String getValue() {
NEW
69
      return value;
×
70
    }
71

72
    @Override
73
    public String toString() {
NEW
74
      return String.valueOf(value);
×
75
    }
76

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

88
  public static final String JSON_PROPERTY_TYPE = "type";
89
  private TypeEnum type;
90

NEW
91
  public DeliveryMethod() { 
×
NEW
92
  }
×
93

94
  public DeliveryMethod amount(Amount amount) {
NEW
95
    this.amount = amount;
×
NEW
96
    return this;
×
97
  }
98

99
   /**
100
   * Get amount
101
   * @return amount
102
  **/
103
  @ApiModelProperty(value = "")
104
  @JsonProperty(JSON_PROPERTY_AMOUNT)
105
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
106

107
  public Amount getAmount() {
NEW
108
    return amount;
×
109
  }
110

111

112
 /**
113
  * amount
114
  *
115
  * @param amount
116
  */ 
117
  @JsonProperty(JSON_PROPERTY_AMOUNT)
118
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
119
  public void setAmount(Amount amount) {
NEW
120
    this.amount = amount;
×
NEW
121
  }
×
122

123

124
  public DeliveryMethod description(String description) {
NEW
125
    this.description = description;
×
NEW
126
    return this;
×
127
  }
128

129
   /**
130
   * The name of the delivery method as shown to the shopper.
131
   * @return description
132
  **/
133
  @ApiModelProperty(value = "The name of the delivery method as shown to the shopper.")
134
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
135
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
136

137
  public String getDescription() {
NEW
138
    return description;
×
139
  }
140

141

142
 /**
143
  * The name of the delivery method as shown to the shopper.
144
  *
145
  * @param description
146
  */ 
147
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
148
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
149
  public void setDescription(String description) {
NEW
150
    this.description = description;
×
NEW
151
  }
×
152

153

154
  public DeliveryMethod reference(String reference) {
NEW
155
    this.reference = reference;
×
NEW
156
    return this;
×
157
  }
158

159
   /**
160
   * The reference of the delivery method.
161
   * @return reference
162
  **/
163
  @ApiModelProperty(value = "The reference of the delivery method.")
164
  @JsonProperty(JSON_PROPERTY_REFERENCE)
165
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
166

167
  public String getReference() {
NEW
168
    return reference;
×
169
  }
170

171

172
 /**
173
  * The reference of the delivery method.
174
  *
175
  * @param reference
176
  */ 
177
  @JsonProperty(JSON_PROPERTY_REFERENCE)
178
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
179
  public void setReference(String reference) {
NEW
180
    this.reference = reference;
×
NEW
181
  }
×
182

183

184
  public DeliveryMethod selected(Boolean selected) {
NEW
185
    this.selected = selected;
×
NEW
186
    return this;
×
187
  }
188

189
   /**
190
   * If you display the PayPal lightbox with delivery methods, set to **true** for the delivery method that is selected. Only one delivery method can be selected at a time.
191
   * @return selected
192
  **/
193
  @ApiModelProperty(value = "If you display the PayPal lightbox with delivery methods, set to **true** for the delivery method that is selected. Only one delivery method can be selected at a time.")
194
  @JsonProperty(JSON_PROPERTY_SELECTED)
195
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
196

197
  public Boolean getSelected() {
NEW
198
    return selected;
×
199
  }
200

201

202
 /**
203
  * If you display the PayPal lightbox with delivery methods, set to **true** for the delivery method that is selected. Only one delivery method can be selected at a time.
204
  *
205
  * @param selected
206
  */ 
207
  @JsonProperty(JSON_PROPERTY_SELECTED)
208
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
209
  public void setSelected(Boolean selected) {
NEW
210
    this.selected = selected;
×
NEW
211
  }
×
212

213

214
  public DeliveryMethod type(TypeEnum type) {
NEW
215
    this.type = type;
×
NEW
216
    return this;
×
217
  }
218

219
   /**
220
   * The type of the delivery method.
221
   * @return type
222
  **/
223
  @ApiModelProperty(value = "The type of the delivery method.")
224
  @JsonProperty(JSON_PROPERTY_TYPE)
225
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
226

227
  public TypeEnum getType() {
NEW
228
    return type;
×
229
  }
230

231

232
 /**
233
  * The type of the delivery method.
234
  *
235
  * @param type
236
  */ 
237
  @JsonProperty(JSON_PROPERTY_TYPE)
238
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
239
  public void setType(TypeEnum type) {
NEW
240
    this.type = type;
×
NEW
241
  }
×
242

243

244
  /**
245
   * Return true if this DeliveryMethod object is equal to o.
246
   */
247
  @Override
248
  public boolean equals(Object o) {
NEW
249
    if (this == o) {
×
NEW
250
      return true;
×
251
    }
NEW
252
    if (o == null || getClass() != o.getClass()) {
×
NEW
253
      return false;
×
254
    }
NEW
255
    DeliveryMethod deliveryMethod = (DeliveryMethod) o;
×
NEW
256
    return Objects.equals(this.amount, deliveryMethod.amount) &&
×
NEW
257
        Objects.equals(this.description, deliveryMethod.description) &&
×
NEW
258
        Objects.equals(this.reference, deliveryMethod.reference) &&
×
NEW
259
        Objects.equals(this.selected, deliveryMethod.selected) &&
×
NEW
260
        Objects.equals(this.type, deliveryMethod.type);
×
261
  }
262

263
  @Override
264
  public int hashCode() {
NEW
265
    return Objects.hash(amount, description, reference, selected, type);
×
266
  }
267

268
  @Override
269
  public String toString() {
NEW
270
    StringBuilder sb = new StringBuilder();
×
NEW
271
    sb.append("class DeliveryMethod {\n");
×
NEW
272
    sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
×
NEW
273
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
NEW
274
    sb.append("    reference: ").append(toIndentedString(reference)).append("\n");
×
NEW
275
    sb.append("    selected: ").append(toIndentedString(selected)).append("\n");
×
NEW
276
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
NEW
277
    sb.append("}");
×
NEW
278
    return sb.toString();
×
279
  }
280

281
  /**
282
   * Convert the given object to string with each line indented by 4 spaces
283
   * (except the first line).
284
   */
285
  private String toIndentedString(Object o) {
NEW
286
    if (o == null) {
×
NEW
287
      return "null";
×
288
    }
NEW
289
    return o.toString().replace("\n", "\n    ");
×
290
  }
291

292
/**
293
   * Create an instance of DeliveryMethod given an JSON string
294
   *
295
   * @param jsonString JSON string
296
   * @return An instance of DeliveryMethod
297
   * @throws JsonProcessingException if the JSON string is invalid with respect to DeliveryMethod
298
   */
299
  public static DeliveryMethod fromJson(String jsonString) throws JsonProcessingException {
NEW
300
    return JSON.getMapper().readValue(jsonString, DeliveryMethod.class);
×
301
  }
302
/**
303
  * Convert an instance of DeliveryMethod to an JSON string
304
  *
305
  * @return JSON string
306
  */
307
  public String toJson() throws JsonProcessingException {
NEW
308
    return JSON.getMapper().writeValueAsString(this);
×
309
  }
310
}
311

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

© 2026 Coveralls, Inc