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

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

21 Jun 2024 09:59AM UTC coverage: 11.971%. First build
#3332

push

web-flow
Merge b1467e1ff into ac91e3ca5

7 of 311 new or added lines in 27 files covered. (2.25%)

12493 of 104359 relevant lines covered (11.97%)

0.12 hits per line

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

25.84
/src/main/java/com/adyen/model/checkout/PayWithGoogleDetails.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
 * PayWithGoogleDetails
32
 */
33
@JsonPropertyOrder({
34
  PayWithGoogleDetails.JSON_PROPERTY_CHECKOUT_ATTEMPT_ID,
35
  PayWithGoogleDetails.JSON_PROPERTY_FUNDING_SOURCE,
36
  PayWithGoogleDetails.JSON_PROPERTY_GOOGLE_PAY_TOKEN,
37
  PayWithGoogleDetails.JSON_PROPERTY_RECURRING_DETAIL_REFERENCE,
38
  PayWithGoogleDetails.JSON_PROPERTY_STORED_PAYMENT_METHOD_ID,
39
  PayWithGoogleDetails.JSON_PROPERTY_THREE_D_S2_SDK_VERSION,
40
  PayWithGoogleDetails.JSON_PROPERTY_TYPE
41
})
42

43
public class PayWithGoogleDetails {
44
  public static final String JSON_PROPERTY_CHECKOUT_ATTEMPT_ID = "checkoutAttemptId";
45
  private String checkoutAttemptId;
46

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

55
    private String value;
56

57
    FundingSourceEnum(String value) {
×
58
      this.value = value;
×
59
    }
×
60

61
    @JsonValue
62
    public String getValue() {
63
      return value;
×
64
    }
65

66
    @Override
67
    public String toString() {
68
      return String.valueOf(value);
×
69
    }
70

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

82
  public static final String JSON_PROPERTY_FUNDING_SOURCE = "fundingSource";
83
  private FundingSourceEnum fundingSource;
84

85
  public static final String JSON_PROPERTY_GOOGLE_PAY_TOKEN = "googlePayToken";
86
  private String googlePayToken;
87

88
  public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference";
89
  @Deprecated
90
  private String recurringDetailReference;
91

92
  public static final String JSON_PROPERTY_STORED_PAYMENT_METHOD_ID = "storedPaymentMethodId";
93
  private String storedPaymentMethodId;
94

95
  public static final String JSON_PROPERTY_THREE_D_S2_SDK_VERSION = "threeDS2SdkVersion";
96
  private String threeDS2SdkVersion;
97

98
  /**
99
   * **paywithgoogle**
100
   */
101
  public enum TypeEnum {
1✔
102
    PAYWITHGOOGLE("paywithgoogle");
1✔
103

104
    private String value;
105

106
    TypeEnum(String value) {
1✔
107
      this.value = value;
1✔
108
    }
1✔
109

110
    @JsonValue
111
    public String getValue() {
112
      return value;
1✔
113
    }
114

115
    @Override
116
    public String toString() {
117
      return String.valueOf(value);
×
118
    }
119

120
    @JsonCreator
121
    public static TypeEnum fromValue(String value) {
122
      for (TypeEnum b : TypeEnum.values()) {
1✔
123
        if (b.value.equals(value)) {
1✔
124
          return b;
1✔
125
        }
126
      }
127
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
1✔
128
    }
129
  }
130

131
  public static final String JSON_PROPERTY_TYPE = "type";
132
  private TypeEnum type;
133

134
  public PayWithGoogleDetails() { 
1✔
135
  }
1✔
136

137
  public PayWithGoogleDetails checkoutAttemptId(String checkoutAttemptId) {
138
    this.checkoutAttemptId = checkoutAttemptId;
×
139
    return this;
×
140
  }
141

142
   /**
143
   * The checkout attempt identifier.
144
   * @return checkoutAttemptId
145
  **/
146
  @ApiModelProperty(value = "The checkout attempt identifier.")
147
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
148
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
149

150
  public String getCheckoutAttemptId() {
151
    return checkoutAttemptId;
1✔
152
  }
153

154

155
 /**
156
  * The checkout attempt identifier.
157
  *
158
  * @param checkoutAttemptId
159
  */ 
160
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
161
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
162
  public void setCheckoutAttemptId(String checkoutAttemptId) {
163
    this.checkoutAttemptId = checkoutAttemptId;
×
164
  }
×
165

166

167
  public PayWithGoogleDetails fundingSource(FundingSourceEnum fundingSource) {
168
    this.fundingSource = fundingSource;
×
169
    return this;
×
170
  }
171

172
   /**
173
   * 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**.
174
   * @return fundingSource
175
  **/
176
  @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**.")
177
  @JsonProperty(JSON_PROPERTY_FUNDING_SOURCE)
178
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
179

180
  public FundingSourceEnum getFundingSource() {
181
    return fundingSource;
1✔
182
  }
183

184

185
 /**
186
  * 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**.
187
  *
188
  * @param fundingSource
189
  */ 
190
  @JsonProperty(JSON_PROPERTY_FUNDING_SOURCE)
191
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
192
  public void setFundingSource(FundingSourceEnum fundingSource) {
193
    this.fundingSource = fundingSource;
×
194
  }
×
195

196

197
  public PayWithGoogleDetails googlePayToken(String googlePayToken) {
198
    this.googlePayToken = googlePayToken;
×
199
    return this;
×
200
  }
201

202
   /**
203
   * The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response.
204
   * @return googlePayToken
205
  **/
206
  @ApiModelProperty(required = true, value = "The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response.")
207
  @JsonProperty(JSON_PROPERTY_GOOGLE_PAY_TOKEN)
208
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
209

210
  public String getGooglePayToken() {
211
    return googlePayToken;
1✔
212
  }
213

214

215
 /**
216
  * The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response.
217
  *
218
  * @param googlePayToken
219
  */ 
220
  @JsonProperty(JSON_PROPERTY_GOOGLE_PAY_TOKEN)
221
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
222
  public void setGooglePayToken(String googlePayToken) {
223
    this.googlePayToken = googlePayToken;
1✔
224
  }
1✔
225

226

227
  @Deprecated
228
  public PayWithGoogleDetails recurringDetailReference(String recurringDetailReference) {
229
    this.recurringDetailReference = recurringDetailReference;
×
230
    return this;
×
231
  }
232

233
   /**
234
   * This is the `recurringDetailReference` returned in the response when you created the token.
235
   * @return recurringDetailReference
236
   * @deprecated
237
  **/
238
  @Deprecated
239
  @ApiModelProperty(value = "This is the `recurringDetailReference` returned in the response when you created the token.")
240
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
241
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
242

243
  public String getRecurringDetailReference() {
244
    return recurringDetailReference;
1✔
245
  }
246

247

248
 /**
249
  * This is the `recurringDetailReference` returned in the response when you created the token.
250
  *
251
  * @param recurringDetailReference
252
  */ 
253
  @Deprecated
254
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
255
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
256
  public void setRecurringDetailReference(String recurringDetailReference) {
257
    this.recurringDetailReference = recurringDetailReference;
×
258
  }
×
259

260

261
  public PayWithGoogleDetails storedPaymentMethodId(String storedPaymentMethodId) {
262
    this.storedPaymentMethodId = storedPaymentMethodId;
×
263
    return this;
×
264
  }
265

266
   /**
267
   * This is the `recurringDetailReference` returned in the response when you created the token.
268
   * @return storedPaymentMethodId
269
  **/
270
  @ApiModelProperty(value = "This is the `recurringDetailReference` returned in the response when you created the token.")
271
  @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID)
272
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
273

274
  public String getStoredPaymentMethodId() {
275
    return storedPaymentMethodId;
1✔
276
  }
277

278

279
 /**
280
  * This is the `recurringDetailReference` returned in the response when you created the token.
281
  *
282
  * @param storedPaymentMethodId
283
  */ 
284
  @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID)
285
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
286
  public void setStoredPaymentMethodId(String storedPaymentMethodId) {
287
    this.storedPaymentMethodId = storedPaymentMethodId;
×
288
  }
×
289

290

291
  public PayWithGoogleDetails threeDS2SdkVersion(String threeDS2SdkVersion) {
NEW
292
    this.threeDS2SdkVersion = threeDS2SdkVersion;
×
NEW
293
    return this;
×
294
  }
295

296
   /**
297
   * Required for mobile integrations. Version of the 3D Secure 2 mobile SDK.
298
   * @return threeDS2SdkVersion
299
  **/
300
  @ApiModelProperty(value = "Required for mobile integrations. Version of the 3D Secure 2 mobile SDK.")
301
  @JsonProperty(JSON_PROPERTY_THREE_D_S2_SDK_VERSION)
302
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
303

304
  public String getThreeDS2SdkVersion() {
305
    return threeDS2SdkVersion;
1✔
306
  }
307

308

309
 /**
310
  * Required for mobile integrations. Version of the 3D Secure 2 mobile SDK.
311
  *
312
  * @param threeDS2SdkVersion
313
  */ 
314
  @JsonProperty(JSON_PROPERTY_THREE_D_S2_SDK_VERSION)
315
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
316
  public void setThreeDS2SdkVersion(String threeDS2SdkVersion) {
NEW
317
    this.threeDS2SdkVersion = threeDS2SdkVersion;
×
NEW
318
  }
×
319

320

321
  public PayWithGoogleDetails type(TypeEnum type) {
322
    this.type = type;
×
323
    return this;
×
324
  }
325

326
   /**
327
   * **paywithgoogle**
328
   * @return type
329
  **/
330
  @ApiModelProperty(value = "**paywithgoogle**")
331
  @JsonProperty(JSON_PROPERTY_TYPE)
332
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
333

334
  public TypeEnum getType() {
335
    return type;
1✔
336
  }
337

338

339
 /**
340
  * **paywithgoogle**
341
  *
342
  * @param type
343
  */ 
344
  @JsonProperty(JSON_PROPERTY_TYPE)
345
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
346
  public void setType(TypeEnum type) {
347
    this.type = type;
1✔
348
  }
1✔
349

350

351
  /**
352
   * Return true if this PayWithGoogleDetails object is equal to o.
353
   */
354
  @Override
355
  public boolean equals(Object o) {
356
    if (this == o) {
×
357
      return true;
×
358
    }
359
    if (o == null || getClass() != o.getClass()) {
×
360
      return false;
×
361
    }
362
    PayWithGoogleDetails payWithGoogleDetails = (PayWithGoogleDetails) o;
×
363
    return Objects.equals(this.checkoutAttemptId, payWithGoogleDetails.checkoutAttemptId) &&
×
364
        Objects.equals(this.fundingSource, payWithGoogleDetails.fundingSource) &&
×
365
        Objects.equals(this.googlePayToken, payWithGoogleDetails.googlePayToken) &&
×
366
        Objects.equals(this.recurringDetailReference, payWithGoogleDetails.recurringDetailReference) &&
×
367
        Objects.equals(this.storedPaymentMethodId, payWithGoogleDetails.storedPaymentMethodId) &&
×
NEW
368
        Objects.equals(this.threeDS2SdkVersion, payWithGoogleDetails.threeDS2SdkVersion) &&
×
369
        Objects.equals(this.type, payWithGoogleDetails.type);
×
370
  }
371

372
  @Override
373
  public int hashCode() {
NEW
374
    return Objects.hash(checkoutAttemptId, fundingSource, googlePayToken, recurringDetailReference, storedPaymentMethodId, threeDS2SdkVersion, type);
×
375
  }
376

377
  @Override
378
  public String toString() {
379
    StringBuilder sb = new StringBuilder();
×
380
    sb.append("class PayWithGoogleDetails {\n");
×
381
    sb.append("    checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n");
×
382
    sb.append("    fundingSource: ").append(toIndentedString(fundingSource)).append("\n");
×
383
    sb.append("    googlePayToken: ").append(toIndentedString(googlePayToken)).append("\n");
×
384
    sb.append("    recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n");
×
385
    sb.append("    storedPaymentMethodId: ").append(toIndentedString(storedPaymentMethodId)).append("\n");
×
NEW
386
    sb.append("    threeDS2SdkVersion: ").append(toIndentedString(threeDS2SdkVersion)).append("\n");
×
387
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
388
    sb.append("}");
×
389
    return sb.toString();
×
390
  }
391

392
  /**
393
   * Convert the given object to string with each line indented by 4 spaces
394
   * (except the first line).
395
   */
396
  private String toIndentedString(Object o) {
397
    if (o == null) {
×
398
      return "null";
×
399
    }
400
    return o.toString().replace("\n", "\n    ");
×
401
  }
402

403
/**
404
   * Create an instance of PayWithGoogleDetails given an JSON string
405
   *
406
   * @param jsonString JSON string
407
   * @return An instance of PayWithGoogleDetails
408
   * @throws JsonProcessingException if the JSON string is invalid with respect to PayWithGoogleDetails
409
   */
410
  public static PayWithGoogleDetails fromJson(String jsonString) throws JsonProcessingException {
411
    return JSON.getMapper().readValue(jsonString, PayWithGoogleDetails.class);
×
412
  }
413
/**
414
  * Convert an instance of PayWithGoogleDetails to an JSON string
415
  *
416
  * @return JSON string
417
  */
418
  public String toJson() throws JsonProcessingException {
419
    return JSON.getMapper().writeValueAsString(this);
×
420
  }
421
}
422

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