• 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/ServiceError.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
 * ServiceError
33
 */
34
@JsonPropertyOrder({
35
  ServiceError.JSON_PROPERTY_ERROR_CODE,
36
  ServiceError.JSON_PROPERTY_ERROR_TYPE,
37
  ServiceError.JSON_PROPERTY_MESSAGE,
38
  ServiceError.JSON_PROPERTY_PSP_REFERENCE,
39
  ServiceError.JSON_PROPERTY_STATUS
40
})
41

42
public class ServiceError {
43
  public static final String JSON_PROPERTY_ERROR_CODE = "errorCode";
44
  private String errorCode;
45

46
  public static final String JSON_PROPERTY_ERROR_TYPE = "errorType";
47
  private String errorType;
48

49
  public static final String JSON_PROPERTY_MESSAGE = "message";
50
  private String message;
51

52
  public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference";
53
  private String pspReference;
54

55
  public static final String JSON_PROPERTY_STATUS = "status";
56
  private Integer status;
57

58
  public ServiceError() { 
×
59
  }
×
60

61
  public ServiceError errorCode(String errorCode) {
62
    this.errorCode = errorCode;
×
63
    return this;
×
64
  }
65

66
   /**
67
   * The error code mapped to the error message.
68
   * @return errorCode
69
  **/
70
  @ApiModelProperty(value = "The error code mapped to the error message.")
71
  @JsonProperty(JSON_PROPERTY_ERROR_CODE)
72
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
73

74
  public String getErrorCode() {
75
    return errorCode;
×
76
  }
77

78

79
  @JsonProperty(JSON_PROPERTY_ERROR_CODE)
80
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
81
  public void setErrorCode(String errorCode) {
82
    this.errorCode = errorCode;
×
83
  }
×
84

85

86
  public ServiceError errorType(String errorType) {
87
    this.errorType = errorType;
×
88
    return this;
×
89
  }
90

91
   /**
92
   * The category of the error.
93
   * @return errorType
94
  **/
95
  @ApiModelProperty(value = "The category of the error.")
96
  @JsonProperty(JSON_PROPERTY_ERROR_TYPE)
97
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
98

99
  public String getErrorType() {
100
    return errorType;
×
101
  }
102

103

104
  @JsonProperty(JSON_PROPERTY_ERROR_TYPE)
105
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
106
  public void setErrorType(String errorType) {
107
    this.errorType = errorType;
×
108
  }
×
109

110

111
  public ServiceError message(String message) {
112
    this.message = message;
×
113
    return this;
×
114
  }
115

116
   /**
117
   * A short explanation of the issue.
118
   * @return message
119
  **/
120
  @ApiModelProperty(value = "A short explanation of the issue.")
121
  @JsonProperty(JSON_PROPERTY_MESSAGE)
122
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
123

124
  public String getMessage() {
125
    return message;
×
126
  }
127

128

129
  @JsonProperty(JSON_PROPERTY_MESSAGE)
130
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
131
  public void setMessage(String message) {
132
    this.message = message;
×
133
  }
×
134

135

136
  public ServiceError pspReference(String pspReference) {
137
    this.pspReference = pspReference;
×
138
    return this;
×
139
  }
140

141
   /**
142
   * The PSP reference of the payment.
143
   * @return pspReference
144
  **/
145
  @ApiModelProperty(value = "The PSP reference of the payment.")
146
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
147
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
148

149
  public String getPspReference() {
150
    return pspReference;
×
151
  }
152

153

154
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
155
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
156
  public void setPspReference(String pspReference) {
157
    this.pspReference = pspReference;
×
158
  }
×
159

160

161
  public ServiceError status(Integer status) {
162
    this.status = status;
×
163
    return this;
×
164
  }
165

166
   /**
167
   * The HTTP response status.
168
   * @return status
169
  **/
170
  @ApiModelProperty(value = "The HTTP response status.")
171
  @JsonProperty(JSON_PROPERTY_STATUS)
172
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
173

174
  public Integer getStatus() {
175
    return status;
×
176
  }
177

178

179
  @JsonProperty(JSON_PROPERTY_STATUS)
180
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
181
  public void setStatus(Integer status) {
182
    this.status = status;
×
183
  }
×
184

185

186
  /**
187
   * Return true if this ServiceError object is equal to o.
188
   */
189
  @Override
190
  public boolean equals(Object o) {
191
    if (this == o) {
×
192
      return true;
×
193
    }
194
    if (o == null || getClass() != o.getClass()) {
×
195
      return false;
×
196
    }
197
    ServiceError serviceError = (ServiceError) o;
×
198
    return Objects.equals(this.errorCode, serviceError.errorCode) &&
×
199
        Objects.equals(this.errorType, serviceError.errorType) &&
×
200
        Objects.equals(this.message, serviceError.message) &&
×
201
        Objects.equals(this.pspReference, serviceError.pspReference) &&
×
202
        Objects.equals(this.status, serviceError.status);
×
203
  }
204

205
  @Override
206
  public int hashCode() {
207
    return Objects.hash(errorCode, errorType, message, pspReference, status);
×
208
  }
209

210
  @Override
211
  public String toString() {
212
    StringBuilder sb = new StringBuilder();
×
213
    sb.append("class ServiceError {\n");
×
214
    sb.append("    errorCode: ").append(toIndentedString(errorCode)).append("\n");
×
215
    sb.append("    errorType: ").append(toIndentedString(errorType)).append("\n");
×
216
    sb.append("    message: ").append(toIndentedString(message)).append("\n");
×
217
    sb.append("    pspReference: ").append(toIndentedString(pspReference)).append("\n");
×
218
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
×
219
    sb.append("}");
×
220
    return sb.toString();
×
221
  }
222

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

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

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