• 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/marketpayfund/RefundFundsTransferResponse.java
1
/*
2
 * Fund 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 Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account.  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 Fund 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/Fund/v6/accountHolderBalance ```
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.marketpayfund;
15

16
import java.util.Objects;
17
import java.util.Arrays;
18
import java.util.Map;
19
import java.util.HashMap;
20
import com.adyen.model.marketpayfund.ErrorFieldType;
21
import com.fasterxml.jackson.annotation.JsonInclude;
22
import com.fasterxml.jackson.annotation.JsonProperty;
23
import com.fasterxml.jackson.annotation.JsonCreator;
24
import com.fasterxml.jackson.annotation.JsonTypeName;
25
import com.fasterxml.jackson.annotation.JsonValue;
26
import io.swagger.annotations.ApiModel;
27
import io.swagger.annotations.ApiModelProperty;
28
import java.util.ArrayList;
29
import java.util.List;
30
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
31
import com.fasterxml.jackson.core.JsonProcessingException;
32

33

34
/**
35
 * RefundFundsTransferResponse
36
 */
37
@JsonPropertyOrder({
38
  RefundFundsTransferResponse.JSON_PROPERTY_INVALID_FIELDS,
39
  RefundFundsTransferResponse.JSON_PROPERTY_MERCHANT_REFERENCE,
40
  RefundFundsTransferResponse.JSON_PROPERTY_MESSAGE,
41
  RefundFundsTransferResponse.JSON_PROPERTY_ORIGINAL_REFERENCE,
42
  RefundFundsTransferResponse.JSON_PROPERTY_PSP_REFERENCE,
43
  RefundFundsTransferResponse.JSON_PROPERTY_RESULT_CODE
44
})
45

46
public class RefundFundsTransferResponse {
47
  public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields";
48
  private List<ErrorFieldType> invalidFields = null;
×
49

50
  public static final String JSON_PROPERTY_MERCHANT_REFERENCE = "merchantReference";
51
  private String merchantReference;
52

53
  public static final String JSON_PROPERTY_MESSAGE = "message";
54
  private String message;
55

56
  public static final String JSON_PROPERTY_ORIGINAL_REFERENCE = "originalReference";
57
  private String originalReference;
58

59
  public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference";
60
  private String pspReference;
61

62
  public static final String JSON_PROPERTY_RESULT_CODE = "resultCode";
63
  private String resultCode;
64

65
  public RefundFundsTransferResponse() { 
×
66
  }
×
67

68
  public RefundFundsTransferResponse invalidFields(List<ErrorFieldType> invalidFields) {
69
    this.invalidFields = invalidFields;
×
70
    return this;
×
71
  }
72

73
  public RefundFundsTransferResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) {
74
    if (this.invalidFields == null) {
×
75
      this.invalidFields = new ArrayList<>();
×
76
    }
77
    this.invalidFields.add(invalidFieldsItem);
×
78
    return this;
×
79
  }
80

81
   /**
82
   * Contains field validation errors that would prevent requests from being processed.
83
   * @return invalidFields
84
  **/
85
  @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.")
86
  @JsonProperty(JSON_PROPERTY_INVALID_FIELDS)
87
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
88

89
  public List<ErrorFieldType> getInvalidFields() {
90
    return invalidFields;
×
91
  }
92

93

94
  @JsonProperty(JSON_PROPERTY_INVALID_FIELDS)
95
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
96
  public void setInvalidFields(List<ErrorFieldType> invalidFields) {
97
    this.invalidFields = invalidFields;
×
98
  }
×
99

100

101
  public RefundFundsTransferResponse merchantReference(String merchantReference) {
102
    this.merchantReference = merchantReference;
×
103
    return this;
×
104
  }
105

106
   /**
107
   * The value supplied by the executing user when initiating the transfer refund; may be used to link multiple transactions.
108
   * @return merchantReference
109
  **/
110
  @ApiModelProperty(value = "The value supplied by the executing user when initiating the transfer refund; may be used to link multiple transactions.")
111
  @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE)
112
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
113

114
  public String getMerchantReference() {
115
    return merchantReference;
×
116
  }
117

118

119
  @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE)
120
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
121
  public void setMerchantReference(String merchantReference) {
122
    this.merchantReference = merchantReference;
×
123
  }
×
124

125

126
  public RefundFundsTransferResponse message(String message) {
127
    this.message = message;
×
128
    return this;
×
129
  }
130

131
   /**
132
   * The message of the response.
133
   * @return message
134
  **/
135
  @ApiModelProperty(value = "The message of the response.")
136
  @JsonProperty(JSON_PROPERTY_MESSAGE)
137
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
138

139
  public String getMessage() {
140
    return message;
×
141
  }
142

143

144
  @JsonProperty(JSON_PROPERTY_MESSAGE)
145
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
146
  public void setMessage(String message) {
147
    this.message = message;
×
148
  }
×
149

150

151
  public RefundFundsTransferResponse originalReference(String originalReference) {
152
    this.originalReference = originalReference;
×
153
    return this;
×
154
  }
155

156
   /**
157
   * A PSP reference of the original fund transfer.
158
   * @return originalReference
159
  **/
160
  @ApiModelProperty(value = "A PSP reference of the original fund transfer.")
161
  @JsonProperty(JSON_PROPERTY_ORIGINAL_REFERENCE)
162
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
163

164
  public String getOriginalReference() {
165
    return originalReference;
×
166
  }
167

168

169
  @JsonProperty(JSON_PROPERTY_ORIGINAL_REFERENCE)
170
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
171
  public void setOriginalReference(String originalReference) {
172
    this.originalReference = originalReference;
×
173
  }
×
174

175

176
  public RefundFundsTransferResponse pspReference(String pspReference) {
177
    this.pspReference = pspReference;
×
178
    return this;
×
179
  }
180

181
   /**
182
   * The reference of a request. Can be used to uniquely identify the request.
183
   * @return pspReference
184
  **/
185
  @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.")
186
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
187
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
188

189
  public String getPspReference() {
190
    return pspReference;
×
191
  }
192

193

194
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
195
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
196
  public void setPspReference(String pspReference) {
197
    this.pspReference = pspReference;
×
198
  }
×
199

200

201
  public RefundFundsTransferResponse resultCode(String resultCode) {
202
    this.resultCode = resultCode;
×
203
    return this;
×
204
  }
205

206
   /**
207
   * The result code.
208
   * @return resultCode
209
  **/
210
  @ApiModelProperty(value = "The result code.")
211
  @JsonProperty(JSON_PROPERTY_RESULT_CODE)
212
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
213

214
  public String getResultCode() {
215
    return resultCode;
×
216
  }
217

218

219
  @JsonProperty(JSON_PROPERTY_RESULT_CODE)
220
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
221
  public void setResultCode(String resultCode) {
222
    this.resultCode = resultCode;
×
223
  }
×
224

225

226
  /**
227
   * Return true if this RefundFundsTransferResponse object is equal to o.
228
   */
229
  @Override
230
  public boolean equals(Object o) {
231
    if (this == o) {
×
232
      return true;
×
233
    }
234
    if (o == null || getClass() != o.getClass()) {
×
235
      return false;
×
236
    }
237
    RefundFundsTransferResponse refundFundsTransferResponse = (RefundFundsTransferResponse) o;
×
238
    return Objects.equals(this.invalidFields, refundFundsTransferResponse.invalidFields) &&
×
239
        Objects.equals(this.merchantReference, refundFundsTransferResponse.merchantReference) &&
×
240
        Objects.equals(this.message, refundFundsTransferResponse.message) &&
×
241
        Objects.equals(this.originalReference, refundFundsTransferResponse.originalReference) &&
×
242
        Objects.equals(this.pspReference, refundFundsTransferResponse.pspReference) &&
×
243
        Objects.equals(this.resultCode, refundFundsTransferResponse.resultCode);
×
244
  }
245

246
  @Override
247
  public int hashCode() {
248
    return Objects.hash(invalidFields, merchantReference, message, originalReference, pspReference, resultCode);
×
249
  }
250

251
  @Override
252
  public String toString() {
253
    StringBuilder sb = new StringBuilder();
×
254
    sb.append("class RefundFundsTransferResponse {\n");
×
255
    sb.append("    invalidFields: ").append(toIndentedString(invalidFields)).append("\n");
×
256
    sb.append("    merchantReference: ").append(toIndentedString(merchantReference)).append("\n");
×
257
    sb.append("    message: ").append(toIndentedString(message)).append("\n");
×
258
    sb.append("    originalReference: ").append(toIndentedString(originalReference)).append("\n");
×
259
    sb.append("    pspReference: ").append(toIndentedString(pspReference)).append("\n");
×
260
    sb.append("    resultCode: ").append(toIndentedString(resultCode)).append("\n");
×
261
    sb.append("}");
×
262
    return sb.toString();
×
263
  }
264

265
  /**
266
   * Convert the given object to string with each line indented by 4 spaces
267
   * (except the first line).
268
   */
269
  private String toIndentedString(Object o) {
270
    if (o == null) {
×
271
      return "null";
×
272
    }
273
    return o.toString().replace("\n", "\n    ");
×
274
  }
275

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

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