• 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

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

44
public class GooglePayDetails {
45
  public static final String JSON_PROPERTY_CHECKOUT_ATTEMPT_ID = "checkoutAttemptId";
46
  private String checkoutAttemptId;
47

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

56
    private String value;
57

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

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

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

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

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

86
  public static final String JSON_PROPERTY_GOOGLE_PAY_CARD_NETWORK = "googlePayCardNetwork";
87
  private String googlePayCardNetwork;
88

89
  public static final String JSON_PROPERTY_GOOGLE_PAY_TOKEN = "googlePayToken";
90
  private String googlePayToken;
91

92
  public static final String JSON_PROPERTY_RECURRING_DETAIL_REFERENCE = "recurringDetailReference";
93
  @Deprecated
94
  private String recurringDetailReference;
95

96
  public static final String JSON_PROPERTY_STORED_PAYMENT_METHOD_ID = "storedPaymentMethodId";
97
  private String storedPaymentMethodId;
98

99
  public static final String JSON_PROPERTY_SUBTYPE = "subtype";
100
  private String subtype;
101

102
  /**
103
   * **googlepay**, **paywithgoogle**
104
   */
105
  public enum TypeEnum {
1✔
106
    GOOGLEPAY("googlepay");
1✔
107

108
    private String value;
109

110
    TypeEnum(String value) {
1✔
111
      this.value = value;
1✔
112
    }
1✔
113

114
    @JsonValue
115
    public String getValue() {
116
      return value;
1✔
117
    }
118

119
    @Override
120
    public String toString() {
121
      return String.valueOf(value);
×
122
    }
123

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

135
  public static final String JSON_PROPERTY_TYPE = "type";
136
  private TypeEnum type;
137

138
  public GooglePayDetails() { 
1✔
139
  }
1✔
140

141
  public GooglePayDetails checkoutAttemptId(String checkoutAttemptId) {
142
    this.checkoutAttemptId = checkoutAttemptId;
×
143
    return this;
×
144
  }
145

146
   /**
147
   * The checkout attempt identifier.
148
   * @return checkoutAttemptId
149
  **/
150
  @ApiModelProperty(value = "The checkout attempt identifier.")
151
  @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID)
152
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
153

154
  public String getCheckoutAttemptId() {
155
    return checkoutAttemptId;
×
156
  }
157

158

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

170

171
  public GooglePayDetails fundingSource(FundingSourceEnum fundingSource) {
172
    this.fundingSource = fundingSource;
×
173
    return this;
×
174
  }
175

176
   /**
177
   * 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**.
178
   * @return fundingSource
179
  **/
180
  @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**.")
181
  @JsonProperty(JSON_PROPERTY_FUNDING_SOURCE)
182
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
183

184
  public FundingSourceEnum getFundingSource() {
185
    return fundingSource;
×
186
  }
187

188

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

200

201
  public GooglePayDetails googlePayCardNetwork(String googlePayCardNetwork) {
202
    this.googlePayCardNetwork = googlePayCardNetwork;
×
203
    return this;
×
204
  }
205

206
   /**
207
   * The selected payment card network. 
208
   * @return googlePayCardNetwork
209
  **/
210
  @ApiModelProperty(value = "The selected payment card network. ")
211
  @JsonProperty(JSON_PROPERTY_GOOGLE_PAY_CARD_NETWORK)
212
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
213

214
  public String getGooglePayCardNetwork() {
215
    return googlePayCardNetwork;
×
216
  }
217

218

219
 /**
220
  * The selected payment card network. 
221
  *
222
  * @param googlePayCardNetwork
223
  */ 
224
  @JsonProperty(JSON_PROPERTY_GOOGLE_PAY_CARD_NETWORK)
225
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
226
  public void setGooglePayCardNetwork(String googlePayCardNetwork) {
227
    this.googlePayCardNetwork = googlePayCardNetwork;
×
228
  }
×
229

230

231
  public GooglePayDetails googlePayToken(String googlePayToken) {
232
    this.googlePayToken = googlePayToken;
×
233
    return this;
×
234
  }
235

236
   /**
237
   * The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response.
238
   * @return googlePayToken
239
  **/
240
  @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.")
241
  @JsonProperty(JSON_PROPERTY_GOOGLE_PAY_TOKEN)
242
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
243

244
  public String getGooglePayToken() {
245
    return googlePayToken;
×
246
  }
247

248

249
 /**
250
  * The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response.
251
  *
252
  * @param googlePayToken
253
  */ 
254
  @JsonProperty(JSON_PROPERTY_GOOGLE_PAY_TOKEN)
255
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
256
  public void setGooglePayToken(String googlePayToken) {
257
    this.googlePayToken = googlePayToken;
×
258
  }
×
259

260

261
  @Deprecated
262
  public GooglePayDetails recurringDetailReference(String recurringDetailReference) {
263
    this.recurringDetailReference = recurringDetailReference;
×
264
    return this;
×
265
  }
266

267
   /**
268
   * This is the `recurringDetailReference` returned in the response when you created the token.
269
   * @return recurringDetailReference
270
   * @deprecated
271
  **/
272
  @Deprecated
273
  @ApiModelProperty(value = "This is the `recurringDetailReference` returned in the response when you created the token.")
274
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
275
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
276

277
  public String getRecurringDetailReference() {
278
    return recurringDetailReference;
×
279
  }
280

281

282
 /**
283
  * This is the `recurringDetailReference` returned in the response when you created the token.
284
  *
285
  * @param recurringDetailReference
286
  */ 
287
  @Deprecated
288
  @JsonProperty(JSON_PROPERTY_RECURRING_DETAIL_REFERENCE)
289
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
290
  public void setRecurringDetailReference(String recurringDetailReference) {
291
    this.recurringDetailReference = recurringDetailReference;
×
292
  }
×
293

294

295
  public GooglePayDetails storedPaymentMethodId(String storedPaymentMethodId) {
296
    this.storedPaymentMethodId = storedPaymentMethodId;
×
297
    return this;
×
298
  }
299

300
   /**
301
   * This is the `recurringDetailReference` returned in the response when you created the token.
302
   * @return storedPaymentMethodId
303
  **/
304
  @ApiModelProperty(value = "This is the `recurringDetailReference` returned in the response when you created the token.")
305
  @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID)
306
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
307

308
  public String getStoredPaymentMethodId() {
309
    return storedPaymentMethodId;
×
310
  }
311

312

313
 /**
314
  * This is the `recurringDetailReference` returned in the response when you created the token.
315
  *
316
  * @param storedPaymentMethodId
317
  */ 
318
  @JsonProperty(JSON_PROPERTY_STORED_PAYMENT_METHOD_ID)
319
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
320
  public void setStoredPaymentMethodId(String storedPaymentMethodId) {
321
    this.storedPaymentMethodId = storedPaymentMethodId;
×
322
  }
×
323

324

325
  public GooglePayDetails subtype(String subtype) {
NEW
326
    this.subtype = subtype;
×
NEW
327
    return this;
×
328
  }
329

330
   /**
331
   * The payment method subtype.
332
   * @return subtype
333
  **/
334
  @ApiModelProperty(value = "The payment method subtype.")
335
  @JsonProperty(JSON_PROPERTY_SUBTYPE)
336
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
337

338
  public String getSubtype() {
NEW
339
    return subtype;
×
340
  }
341

342

343
 /**
344
  * The payment method subtype.
345
  *
346
  * @param subtype
347
  */ 
348
  @JsonProperty(JSON_PROPERTY_SUBTYPE)
349
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
350
  public void setSubtype(String subtype) {
NEW
351
    this.subtype = subtype;
×
NEW
352
  }
×
353

354

355
  public GooglePayDetails type(TypeEnum type) {
356
    this.type = type;
×
357
    return this;
×
358
  }
359

360
   /**
361
   * **googlepay**, **paywithgoogle**
362
   * @return type
363
  **/
364
  @ApiModelProperty(value = "**googlepay**, **paywithgoogle**")
365
  @JsonProperty(JSON_PROPERTY_TYPE)
366
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
367

368
  public TypeEnum getType() {
369
    return type;
×
370
  }
371

372

373
 /**
374
  * **googlepay**, **paywithgoogle**
375
  *
376
  * @param type
377
  */ 
378
  @JsonProperty(JSON_PROPERTY_TYPE)
379
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
380
  public void setType(TypeEnum type) {
381
    this.type = type;
×
382
  }
×
383

384

385
  /**
386
   * Return true if this GooglePayDetails object is equal to o.
387
   */
388
  @Override
389
  public boolean equals(Object o) {
390
    if (this == o) {
×
391
      return true;
×
392
    }
393
    if (o == null || getClass() != o.getClass()) {
×
394
      return false;
×
395
    }
396
    GooglePayDetails googlePayDetails = (GooglePayDetails) o;
×
397
    return Objects.equals(this.checkoutAttemptId, googlePayDetails.checkoutAttemptId) &&
×
398
        Objects.equals(this.fundingSource, googlePayDetails.fundingSource) &&
×
399
        Objects.equals(this.googlePayCardNetwork, googlePayDetails.googlePayCardNetwork) &&
×
400
        Objects.equals(this.googlePayToken, googlePayDetails.googlePayToken) &&
×
401
        Objects.equals(this.recurringDetailReference, googlePayDetails.recurringDetailReference) &&
×
402
        Objects.equals(this.storedPaymentMethodId, googlePayDetails.storedPaymentMethodId) &&
×
NEW
403
        Objects.equals(this.subtype, googlePayDetails.subtype) &&
×
404
        Objects.equals(this.type, googlePayDetails.type);
×
405
  }
406

407
  @Override
408
  public int hashCode() {
NEW
409
    return Objects.hash(checkoutAttemptId, fundingSource, googlePayCardNetwork, googlePayToken, recurringDetailReference, storedPaymentMethodId, subtype, type);
×
410
  }
411

412
  @Override
413
  public String toString() {
414
    StringBuilder sb = new StringBuilder();
×
415
    sb.append("class GooglePayDetails {\n");
×
416
    sb.append("    checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n");
×
417
    sb.append("    fundingSource: ").append(toIndentedString(fundingSource)).append("\n");
×
418
    sb.append("    googlePayCardNetwork: ").append(toIndentedString(googlePayCardNetwork)).append("\n");
×
419
    sb.append("    googlePayToken: ").append(toIndentedString(googlePayToken)).append("\n");
×
420
    sb.append("    recurringDetailReference: ").append(toIndentedString(recurringDetailReference)).append("\n");
×
421
    sb.append("    storedPaymentMethodId: ").append(toIndentedString(storedPaymentMethodId)).append("\n");
×
NEW
422
    sb.append("    subtype: ").append(toIndentedString(subtype)).append("\n");
×
423
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
424
    sb.append("}");
×
425
    return sb.toString();
×
426
  }
427

428
  /**
429
   * Convert the given object to string with each line indented by 4 spaces
430
   * (except the first line).
431
   */
432
  private String toIndentedString(Object o) {
433
    if (o == null) {
×
434
      return "null";
×
435
    }
436
    return o.toString().replace("\n", "\n    ");
×
437
  }
438

439
/**
440
   * Create an instance of GooglePayDetails given an JSON string
441
   *
442
   * @param jsonString JSON string
443
   * @return An instance of GooglePayDetails
444
   * @throws JsonProcessingException if the JSON string is invalid with respect to GooglePayDetails
445
   */
446
  public static GooglePayDetails fromJson(String jsonString) throws JsonProcessingException {
447
    return JSON.getMapper().readValue(jsonString, GooglePayDetails.class);
×
448
  }
449
/**
450
  * Convert an instance of GooglePayDetails to an JSON string
451
  *
452
  * @return JSON string
453
  */
454
  public String toJson() throws JsonProcessingException {
455
    return JSON.getMapper().writeValueAsString(this);
×
456
  }
457
}
458

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