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

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

02 Oct 2024 09:06PM UTC coverage: 11.801%. First build
#3613

push

web-flow
Merge 5fe104e2f into 3aab4fab9

0 of 134 new or added lines in 12 files covered. (0.0%)

12578 of 106584 relevant lines covered (11.8%)

0.12 hits per line

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

14.0
/src/main/java/com/adyen/model/checkout/CardDetailsResponse.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.adyen.model.checkout.CardBrandDetails;
20
import com.fasterxml.jackson.annotation.JsonInclude;
21
import com.fasterxml.jackson.annotation.JsonProperty;
22
import com.fasterxml.jackson.annotation.JsonCreator;
23
import com.fasterxml.jackson.annotation.JsonTypeName;
24
import com.fasterxml.jackson.annotation.JsonValue;
25
import io.swagger.annotations.ApiModel;
26
import io.swagger.annotations.ApiModelProperty;
27
import java.util.ArrayList;
28
import java.util.List;
29
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
30
import com.fasterxml.jackson.core.JsonProcessingException;
31

32

33
/**
34
 * CardDetailsResponse
35
 */
36
@JsonPropertyOrder({
37
  CardDetailsResponse.JSON_PROPERTY_BRANDS,
38
  CardDetailsResponse.JSON_PROPERTY_FUNDING_SOURCE,
39
  CardDetailsResponse.JSON_PROPERTY_IS_CARD_COMMERCIAL,
40
  CardDetailsResponse.JSON_PROPERTY_ISSUING_COUNTRY_CODE
41
})
42

43
public class CardDetailsResponse {
44
  public static final String JSON_PROPERTY_BRANDS = "brands";
45
  private List<CardBrandDetails> brands = null;
1✔
46

47
  public static final String JSON_PROPERTY_FUNDING_SOURCE = "fundingSource";
48
  private String fundingSource;
49

50
  public static final String JSON_PROPERTY_IS_CARD_COMMERCIAL = "isCardCommercial";
51
  private Boolean isCardCommercial;
52

53
  public static final String JSON_PROPERTY_ISSUING_COUNTRY_CODE = "issuingCountryCode";
54
  private String issuingCountryCode;
55

56
  public CardDetailsResponse() { 
1✔
57
  }
1✔
58

59
  public CardDetailsResponse brands(List<CardBrandDetails> brands) {
60
    this.brands = brands;
×
61
    return this;
×
62
  }
63

64
  public CardDetailsResponse addBrandsItem(CardBrandDetails brandsItem) {
65
    if (this.brands == null) {
×
66
      this.brands = new ArrayList<>();
×
67
    }
68
    this.brands.add(brandsItem);
×
69
    return this;
×
70
  }
71

72
   /**
73
   * The list of brands identified for the card.
74
   * @return brands
75
  **/
76
  @ApiModelProperty(value = "The list of brands identified for the card.")
77
  @JsonProperty(JSON_PROPERTY_BRANDS)
78
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
79

80
  public List<CardBrandDetails> getBrands() {
81
    return brands;
1✔
82
  }
83

84

85
 /**
86
  * The list of brands identified for the card.
87
  *
88
  * @param brands
89
  */ 
90
  @JsonProperty(JSON_PROPERTY_BRANDS)
91
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
92
  public void setBrands(List<CardBrandDetails> brands) {
93
    this.brands = brands;
1✔
94
  }
1✔
95

96

97
  public CardDetailsResponse fundingSource(String fundingSource) {
NEW
98
    this.fundingSource = fundingSource;
×
NEW
99
    return this;
×
100
  }
101

102
   /**
103
   * The funding source of the card, for example **DEBIT**, **CREDIT**, or **PREPAID**.
104
   * @return fundingSource
105
  **/
106
  @ApiModelProperty(value = "The funding source of the card, for example **DEBIT**, **CREDIT**, or **PREPAID**.")
107
  @JsonProperty(JSON_PROPERTY_FUNDING_SOURCE)
108
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
109

110
  public String getFundingSource() {
NEW
111
    return fundingSource;
×
112
  }
113

114

115
 /**
116
  * The funding source of the card, for example **DEBIT**, **CREDIT**, or **PREPAID**.
117
  *
118
  * @param fundingSource
119
  */ 
120
  @JsonProperty(JSON_PROPERTY_FUNDING_SOURCE)
121
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
122
  public void setFundingSource(String fundingSource) {
NEW
123
    this.fundingSource = fundingSource;
×
NEW
124
  }
×
125

126

127
  public CardDetailsResponse isCardCommercial(Boolean isCardCommercial) {
NEW
128
    this.isCardCommercial = isCardCommercial;
×
NEW
129
    return this;
×
130
  }
131

132
   /**
133
   * Indicates if this is a commercial card or a consumer card. If **true**, it is a commercial card. If **false**, it is a consumer card.
134
   * @return isCardCommercial
135
  **/
136
  @ApiModelProperty(value = "Indicates if this is a commercial card or a consumer card. If **true**, it is a commercial card. If **false**, it is a consumer card.")
137
  @JsonProperty(JSON_PROPERTY_IS_CARD_COMMERCIAL)
138
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
139

140
  public Boolean getIsCardCommercial() {
NEW
141
    return isCardCommercial;
×
142
  }
143

144

145
 /**
146
  * Indicates if this is a commercial card or a consumer card. If **true**, it is a commercial card. If **false**, it is a consumer card.
147
  *
148
  * @param isCardCommercial
149
  */ 
150
  @JsonProperty(JSON_PROPERTY_IS_CARD_COMMERCIAL)
151
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
152
  public void setIsCardCommercial(Boolean isCardCommercial) {
NEW
153
    this.isCardCommercial = isCardCommercial;
×
NEW
154
  }
×
155

156

157
  public CardDetailsResponse issuingCountryCode(String issuingCountryCode) {
158
    this.issuingCountryCode = issuingCountryCode;
×
159
    return this;
×
160
  }
161

162
   /**
163
   * The two-letter country code  of the country where the card was issued.
164
   * @return issuingCountryCode
165
  **/
166
  @ApiModelProperty(value = "The two-letter country code  of the country where the card was issued.")
167
  @JsonProperty(JSON_PROPERTY_ISSUING_COUNTRY_CODE)
168
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
169

170
  public String getIssuingCountryCode() {
171
    return issuingCountryCode;
×
172
  }
173

174

175
 /**
176
  * The two-letter country code  of the country where the card was issued.
177
  *
178
  * @param issuingCountryCode
179
  */ 
180
  @JsonProperty(JSON_PROPERTY_ISSUING_COUNTRY_CODE)
181
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
182
  public void setIssuingCountryCode(String issuingCountryCode) {
183
    this.issuingCountryCode = issuingCountryCode;
×
184
  }
×
185

186

187
  /**
188
   * Return true if this CardDetailsResponse object is equal to o.
189
   */
190
  @Override
191
  public boolean equals(Object o) {
192
    if (this == o) {
×
193
      return true;
×
194
    }
195
    if (o == null || getClass() != o.getClass()) {
×
196
      return false;
×
197
    }
198
    CardDetailsResponse cardDetailsResponse = (CardDetailsResponse) o;
×
199
    return Objects.equals(this.brands, cardDetailsResponse.brands) &&
×
NEW
200
        Objects.equals(this.fundingSource, cardDetailsResponse.fundingSource) &&
×
NEW
201
        Objects.equals(this.isCardCommercial, cardDetailsResponse.isCardCommercial) &&
×
202
        Objects.equals(this.issuingCountryCode, cardDetailsResponse.issuingCountryCode);
×
203
  }
204

205
  @Override
206
  public int hashCode() {
NEW
207
    return Objects.hash(brands, fundingSource, isCardCommercial, issuingCountryCode);
×
208
  }
209

210
  @Override
211
  public String toString() {
212
    StringBuilder sb = new StringBuilder();
×
213
    sb.append("class CardDetailsResponse {\n");
×
214
    sb.append("    brands: ").append(toIndentedString(brands)).append("\n");
×
NEW
215
    sb.append("    fundingSource: ").append(toIndentedString(fundingSource)).append("\n");
×
NEW
216
    sb.append("    isCardCommercial: ").append(toIndentedString(isCardCommercial)).append("\n");
×
217
    sb.append("    issuingCountryCode: ").append(toIndentedString(issuingCountryCode)).append("\n");
×
218
    sb.append("}");
×
219
    return sb.toString();
×
220
  }
221

222
  /**
223
   * Convert the given object to string with each line indented by 4 spaces
224
   * (except the first line).
225
   */
226
  private String toIndentedString(Object o) {
227
    if (o == null) {
×
228
      return "null";
×
229
    }
230
    return o.toString().replace("\n", "\n    ");
×
231
  }
232

233
/**
234
   * Create an instance of CardDetailsResponse given an JSON string
235
   *
236
   * @param jsonString JSON string
237
   * @return An instance of CardDetailsResponse
238
   * @throws JsonProcessingException if the JSON string is invalid with respect to CardDetailsResponse
239
   */
240
  public static CardDetailsResponse fromJson(String jsonString) throws JsonProcessingException {
241
    return JSON.getMapper().readValue(jsonString, CardDetailsResponse.class);
1✔
242
  }
243
/**
244
  * Convert an instance of CardDetailsResponse to an JSON string
245
  *
246
  * @return JSON string
247
  */
248
  public String toJson() throws JsonProcessingException {
249
    return JSON.getMapper().writeValueAsString(this);
×
250
  }
251
}
252

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