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

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

08 Dec 2023 12:05PM UTC coverage: 12.838%. First build
#2905

push

web-flow
Merge caa3554a7 into ec0c20882

1 of 151 new or added lines in 12 files covered. (0.66%)

12463 of 97080 relevant lines covered (12.84%)

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/ModelConfiguration.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.Currency;
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
 * ModelConfiguration
35
 */
36
@JsonPropertyOrder({
37
  ModelConfiguration.JSON_PROPERTY_BRAND,
38
  ModelConfiguration.JSON_PROPERTY_COUNTRY,
39
  ModelConfiguration.JSON_PROPERTY_CURRENCIES,
40
  ModelConfiguration.JSON_PROPERTY_SOURCES
41
})
42
@JsonTypeName("Configuration")
43

44
public class ModelConfiguration {
45
  public static final String JSON_PROPERTY_BRAND = "brand";
46
  private String brand;
47

48
  public static final String JSON_PROPERTY_COUNTRY = "country";
NEW
49
  private List<String> country = null;
×
50

51
  public static final String JSON_PROPERTY_CURRENCIES = "currencies";
52
  private List<Currency> currencies = new ArrayList<>();
×
53

54
  public static final String JSON_PROPERTY_SOURCES = "sources";
55
  private List<String> sources = null;
×
56

57
  public ModelConfiguration() { 
×
58
  }
×
59

60
  public ModelConfiguration brand(String brand) {
61
    this.brand = brand;
×
62
    return this;
×
63
  }
64

65
   /**
66
   * Payment method, like **eftpos_australia** or **mc**. See the [possible values](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). 
67
   * @return brand
68
  **/
69
  @ApiModelProperty(required = true, value = "Payment method, like **eftpos_australia** or **mc**. See the [possible values](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). ")
70
  @JsonProperty(JSON_PROPERTY_BRAND)
71
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
72

73
  public String getBrand() {
74
    return brand;
×
75
  }
76

77

78
  @JsonProperty(JSON_PROPERTY_BRAND)
79
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
80
  public void setBrand(String brand) {
81
    this.brand = brand;
×
82
  }
×
83

84

85
  public ModelConfiguration country(List<String> country) {
NEW
86
    this.country = country;
×
NEW
87
    return this;
×
88
  }
89

90
  public ModelConfiguration addCountryItem(String countryItem) {
NEW
91
    if (this.country == null) {
×
NEW
92
      this.country = new ArrayList<>();
×
93
    }
NEW
94
    this.country.add(countryItem);
×
NEW
95
    return this;
×
96
  }
97

98
   /**
99
   * Countries, to filter different surcharge amounts for domestic or international cards.
100
   * @return country
101
  **/
102
  @ApiModelProperty(value = "Countries, to filter different surcharge amounts for domestic or international cards.")
103
  @JsonProperty(JSON_PROPERTY_COUNTRY)
104
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
105

106
  public List<String> getCountry() {
NEW
107
    return country;
×
108
  }
109

110

111
  @JsonProperty(JSON_PROPERTY_COUNTRY)
112
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
113
  public void setCountry(List<String> country) {
NEW
114
    this.country = country;
×
NEW
115
  }
×
116

117

118
  public ModelConfiguration currencies(List<Currency> currencies) {
119
    this.currencies = currencies;
×
120
    return this;
×
121
  }
122

123
  public ModelConfiguration addCurrenciesItem(Currency currenciesItem) {
124
    this.currencies.add(currenciesItem);
×
125
    return this;
×
126
  }
127

128
   /**
129
   * Currency, and surcharge percentage or amount.
130
   * @return currencies
131
  **/
132
  @ApiModelProperty(required = true, value = "Currency, and surcharge percentage or amount.")
133
  @JsonProperty(JSON_PROPERTY_CURRENCIES)
134
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
135

136
  public List<Currency> getCurrencies() {
137
    return currencies;
×
138
  }
139

140

141
  @JsonProperty(JSON_PROPERTY_CURRENCIES)
142
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
143
  public void setCurrencies(List<Currency> currencies) {
144
    this.currencies = currencies;
×
145
  }
×
146

147

148
  public ModelConfiguration sources(List<String> sources) {
149
    this.sources = sources;
×
150
    return this;
×
151
  }
152

153
  public ModelConfiguration addSourcesItem(String sourcesItem) {
154
    if (this.sources == null) {
×
155
      this.sources = new ArrayList<>();
×
156
    }
157
    this.sources.add(sourcesItem);
×
158
    return this;
×
159
  }
160

161
   /**
162
   * Funding source. Possible values: * **Credit** * **Debit**
163
   * @return sources
164
  **/
165
  @ApiModelProperty(value = "Funding source. Possible values: * **Credit** * **Debit**")
166
  @JsonProperty(JSON_PROPERTY_SOURCES)
167
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
168

169
  public List<String> getSources() {
170
    return sources;
×
171
  }
172

173

174
  @JsonProperty(JSON_PROPERTY_SOURCES)
175
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
176
  public void setSources(List<String> sources) {
177
    this.sources = sources;
×
178
  }
×
179

180

181
  /**
182
   * Return true if this Configuration object is equal to o.
183
   */
184
  @Override
185
  public boolean equals(Object o) {
186
    if (this == o) {
×
187
      return true;
×
188
    }
189
    if (o == null || getClass() != o.getClass()) {
×
190
      return false;
×
191
    }
192
    ModelConfiguration configuration = (ModelConfiguration) o;
×
193
    return Objects.equals(this.brand, configuration.brand) &&
×
NEW
194
        Objects.equals(this.country, configuration.country) &&
×
195
        Objects.equals(this.currencies, configuration.currencies) &&
×
196
        Objects.equals(this.sources, configuration.sources);
×
197
  }
198

199
  @Override
200
  public int hashCode() {
NEW
201
    return Objects.hash(brand, country, currencies, sources);
×
202
  }
203

204
  @Override
205
  public String toString() {
206
    StringBuilder sb = new StringBuilder();
×
207
    sb.append("class ModelConfiguration {\n");
×
208
    sb.append("    brand: ").append(toIndentedString(brand)).append("\n");
×
NEW
209
    sb.append("    country: ").append(toIndentedString(country)).append("\n");
×
210
    sb.append("    currencies: ").append(toIndentedString(currencies)).append("\n");
×
211
    sb.append("    sources: ").append(toIndentedString(sources)).append("\n");
×
212
    sb.append("}");
×
213
    return sb.toString();
×
214
  }
215

216
  /**
217
   * Convert the given object to string with each line indented by 4 spaces
218
   * (except the first line).
219
   */
220
  private String toIndentedString(Object o) {
221
    if (o == null) {
×
222
      return "null";
×
223
    }
224
    return o.toString().replace("\n", "\n    ");
×
225
  }
226

227
/**
228
   * Create an instance of ModelConfiguration given an JSON string
229
   *
230
   * @param jsonString JSON string
231
   * @return An instance of ModelConfiguration
232
   * @throws JsonProcessingException if the JSON string is invalid with respect to ModelConfiguration
233
   */
234
  public static ModelConfiguration fromJson(String jsonString) throws JsonProcessingException {
235
    return JSON.getMapper().readValue(jsonString, ModelConfiguration.class);
×
236
  }
237
/**
238
  * Convert an instance of ModelConfiguration to an JSON string
239
  *
240
  * @return JSON string
241
  */
242
  public String toJson() throws JsonProcessingException {
243
    return JSON.getMapper().writeValueAsString(this);
×
244
  }
245
}
246

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