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

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

22 Sep 2023 11:24AM UTC coverage: 12.611%. First build
#2661

push

web-flow
Merge 251f6ff51 into 9e36e9c01

9262 of 9262 new or added lines in 142 files covered. (100.0%)

11033 of 87486 relevant lines covered (12.61%)

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/marketpayaccount/ViasAddress.java
1
/*
2
 * Account API
3
 * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead.  The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them.  For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example:   ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ```  Alternatively, you can use the username and password to connect to the API using basic authentication. For example:  ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints).  ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number.  For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ```
4
 *
5
 * The version of the OpenAPI document: 6
6
 * 
7
 *
8
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
 * https://openapi-generator.tech
10
 * Do not edit the class manually.
11
 */
12

13

14
package com.adyen.model.marketpayaccount;
15

16
import java.util.Objects;
17
import java.util.Arrays;
18
import java.util.Map;
19
import java.util.HashMap;
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 com.fasterxml.jackson.annotation.JsonPropertyOrder;
28
import com.fasterxml.jackson.core.JsonProcessingException;
29

30

31
/**
32
 * ViasAddress
33
 */
34
@JsonPropertyOrder({
35
  ViasAddress.JSON_PROPERTY_CITY,
36
  ViasAddress.JSON_PROPERTY_COUNTRY,
37
  ViasAddress.JSON_PROPERTY_HOUSE_NUMBER_OR_NAME,
38
  ViasAddress.JSON_PROPERTY_POSTAL_CODE,
39
  ViasAddress.JSON_PROPERTY_STATE_OR_PROVINCE,
40
  ViasAddress.JSON_PROPERTY_STREET
41
})
42

43
public class ViasAddress {
44
  public static final String JSON_PROPERTY_CITY = "city";
45
  private String city;
46

47
  public static final String JSON_PROPERTY_COUNTRY = "country";
48
  private String country;
49

50
  public static final String JSON_PROPERTY_HOUSE_NUMBER_OR_NAME = "houseNumberOrName";
51
  private String houseNumberOrName;
52

53
  public static final String JSON_PROPERTY_POSTAL_CODE = "postalCode";
54
  private String postalCode;
55

56
  public static final String JSON_PROPERTY_STATE_OR_PROVINCE = "stateOrProvince";
57
  private String stateOrProvince;
58

59
  public static final String JSON_PROPERTY_STREET = "street";
60
  private String street;
61

62
  public ViasAddress() { 
×
63
  }
×
64

65
  public ViasAddress city(String city) {
66
    this.city = city;
×
67
    return this;
×
68
  }
69

70
   /**
71
   * The name of the city. Required if the `houseNumberOrName`, `street`, `postalCode`, or `stateOrProvince` are provided.
72
   * @return city
73
  **/
74
  @ApiModelProperty(value = "The name of the city. Required if the `houseNumberOrName`, `street`, `postalCode`, or `stateOrProvince` are provided.")
75
  @JsonProperty(JSON_PROPERTY_CITY)
76
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
77

78
  public String getCity() {
79
    return city;
×
80
  }
81

82

83
  @JsonProperty(JSON_PROPERTY_CITY)
84
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
85
  public void setCity(String city) {
86
    this.city = city;
×
87
  }
×
88

89

90
  public ViasAddress country(String country) {
91
    this.country = country;
×
92
    return this;
×
93
  }
94

95
   /**
96
   * The two-character country code of the address in ISO-3166-1 alpha-2 format. For example, **NL**.
97
   * @return country
98
  **/
99
  @ApiModelProperty(required = true, value = "The two-character country code of the address in ISO-3166-1 alpha-2 format. For example, **NL**.")
100
  @JsonProperty(JSON_PROPERTY_COUNTRY)
101
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
102

103
  public String getCountry() {
104
    return country;
×
105
  }
106

107

108
  @JsonProperty(JSON_PROPERTY_COUNTRY)
109
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
110
  public void setCountry(String country) {
111
    this.country = country;
×
112
  }
×
113

114

115
  public ViasAddress houseNumberOrName(String houseNumberOrName) {
116
    this.houseNumberOrName = houseNumberOrName;
×
117
    return this;
×
118
  }
119

120
   /**
121
   * The number or name of the house.
122
   * @return houseNumberOrName
123
  **/
124
  @ApiModelProperty(value = "The number or name of the house.")
125
  @JsonProperty(JSON_PROPERTY_HOUSE_NUMBER_OR_NAME)
126
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
127

128
  public String getHouseNumberOrName() {
129
    return houseNumberOrName;
×
130
  }
131

132

133
  @JsonProperty(JSON_PROPERTY_HOUSE_NUMBER_OR_NAME)
134
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
135
  public void setHouseNumberOrName(String houseNumberOrName) {
136
    this.houseNumberOrName = houseNumberOrName;
×
137
  }
×
138

139

140
  public ViasAddress postalCode(String postalCode) {
141
    this.postalCode = postalCode;
×
142
    return this;
×
143
  }
144

145
   /**
146
   * The postal code. Required if the `houseNumberOrName`, `street`, `city`, or `stateOrProvince` are provided.  Maximum length:  * 5 digits for addresses in the US.  * 10 characters for all other countries.
147
   * @return postalCode
148
  **/
149
  @ApiModelProperty(value = "The postal code. Required if the `houseNumberOrName`, `street`, `city`, or `stateOrProvince` are provided.  Maximum length:  * 5 digits for addresses in the US.  * 10 characters for all other countries.")
150
  @JsonProperty(JSON_PROPERTY_POSTAL_CODE)
151
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
152

153
  public String getPostalCode() {
154
    return postalCode;
×
155
  }
156

157

158
  @JsonProperty(JSON_PROPERTY_POSTAL_CODE)
159
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
160
  public void setPostalCode(String postalCode) {
161
    this.postalCode = postalCode;
×
162
  }
×
163

164

165
  public ViasAddress stateOrProvince(String stateOrProvince) {
166
    this.stateOrProvince = stateOrProvince;
×
167
    return this;
×
168
  }
169

170
   /**
171
   * The abbreviation of the state or province. Required if the `houseNumberOrName`, `street`, `city`, or `postalCode` are provided.   Maximum length:  * 2 characters for addresses in the US or Canada.  * 3 characters for all other countries. 
172
   * @return stateOrProvince
173
  **/
174
  @ApiModelProperty(value = "The abbreviation of the state or province. Required if the `houseNumberOrName`, `street`, `city`, or `postalCode` are provided.   Maximum length:  * 2 characters for addresses in the US or Canada.  * 3 characters for all other countries. ")
175
  @JsonProperty(JSON_PROPERTY_STATE_OR_PROVINCE)
176
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
177

178
  public String getStateOrProvince() {
179
    return stateOrProvince;
×
180
  }
181

182

183
  @JsonProperty(JSON_PROPERTY_STATE_OR_PROVINCE)
184
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
185
  public void setStateOrProvince(String stateOrProvince) {
186
    this.stateOrProvince = stateOrProvince;
×
187
  }
×
188

189

190
  public ViasAddress street(String street) {
191
    this.street = street;
×
192
    return this;
×
193
  }
194

195
   /**
196
   * The name of the street. Required if the `houseNumberOrName`, `city`, `postalCode`, or `stateOrProvince` are provided.
197
   * @return street
198
  **/
199
  @ApiModelProperty(value = "The name of the street. Required if the `houseNumberOrName`, `city`, `postalCode`, or `stateOrProvince` are provided.")
200
  @JsonProperty(JSON_PROPERTY_STREET)
201
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
202

203
  public String getStreet() {
204
    return street;
×
205
  }
206

207

208
  @JsonProperty(JSON_PROPERTY_STREET)
209
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
210
  public void setStreet(String street) {
211
    this.street = street;
×
212
  }
×
213

214

215
  /**
216
   * Return true if this ViasAddress object is equal to o.
217
   */
218
  @Override
219
  public boolean equals(Object o) {
220
    if (this == o) {
×
221
      return true;
×
222
    }
223
    if (o == null || getClass() != o.getClass()) {
×
224
      return false;
×
225
    }
226
    ViasAddress viasAddress = (ViasAddress) o;
×
227
    return Objects.equals(this.city, viasAddress.city) &&
×
228
        Objects.equals(this.country, viasAddress.country) &&
×
229
        Objects.equals(this.houseNumberOrName, viasAddress.houseNumberOrName) &&
×
230
        Objects.equals(this.postalCode, viasAddress.postalCode) &&
×
231
        Objects.equals(this.stateOrProvince, viasAddress.stateOrProvince) &&
×
232
        Objects.equals(this.street, viasAddress.street);
×
233
  }
234

235
  @Override
236
  public int hashCode() {
237
    return Objects.hash(city, country, houseNumberOrName, postalCode, stateOrProvince, street);
×
238
  }
239

240
  @Override
241
  public String toString() {
242
    StringBuilder sb = new StringBuilder();
×
243
    sb.append("class ViasAddress {\n");
×
244
    sb.append("    city: ").append(toIndentedString(city)).append("\n");
×
245
    sb.append("    country: ").append(toIndentedString(country)).append("\n");
×
246
    sb.append("    houseNumberOrName: ").append(toIndentedString(houseNumberOrName)).append("\n");
×
247
    sb.append("    postalCode: ").append(toIndentedString(postalCode)).append("\n");
×
248
    sb.append("    stateOrProvince: ").append(toIndentedString(stateOrProvince)).append("\n");
×
249
    sb.append("    street: ").append(toIndentedString(street)).append("\n");
×
250
    sb.append("}");
×
251
    return sb.toString();
×
252
  }
253

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

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

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