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

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

18 Sep 2023 12:11PM UTC coverage: 13.219%. First build
#2658

push

web-flow
Merge 477a9da03 into ba706cfa8

1770 of 1770 new or added lines in 34 files covered. (100.0%)

10287 of 77817 relevant lines covered (13.22%)

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/balanceplatform/PaymentInstrumentRequirement.java
1
/*
2
 * Configuration API
3
 *
4
 * The version of the OpenAPI document: 2
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.balanceplatform;
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
 * PaymentInstrumentRequirement
32
 */
33
@JsonPropertyOrder({
34
  PaymentInstrumentRequirement.JSON_PROPERTY_DESCRIPTION,
35
  PaymentInstrumentRequirement.JSON_PROPERTY_ISSUING_COUNTRY_CODE,
36
  PaymentInstrumentRequirement.JSON_PROPERTY_PAYMENT_INSTRUMENT_TYPE,
37
  PaymentInstrumentRequirement.JSON_PROPERTY_TYPE
38
})
39

40
public class PaymentInstrumentRequirement {
41
  public static final String JSON_PROPERTY_DESCRIPTION = "description";
42
  private String description;
43

44
  public static final String JSON_PROPERTY_ISSUING_COUNTRY_CODE = "issuingCountryCode";
45
  private String issuingCountryCode;
46

47
  /**
48
   * The type of the payment instrument. For example, \"BankAccount\" or \"Card\".
49
   */
50
  public enum PaymentInstrumentTypeEnum {
×
51
    BANKACCOUNT("BankAccount"),
×
52
    
53
    CARD("Card");
×
54

55
    private String value;
56

57
    PaymentInstrumentTypeEnum(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 PaymentInstrumentTypeEnum fromValue(String value) {
73
      for (PaymentInstrumentTypeEnum b : PaymentInstrumentTypeEnum.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_PAYMENT_INSTRUMENT_TYPE = "paymentInstrumentType";
83
  private PaymentInstrumentTypeEnum paymentInstrumentType;
84

85
  /**
86
   * **paymentInstrumentRequirement**
87
   */
88
  public enum TypeEnum {
×
89
    PAYMENTINSTRUMENTREQUIREMENT("paymentInstrumentRequirement");
×
90

91
    private String value;
92

93
    TypeEnum(String value) {
×
94
      this.value = value;
×
95
    }
×
96

97
    @JsonValue
98
    public String getValue() {
99
      return value;
×
100
    }
101

102
    @Override
103
    public String toString() {
104
      return String.valueOf(value);
×
105
    }
106

107
    @JsonCreator
108
    public static TypeEnum fromValue(String value) {
109
      for (TypeEnum b : TypeEnum.values()) {
×
110
        if (b.value.equals(value)) {
×
111
          return b;
×
112
        }
113
      }
114
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
115
    }
116
  }
117

118
  public static final String JSON_PROPERTY_TYPE = "type";
119
  private TypeEnum type = TypeEnum.PAYMENTINSTRUMENTREQUIREMENT;
×
120

121
  public PaymentInstrumentRequirement() { 
×
122
  }
×
123

124
  public PaymentInstrumentRequirement description(String description) {
125
    this.description = description;
×
126
    return this;
×
127
  }
128

129
   /**
130
   * Specifies the requirements for the payment instrument that need to be included in the request for a particular route.
131
   * @return description
132
  **/
133
  @ApiModelProperty(value = "Specifies the requirements for the payment instrument that need to be included in the request for a particular route.")
134
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
135
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
136

137
  public String getDescription() {
138
    return description;
×
139
  }
140

141

142
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
143
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
144
  public void setDescription(String description) {
145
    this.description = description;
×
146
  }
×
147

148

149
  public PaymentInstrumentRequirement issuingCountryCode(String issuingCountryCode) {
150
    this.issuingCountryCode = issuingCountryCode;
×
151
    return this;
×
152
  }
153

154
   /**
155
   * The two-character ISO-3166-1 alpha-2 country code of the counterparty. For example, **US** or **NL**.
156
   * @return issuingCountryCode
157
  **/
158
  @ApiModelProperty(value = "The two-character ISO-3166-1 alpha-2 country code of the counterparty. For example, **US** or **NL**.")
159
  @JsonProperty(JSON_PROPERTY_ISSUING_COUNTRY_CODE)
160
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
161

162
  public String getIssuingCountryCode() {
163
    return issuingCountryCode;
×
164
  }
165

166

167
  @JsonProperty(JSON_PROPERTY_ISSUING_COUNTRY_CODE)
168
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
169
  public void setIssuingCountryCode(String issuingCountryCode) {
170
    this.issuingCountryCode = issuingCountryCode;
×
171
  }
×
172

173

174
  public PaymentInstrumentRequirement paymentInstrumentType(PaymentInstrumentTypeEnum paymentInstrumentType) {
175
    this.paymentInstrumentType = paymentInstrumentType;
×
176
    return this;
×
177
  }
178

179
   /**
180
   * The type of the payment instrument. For example, \"BankAccount\" or \"Card\".
181
   * @return paymentInstrumentType
182
  **/
183
  @ApiModelProperty(value = "The type of the payment instrument. For example, \"BankAccount\" or \"Card\".")
184
  @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_TYPE)
185
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
186

187
  public PaymentInstrumentTypeEnum getPaymentInstrumentType() {
188
    return paymentInstrumentType;
×
189
  }
190

191

192
  @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_TYPE)
193
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
194
  public void setPaymentInstrumentType(PaymentInstrumentTypeEnum paymentInstrumentType) {
195
    this.paymentInstrumentType = paymentInstrumentType;
×
196
  }
×
197

198

199
  public PaymentInstrumentRequirement type(TypeEnum type) {
200
    this.type = type;
×
201
    return this;
×
202
  }
203

204
   /**
205
   * **paymentInstrumentRequirement**
206
   * @return type
207
  **/
208
  @ApiModelProperty(required = true, value = "**paymentInstrumentRequirement**")
209
  @JsonProperty(JSON_PROPERTY_TYPE)
210
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
211

212
  public TypeEnum getType() {
213
    return type;
×
214
  }
215

216

217
  @JsonProperty(JSON_PROPERTY_TYPE)
218
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
219
  public void setType(TypeEnum type) {
220
    this.type = type;
×
221
  }
×
222

223

224
  /**
225
   * Return true if this PaymentInstrumentRequirement object is equal to o.
226
   */
227
  @Override
228
  public boolean equals(Object o) {
229
    if (this == o) {
×
230
      return true;
×
231
    }
232
    if (o == null || getClass() != o.getClass()) {
×
233
      return false;
×
234
    }
235
    PaymentInstrumentRequirement paymentInstrumentRequirement = (PaymentInstrumentRequirement) o;
×
236
    return Objects.equals(this.description, paymentInstrumentRequirement.description) &&
×
237
        Objects.equals(this.issuingCountryCode, paymentInstrumentRequirement.issuingCountryCode) &&
×
238
        Objects.equals(this.paymentInstrumentType, paymentInstrumentRequirement.paymentInstrumentType) &&
×
239
        Objects.equals(this.type, paymentInstrumentRequirement.type);
×
240
  }
241

242
  @Override
243
  public int hashCode() {
244
    return Objects.hash(description, issuingCountryCode, paymentInstrumentType, type);
×
245
  }
246

247
  @Override
248
  public String toString() {
249
    StringBuilder sb = new StringBuilder();
×
250
    sb.append("class PaymentInstrumentRequirement {\n");
×
251
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
252
    sb.append("    issuingCountryCode: ").append(toIndentedString(issuingCountryCode)).append("\n");
×
253
    sb.append("    paymentInstrumentType: ").append(toIndentedString(paymentInstrumentType)).append("\n");
×
254
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
255
    sb.append("}");
×
256
    return sb.toString();
×
257
  }
258

259
  /**
260
   * Convert the given object to string with each line indented by 4 spaces
261
   * (except the first line).
262
   */
263
  private String toIndentedString(Object o) {
264
    if (o == null) {
×
265
      return "null";
×
266
    }
267
    return o.toString().replace("\n", "\n    ");
×
268
  }
269

270
/**
271
   * Create an instance of PaymentInstrumentRequirement given an JSON string
272
   *
273
   * @param jsonString JSON string
274
   * @return An instance of PaymentInstrumentRequirement
275
   * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentInstrumentRequirement
276
   */
277
  public static PaymentInstrumentRequirement fromJson(String jsonString) throws JsonProcessingException {
278
    return JSON.getMapper().readValue(jsonString, PaymentInstrumentRequirement.class);
×
279
  }
280
/**
281
  * Convert an instance of PaymentInstrumentRequirement to an JSON string
282
  *
283
  * @return JSON string
284
  */
285
  public String toJson() throws JsonProcessingException {
286
    return JSON.getMapper().writeValueAsString(this);
×
287
  }
288
}
289

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