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

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

02 Oct 2024 01:15PM UTC coverage: 11.809%. First build
#3611

push

web-flow
Merge 42f5f2822 into 3aab4fab9

0 of 61 new or added lines in 9 files covered. (0.0%)

12578 of 106511 relevant lines covered (11.81%)

0.12 hits per line

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

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

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

45
  public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference";
46
  @Deprecated
47
  private String recurringDetailReference;
48

49
  public static final String JSON_PROPERTY_SHOPPER_ACCOUNT_IDENTIFIER = "shopperAccountIdentifier";
50
  private String shopperAccountIdentifier;
51

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

55
  /**
56
   * **payto**
57
   */
58
  public enum TypeEnum {
1✔
59
    PAYTO("payto");
1✔
60

61
    private String value;
62

63
    TypeEnum(String value) {
1✔
64
      this.value = value;
1✔
65
    }
1✔
66

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

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

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

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

91
  public PayToDetails() { 
1✔
92
  }
1✔
93

94
  public PayToDetails checkoutAttemptId(String checkoutAttemptId) {
95
    this.checkoutAttemptId = checkoutAttemptId;
×
96
    return this;
×
97
  }
98

99
   /**
100
   * The checkout attempt identifier.
101
   * @return checkoutAttemptId
102
  **/
103
  @ApiModelProperty(value = "The checkout attempt identifier.")
104
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
105
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
106

107
  public String getCheckoutAttemptId() {
108
    return checkoutAttemptId;
×
109
  }
110

111

112
 /**
113
  * The checkout attempt identifier.
114
  *
115
  * @param checkoutAttemptId
116
  */ 
117
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
118
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
119
  public void setCheckoutAttemptId(String checkoutAttemptId) {
120
    this.checkoutAttemptId = checkoutAttemptId;
×
121
  }
×
122

123

124
  @Deprecated
125
  public PayToDetails recurringDetailReference(String recurringDetailReference) {
NEW
126
    this.recurringDetailReference = recurringDetailReference;
×
NEW
127
    return this;
×
128
  }
129

130
   /**
131
   * This is the `recurringDetailReference` returned in the response when you created the token.
132
   * @return recurringDetailReference
133
   * @deprecated
134
  **/
135
  @Deprecated
136
  @ApiModelProperty(value = "This is the `recurringDetailReference` returned in the response when you created the token.")
137
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
138
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
139

140
  public String getRecurringDetailReference() {
NEW
141
    return recurringDetailReference;
×
142
  }
143

144

145
 /**
146
  * This is the `recurringDetailReference` returned in the response when you created the token.
147
  *
148
  * @param recurringDetailReference
149
  */ 
150
  @Deprecated
151
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
152
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
153
  public void setRecurringDetailReference(String recurringDetailReference) {
NEW
154
    this.recurringDetailReference = recurringDetailReference;
×
NEW
155
  }
×
156

157

158
  public PayToDetails shopperAccountIdentifier(String shopperAccountIdentifier) {
159
    this.shopperAccountIdentifier = shopperAccountIdentifier;
×
160
    return this;
×
161
  }
162

163
   /**
164
   * The shopper's banking details or payId reference, used to complete payment.
165
   * @return shopperAccountIdentifier
166
  **/
167
  @ApiModelProperty(value = "The shopper's banking details or payId reference, used to complete payment.")
168
  @JsonProperty(JSON_PROPERTY_SHOPPER_ACCOUNT_IDENTIFIER)
169
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
170

171
  public String getShopperAccountIdentifier() {
172
    return shopperAccountIdentifier;
×
173
  }
174

175

176
 /**
177
  * The shopper's banking details or payId reference, used to complete payment.
178
  *
179
  * @param shopperAccountIdentifier
180
  */ 
181
  @JsonProperty(JSON_PROPERTY_SHOPPER_ACCOUNT_IDENTIFIER)
182
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
183
  public void setShopperAccountIdentifier(String shopperAccountIdentifier) {
184
    this.shopperAccountIdentifier = shopperAccountIdentifier;
×
185
  }
×
186

187

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

193
   /**
194
   * This is the `recurringDetailReference` returned in the response when you created the token.
195
   * @return storedPaymentMethodId
196
  **/
197
  @ApiModelProperty(value = "This is the `recurringDetailReference` returned in the response when you created the token.")
198
  @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID)
199
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
200

201
  public String getStoredPaymentMethodId() {
NEW
202
    return storedPaymentMethodId;
×
203
  }
204

205

206
 /**
207
  * This is the `recurringDetailReference` returned in the response when you created the token.
208
  *
209
  * @param storedPaymentMethodId
210
  */ 
211
  @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID)
212
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
213
  public void setStoredPaymentMethodId(String storedPaymentMethodId) {
NEW
214
    this.storedPaymentMethodId = storedPaymentMethodId;
×
NEW
215
  }
×
216

217

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

223
   /**
224
   * **payto**
225
   * @return type
226
  **/
227
  @ApiModelProperty(value = "**payto**")
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
  * **payto**
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
  /**
249
   * Return true if this PayToDetails object is equal to o.
250
   */
251
  @Override
252
  public boolean equals(Object o) {
253
    if (this == o) {
×
254
      return true;
×
255
    }
256
    if (o == null || getClass() != o.getClass()) {
×
257
      return false;
×
258
    }
259
    PayToDetails payToDetails = (PayToDetails) o;
×
260
    return Objects.equals(this.checkoutAttemptId, payToDetails.checkoutAttemptId) &&
×
NEW
261
        Objects.equals(this.recurringDetailReference, payToDetails.recurringDetailReference) &&
×
262
        Objects.equals(this.shopperAccountIdentifier, payToDetails.shopperAccountIdentifier) &&
×
NEW
263
        Objects.equals(this.storedPaymentMethodId, payToDetails.storedPaymentMethodId) &&
×
264
        Objects.equals(this.type, payToDetails.type);
×
265
  }
266

267
  @Override
268
  public int hashCode() {
NEW
269
    return Objects.hash(checkoutAttemptId, recurringDetailReference, shopperAccountIdentifier, storedPaymentMethodId, type);
×
270
  }
271

272
  @Override
273
  public String toString() {
274
    StringBuilder sb = new StringBuilder();
×
275
    sb.append("class PayToDetails {\n");
×
276
    sb.append("    checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n");
×
NEW
277
    sb.append("    recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n");
×
278
    sb.append("    shopperAccountIdentifier: ").append(toIndentedString(shopperAccountIdentifier)).append("\n");
×
NEW
279
    sb.append("    storedPaymentMethodId: ").append(toIndentedString(storedPaymentMethodId)).append("\n");
×
280
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
281
    sb.append("}");
×
282
    return sb.toString();
×
283
  }
284

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

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

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