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

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

23 Oct 2023 01:52PM UTC coverage: 12.821%. First build
#2748

push

web-flow
Merge c6d37d76d into c99ba89a9

2931 of 2931 new or added lines in 118 files covered. (100.0%)

12345 of 96286 relevant lines covered (12.82%)

0.13 hits per line

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

0.0
/src/main/java/com/adyen/model/management/PaymentMethodResponse.java
1
/*
2
 * Management API
3
 *
4
 * The version of the OpenAPI document: 3
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.management;
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.management.PaginationLinks;
20
import com.adyen.model.management.PaymentMethod;
21
import com.fasterxml.jackson.annotation.JsonInclude;
22
import com.fasterxml.jackson.annotation.JsonProperty;
23
import com.fasterxml.jackson.annotation.JsonCreator;
24
import com.fasterxml.jackson.annotation.JsonTypeName;
25
import com.fasterxml.jackson.annotation.JsonValue;
26
import io.swagger.annotations.ApiModel;
27
import io.swagger.annotations.ApiModelProperty;
28
import java.util.ArrayList;
29
import java.util.List;
30
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
31
import com.fasterxml.jackson.core.JsonProcessingException;
32

33

34
/**
35
 * PaymentMethodResponse
36
 */
37
@JsonPropertyOrder({
38
  PaymentMethodResponse.JSON_PROPERTY_LINKS,
39
  PaymentMethodResponse.JSON_PROPERTY_DATA,
40
  PaymentMethodResponse.JSON_PROPERTY_ITEMS_TOTAL,
41
  PaymentMethodResponse.JSON_PROPERTY_PAGES_TOTAL,
42
  PaymentMethodResponse.JSON_PROPERTY_TYPES_WITH_ERRORS
43
})
44

45
public class PaymentMethodResponse {
46
  public static final String JSON_PROPERTY_LINKS = "_links";
47
  private PaginationLinks links;
48

49
  public static final String JSON_PROPERTY_DATA = "data";
50
  private List<PaymentMethod> data = null;
×
51

52
  public static final String JSON_PROPERTY_ITEMS_TOTAL = "itemsTotal";
53
  private Integer itemsTotal;
54

55
  public static final String JSON_PROPERTY_PAGES_TOTAL = "pagesTotal";
56
  private Integer pagesTotal;
57

58
  /**
59
   * Gets or Sets typesWithErrors
60
   */
61
  public enum TypesWithErrorsEnum {
×
62
    AFTERPAYTOUCH("afterpaytouch"),
×
63
    
64
    ALIPAY("alipay"),
×
65
    
66
    ALIPAY_HK("alipay_hk"),
×
67
    
68
    AMEX("amex"),
×
69
    
70
    APPLEPAY("applepay"),
×
71
    
72
    BCMC("bcmc"),
×
73
    
74
    BLIK("blik"),
×
75
    
76
    CARTEBANCAIRE("cartebancaire"),
×
77
    
78
    CLEARPAY("clearpay"),
×
79
    
80
    CUP("cup"),
×
81
    
82
    DINERS("diners"),
×
83
    
84
    DIRECTDEBIT_GB("directdebit_GB"),
×
85
    
86
    DISCOVER("discover"),
×
87
    
88
    EBANKING_FI("ebanking_FI"),
×
89
    
90
    EFTPOS_AUSTRALIA("eftpos_australia"),
×
91
    
92
    ELO("elo"),
×
93
    
94
    ELOCREDIT("elocredit"),
×
95
    
96
    ELODEBIT("elodebit"),
×
97
    
98
    GIROCARD("girocard"),
×
99
    
100
    GOOGLEPAY("googlepay"),
×
101
    
102
    HIPER("hiper"),
×
103
    
104
    HIPERCARD("hipercard"),
×
105
    
106
    IDEAL("ideal"),
×
107
    
108
    INTERAC_CARD("interac_card"),
×
109
    
110
    JCB("jcb"),
×
111
    
112
    KLARNA("klarna"),
×
113
    
114
    KLARNA_ACCOUNT("klarna_account"),
×
115
    
116
    KLARNA_PAYNOW("klarna_paynow"),
×
117
    
118
    MAESTRO("maestro"),
×
119
    
120
    MBWAY("mbway"),
×
121
    
122
    MC("mc"),
×
123
    
124
    MCDEBIT("mcdebit"),
×
125
    
126
    MEALVOUCHER_FR("mealVoucher_FR"),
×
127
    
128
    MOBILEPAY("mobilepay"),
×
129
    
130
    MULTIBANCO("multibanco"),
×
131
    
132
    ONLINEBANKING_PL("onlineBanking_PL"),
×
133
    
134
    PAYBYBANK("paybybank"),
×
135
    
136
    PAYPAL("paypal"),
×
137
    
138
    PAYSHOP("payshop"),
×
139
    
140
    SWISH("swish"),
×
141
    
142
    TRUSTLY("trustly"),
×
143
    
144
    TWINT("twint"),
×
145
    
146
    TWINT_POS("twint_pos"),
×
147
    
148
    VIPPS("vipps"),
×
149
    
150
    VISA("visa"),
×
151
    
152
    VISADEBIT("visadebit"),
×
153
    
154
    VPAY("vpay"),
×
155
    
156
    WECHATPAY("wechatpay"),
×
157
    
158
    WECHATPAY_POS("wechatpay_pos");
×
159

160
    private String value;
161

162
    TypesWithErrorsEnum(String value) {
×
163
      this.value = value;
×
164
    }
×
165

166
    @JsonValue
167
    public String getValue() {
168
      return value;
×
169
    }
170

171
    @Override
172
    public String toString() {
173
      return String.valueOf(value);
×
174
    }
175

176
    @JsonCreator
177
    public static TypesWithErrorsEnum fromValue(String value) {
178
      for (TypesWithErrorsEnum b : TypesWithErrorsEnum.values()) {
×
179
        if (b.value.equals(value)) {
×
180
          return b;
×
181
        }
182
      }
183
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
184
    }
185
  }
186

187
  public static final String JSON_PROPERTY_TYPES_WITH_ERRORS = "typesWithErrors";
188
  private List<TypesWithErrorsEnum> typesWithErrors = null;
×
189

190
  public PaymentMethodResponse() { 
×
191
  }
×
192

193
  public PaymentMethodResponse links(PaginationLinks links) {
194
    this.links = links;
×
195
    return this;
×
196
  }
197

198
   /**
199
   * Get links
200
   * @return links
201
  **/
202
  @ApiModelProperty(value = "")
203
  @JsonProperty(JSON_PROPERTY_LINKS)
204
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
205

206
  public PaginationLinks getLinks() {
207
    return links;
×
208
  }
209

210

211
  @JsonProperty(JSON_PROPERTY_LINKS)
212
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
213
  public void setLinks(PaginationLinks links) {
214
    this.links = links;
×
215
  }
×
216

217

218
  public PaymentMethodResponse data(List<PaymentMethod> data) {
219
    this.data = data;
×
220
    return this;
×
221
  }
222

223
  public PaymentMethodResponse addDataItem(PaymentMethod dataItem) {
224
    if (this.data == null) {
×
225
      this.data = new ArrayList<>();
×
226
    }
227
    this.data.add(dataItem);
×
228
    return this;
×
229
  }
230

231
   /**
232
   * The list of supported payment methods and their details.
233
   * @return data
234
  **/
235
  @ApiModelProperty(value = "The list of supported payment methods and their details.")
236
  @JsonProperty(JSON_PROPERTY_DATA)
237
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
238

239
  public List<PaymentMethod> getData() {
240
    return data;
×
241
  }
242

243

244
  @JsonProperty(JSON_PROPERTY_DATA)
245
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
246
  public void setData(List<PaymentMethod> data) {
247
    this.data = data;
×
248
  }
×
249

250

251
  public PaymentMethodResponse itemsTotal(Integer itemsTotal) {
252
    this.itemsTotal = itemsTotal;
×
253
    return this;
×
254
  }
255

256
   /**
257
   * Total number of items.
258
   * @return itemsTotal
259
  **/
260
  @ApiModelProperty(required = true, value = "Total number of items.")
261
  @JsonProperty(JSON_PROPERTY_ITEMS_TOTAL)
262
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
263

264
  public Integer getItemsTotal() {
265
    return itemsTotal;
×
266
  }
267

268

269
  @JsonProperty(JSON_PROPERTY_ITEMS_TOTAL)
270
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
271
  public void setItemsTotal(Integer itemsTotal) {
272
    this.itemsTotal = itemsTotal;
×
273
  }
×
274

275

276
  public PaymentMethodResponse pagesTotal(Integer pagesTotal) {
277
    this.pagesTotal = pagesTotal;
×
278
    return this;
×
279
  }
280

281
   /**
282
   * Total number of pages.
283
   * @return pagesTotal
284
  **/
285
  @ApiModelProperty(required = true, value = "Total number of pages.")
286
  @JsonProperty(JSON_PROPERTY_PAGES_TOTAL)
287
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
288

289
  public Integer getPagesTotal() {
290
    return pagesTotal;
×
291
  }
292

293

294
  @JsonProperty(JSON_PROPERTY_PAGES_TOTAL)
295
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
296
  public void setPagesTotal(Integer pagesTotal) {
297
    this.pagesTotal = pagesTotal;
×
298
  }
×
299

300

301
  public PaymentMethodResponse typesWithErrors(List<TypesWithErrorsEnum> typesWithErrors) {
302
    this.typesWithErrors = typesWithErrors;
×
303
    return this;
×
304
  }
305

306
  public PaymentMethodResponse addTypesWithErrorsItem(TypesWithErrorsEnum typesWithErrorsItem) {
307
    if (this.typesWithErrors == null) {
×
308
      this.typesWithErrors = new ArrayList<>();
×
309
    }
310
    this.typesWithErrors.add(typesWithErrorsItem);
×
311
    return this;
×
312
  }
313

314
   /**
315
   * Payment method types with errors.
316
   * @return typesWithErrors
317
  **/
318
  @ApiModelProperty(value = "Payment method types with errors.")
319
  @JsonProperty(JSON_PROPERTY_TYPES_WITH_ERRORS)
320
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
321

322
  public List<TypesWithErrorsEnum> getTypesWithErrors() {
323
    return typesWithErrors;
×
324
  }
325

326

327
  @JsonProperty(JSON_PROPERTY_TYPES_WITH_ERRORS)
328
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
329
  public void setTypesWithErrors(List<TypesWithErrorsEnum> typesWithErrors) {
330
    this.typesWithErrors = typesWithErrors;
×
331
  }
×
332

333

334
  /**
335
   * Return true if this PaymentMethodResponse object is equal to o.
336
   */
337
  @Override
338
  public boolean equals(Object o) {
339
    if (this == o) {
×
340
      return true;
×
341
    }
342
    if (o == null || getClass() != o.getClass()) {
×
343
      return false;
×
344
    }
345
    PaymentMethodResponse paymentMethodResponse = (PaymentMethodResponse) o;
×
346
    return Objects.equals(this.links, paymentMethodResponse.links) &&
×
347
        Objects.equals(this.data, paymentMethodResponse.data) &&
×
348
        Objects.equals(this.itemsTotal, paymentMethodResponse.itemsTotal) &&
×
349
        Objects.equals(this.pagesTotal, paymentMethodResponse.pagesTotal) &&
×
350
        Objects.equals(this.typesWithErrors, paymentMethodResponse.typesWithErrors);
×
351
  }
352

353
  @Override
354
  public int hashCode() {
355
    return Objects.hash(links, data, itemsTotal, pagesTotal, typesWithErrors);
×
356
  }
357

358
  @Override
359
  public String toString() {
360
    StringBuilder sb = new StringBuilder();
×
361
    sb.append("class PaymentMethodResponse {\n");
×
362
    sb.append("    links: ").append(toIndentedString(links)).append("\n");
×
363
    sb.append("    data: ").append(toIndentedString(data)).append("\n");
×
364
    sb.append("    itemsTotal: ").append(toIndentedString(itemsTotal)).append("\n");
×
365
    sb.append("    pagesTotal: ").append(toIndentedString(pagesTotal)).append("\n");
×
366
    sb.append("    typesWithErrors: ").append(toIndentedString(typesWithErrors)).append("\n");
×
367
    sb.append("}");
×
368
    return sb.toString();
×
369
  }
370

371
  /**
372
   * Convert the given object to string with each line indented by 4 spaces
373
   * (except the first line).
374
   */
375
  private String toIndentedString(Object o) {
376
    if (o == null) {
×
377
      return "null";
×
378
    }
379
    return o.toString().replace("\n", "\n    ");
×
380
  }
381

382
/**
383
   * Create an instance of PaymentMethodResponse given an JSON string
384
   *
385
   * @param jsonString JSON string
386
   * @return An instance of PaymentMethodResponse
387
   * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentMethodResponse
388
   */
389
  public static PaymentMethodResponse fromJson(String jsonString) throws JsonProcessingException {
390
    return JSON.getMapper().readValue(jsonString, PaymentMethodResponse.class);
×
391
  }
392
/**
393
  * Convert an instance of PaymentMethodResponse to an JSON string
394
  *
395
  * @return JSON string
396
  */
397
  public String toJson() throws JsonProcessingException {
398
    return JSON.getMapper().writeValueAsString(this);
×
399
  }
400
}
401

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