• 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

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

39
public class MobilePayDetails {
40
  public static final String JSON_PROPERTY_CHECKOUT_ATTEMPT_ID = "checkoutAttemptId";
41
  private String checkoutAttemptId;
42

43
  public static final String JSON_PROPERTY_SUBTYPE = "subtype";
44
  private String subtype;
45

46
  /**
47
   * **mobilepay**
48
   */
49
  public enum TypeEnum {
1✔
50
    MOBILEPAY("mobilepay");
1✔
51

52
    private String value;
53

54
    TypeEnum(String value) {
1✔
55
      this.value = value;
1✔
56
    }
1✔
57

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

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

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

79
  public static final String JSON_PROPERTY_TYPE = "type";
80
  private TypeEnum type;
81

82
  public MobilePayDetails() { 
1✔
83
  }
1✔
84

85
  public MobilePayDetails checkoutAttemptId(String checkoutAttemptId) {
86
    this.checkoutAttemptId = checkoutAttemptId;
×
87
    return this;
×
88
  }
89

90
   /**
91
   * The checkout attempt identifier.
92
   * @return checkoutAttemptId
93
  **/
94
  @ApiModelProperty(value = "The checkout attempt identifier.")
95
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
96
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
97

98
  public String getCheckoutAttemptId() {
99
    return checkoutAttemptId;
×
100
  }
101

102

103
 /**
104
  * The checkout attempt identifier.
105
  *
106
  * @param checkoutAttemptId
107
  */ 
108
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
109
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
110
  public void setCheckoutAttemptId(String checkoutAttemptId) {
111
    this.checkoutAttemptId = checkoutAttemptId;
×
112
  }
×
113

114

115
  public MobilePayDetails subtype(String subtype) {
NEW
116
    this.subtype = subtype;
×
NEW
117
    return this;
×
118
  }
119

120
   /**
121
   * The payment method subtype.
122
   * @return subtype
123
  **/
124
  @ApiModelProperty(value = "The payment method subtype.")
125
  @JsonProperty(JSON_PROPERTY_SUBTYPE)
126
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
127

128
  public String getSubtype() {
NEW
129
    return subtype;
×
130
  }
131

132

133
 /**
134
  * The payment method subtype.
135
  *
136
  * @param subtype
137
  */ 
138
  @JsonProperty(JSON_PROPERTY_SUBTYPE)
139
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
140
  public void setSubtype(String subtype) {
NEW
141
    this.subtype = subtype;
×
NEW
142
  }
×
143

144

145
  public MobilePayDetails type(TypeEnum type) {
146
    this.type = type;
×
147
    return this;
×
148
  }
149

150
   /**
151
   * **mobilepay**
152
   * @return type
153
  **/
154
  @ApiModelProperty(value = "**mobilepay**")
155
  @JsonProperty(JSON_PROPERTY_TYPE)
156
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
157

158
  public TypeEnum getType() {
159
    return type;
×
160
  }
161

162

163
 /**
164
  * **mobilepay**
165
  *
166
  * @param type
167
  */ 
168
  @JsonProperty(JSON_PROPERTY_TYPE)
169
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
170
  public void setType(TypeEnum type) {
171
    this.type = type;
×
172
  }
×
173

174

175
  /**
176
   * Return true if this MobilePayDetails object is equal to o.
177
   */
178
  @Override
179
  public boolean equals(Object o) {
180
    if (this == o) {
×
181
      return true;
×
182
    }
183
    if (o == null || getClass() != o.getClass()) {
×
184
      return false;
×
185
    }
186
    MobilePayDetails mobilePayDetails = (MobilePayDetails) o;
×
187
    return Objects.equals(this.checkoutAttemptId, mobilePayDetails.checkoutAttemptId) &&
×
NEW
188
        Objects.equals(this.subtype, mobilePayDetails.subtype) &&
×
189
        Objects.equals(this.type, mobilePayDetails.type);
×
190
  }
191

192
  @Override
193
  public int hashCode() {
NEW
194
    return Objects.hash(checkoutAttemptId, subtype, type);
×
195
  }
196

197
  @Override
198
  public String toString() {
199
    StringBuilder sb = new StringBuilder();
×
200
    sb.append("class MobilePayDetails {\n");
×
201
    sb.append("    checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n");
×
NEW
202
    sb.append("    subtype: ").append(toIndentedString(subtype)).append("\n");
×
203
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
204
    sb.append("}");
×
205
    return sb.toString();
×
206
  }
207

208
  /**
209
   * Convert the given object to string with each line indented by 4 spaces
210
   * (except the first line).
211
   */
212
  private String toIndentedString(Object o) {
213
    if (o == null) {
×
214
      return "null";
×
215
    }
216
    return o.toString().replace("\n", "\n    ");
×
217
  }
218

219
/**
220
   * Create an instance of MobilePayDetails given an JSON string
221
   *
222
   * @param jsonString JSON string
223
   * @return An instance of MobilePayDetails
224
   * @throws JsonProcessingException if the JSON string is invalid with respect to MobilePayDetails
225
   */
226
  public static MobilePayDetails fromJson(String jsonString) throws JsonProcessingException {
227
    return JSON.getMapper().readValue(jsonString, MobilePayDetails.class);
×
228
  }
229
/**
230
  * Convert an instance of MobilePayDetails to an JSON string
231
  *
232
  * @return JSON string
233
  */
234
  public String toJson() throws JsonProcessingException {
235
    return JSON.getMapper().writeValueAsString(this);
×
236
  }
237
}
238

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