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

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

14 Sep 2023 10:57AM UTC coverage: 12.847%. First build
#2634

push

web-flow
Merge 943dcfbbf into 1219e39a0

9258 of 9258 new or added lines in 141 files covered. (100.0%)

10971 of 85399 relevant lines covered (12.85%)

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/AccountHolderBalanceResponse.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.AccountDetailBalance;
21
import com.adyen.model.marketpayfund.DetailBalance;
22
import com.adyen.model.marketpayfund.ErrorFieldType;
23
import com.fasterxml.jackson.annotation.JsonInclude;
24
import com.fasterxml.jackson.annotation.JsonProperty;
25
import com.fasterxml.jackson.annotation.JsonCreator;
26
import com.fasterxml.jackson.annotation.JsonTypeName;
27
import com.fasterxml.jackson.annotation.JsonValue;
28
import io.swagger.annotations.ApiModel;
29
import io.swagger.annotations.ApiModelProperty;
30
import java.util.ArrayList;
31
import java.util.List;
32
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
33
import com.fasterxml.jackson.core.JsonProcessingException;
34

35

36
/**
37
 * AccountHolderBalanceResponse
38
 */
39
@JsonPropertyOrder({
40
  AccountHolderBalanceResponse.JSON_PROPERTY_BALANCE_PER_ACCOUNT,
41
  AccountHolderBalanceResponse.JSON_PROPERTY_INVALID_FIELDS,
42
  AccountHolderBalanceResponse.JSON_PROPERTY_PSP_REFERENCE,
43
  AccountHolderBalanceResponse.JSON_PROPERTY_RESULT_CODE,
44
  AccountHolderBalanceResponse.JSON_PROPERTY_TOTAL_BALANCE
45
})
46

47
public class AccountHolderBalanceResponse {
48
  public static final String JSON_PROPERTY_BALANCE_PER_ACCOUNT = "balancePerAccount";
49
  private List<AccountDetailBalance> balancePerAccount = null;
×
50

51
  public static final String JSON_PROPERTY_INVALID_FIELDS = "invalidFields";
52
  private List<ErrorFieldType> invalidFields = null;
×
53

54
  public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference";
55
  private String pspReference;
56

57
  public static final String JSON_PROPERTY_RESULT_CODE = "resultCode";
58
  private String resultCode;
59

60
  public static final String JSON_PROPERTY_TOTAL_BALANCE = "totalBalance";
61
  private DetailBalance totalBalance;
62

63
  public AccountHolderBalanceResponse() { 
×
64
  }
×
65

66
  public AccountHolderBalanceResponse balancePerAccount(List<AccountDetailBalance> balancePerAccount) {
67
    this.balancePerAccount = balancePerAccount;
×
68
    return this;
×
69
  }
70

71
  public AccountHolderBalanceResponse addBalancePerAccountItem(AccountDetailBalance balancePerAccountItem) {
72
    if (this.balancePerAccount == null) {
×
73
      this.balancePerAccount = new ArrayList<>();
×
74
    }
75
    this.balancePerAccount.add(balancePerAccountItem);
×
76
    return this;
×
77
  }
78

79
   /**
80
   * A list of each account and their balances.
81
   * @return balancePerAccount
82
  **/
83
  @ApiModelProperty(value = "A list of each account and their balances.")
84
  @JsonProperty(JSON_PROPERTY_BALANCE_PER_ACCOUNT)
85
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
86

87
  public List<AccountDetailBalance> getBalancePerAccount() {
88
    return balancePerAccount;
×
89
  }
90

91

92
  @JsonProperty(JSON_PROPERTY_BALANCE_PER_ACCOUNT)
93
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
94
  public void setBalancePerAccount(List<AccountDetailBalance> balancePerAccount) {
95
    this.balancePerAccount = balancePerAccount;
×
96
  }
×
97

98

99
  public AccountHolderBalanceResponse invalidFields(List<ErrorFieldType> invalidFields) {
100
    this.invalidFields = invalidFields;
×
101
    return this;
×
102
  }
103

104
  public AccountHolderBalanceResponse addInvalidFieldsItem(ErrorFieldType invalidFieldsItem) {
105
    if (this.invalidFields == null) {
×
106
      this.invalidFields = new ArrayList<>();
×
107
    }
108
    this.invalidFields.add(invalidFieldsItem);
×
109
    return this;
×
110
  }
111

112
   /**
113
   * Contains field validation errors that would prevent requests from being processed.
114
   * @return invalidFields
115
  **/
116
  @ApiModelProperty(value = "Contains field validation errors that would prevent requests from being processed.")
117
  @JsonProperty(JSON_PROPERTY_INVALID_FIELDS)
118
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
119

120
  public List<ErrorFieldType> getInvalidFields() {
121
    return invalidFields;
×
122
  }
123

124

125
  @JsonProperty(JSON_PROPERTY_INVALID_FIELDS)
126
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
127
  public void setInvalidFields(List<ErrorFieldType> invalidFields) {
128
    this.invalidFields = invalidFields;
×
129
  }
×
130

131

132
  public AccountHolderBalanceResponse pspReference(String pspReference) {
133
    this.pspReference = pspReference;
×
134
    return this;
×
135
  }
136

137
   /**
138
   * The reference of a request. Can be used to uniquely identify the request.
139
   * @return pspReference
140
  **/
141
  @ApiModelProperty(value = "The reference of a request. Can be used to uniquely identify the request.")
142
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
143
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
144

145
  public String getPspReference() {
146
    return pspReference;
×
147
  }
148

149

150
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
151
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
152
  public void setPspReference(String pspReference) {
153
    this.pspReference = pspReference;
×
154
  }
×
155

156

157
  public AccountHolderBalanceResponse resultCode(String resultCode) {
158
    this.resultCode = resultCode;
×
159
    return this;
×
160
  }
161

162
   /**
163
   * The result code.
164
   * @return resultCode
165
  **/
166
  @ApiModelProperty(value = "The result code.")
167
  @JsonProperty(JSON_PROPERTY_RESULT_CODE)
168
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
169

170
  public String getResultCode() {
171
    return resultCode;
×
172
  }
173

174

175
  @JsonProperty(JSON_PROPERTY_RESULT_CODE)
176
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
177
  public void setResultCode(String resultCode) {
178
    this.resultCode = resultCode;
×
179
  }
×
180

181

182
  public AccountHolderBalanceResponse totalBalance(DetailBalance totalBalance) {
183
    this.totalBalance = totalBalance;
×
184
    return this;
×
185
  }
186

187
   /**
188
   * Get totalBalance
189
   * @return totalBalance
190
  **/
191
  @ApiModelProperty(value = "")
192
  @JsonProperty(JSON_PROPERTY_TOTAL_BALANCE)
193
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
194

195
  public DetailBalance getTotalBalance() {
196
    return totalBalance;
×
197
  }
198

199

200
  @JsonProperty(JSON_PROPERTY_TOTAL_BALANCE)
201
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
202
  public void setTotalBalance(DetailBalance totalBalance) {
203
    this.totalBalance = totalBalance;
×
204
  }
×
205

206

207
  /**
208
   * Return true if this AccountHolderBalanceResponse object is equal to o.
209
   */
210
  @Override
211
  public boolean equals(Object o) {
212
    if (this == o) {
×
213
      return true;
×
214
    }
215
    if (o == null || getClass() != o.getClass()) {
×
216
      return false;
×
217
    }
218
    AccountHolderBalanceResponse accountHolderBalanceResponse = (AccountHolderBalanceResponse) o;
×
219
    return Objects.equals(this.balancePerAccount, accountHolderBalanceResponse.balancePerAccount) &&
×
220
        Objects.equals(this.invalidFields, accountHolderBalanceResponse.invalidFields) &&
×
221
        Objects.equals(this.pspReference, accountHolderBalanceResponse.pspReference) &&
×
222
        Objects.equals(this.resultCode, accountHolderBalanceResponse.resultCode) &&
×
223
        Objects.equals(this.totalBalance, accountHolderBalanceResponse.totalBalance);
×
224
  }
225

226
  @Override
227
  public int hashCode() {
228
    return Objects.hash(balancePerAccount, invalidFields, pspReference, resultCode, totalBalance);
×
229
  }
230

231
  @Override
232
  public String toString() {
233
    StringBuilder sb = new StringBuilder();
×
234
    sb.append("class AccountHolderBalanceResponse {\n");
×
235
    sb.append("    balancePerAccount: ").append(toIndentedString(balancePerAccount)).append("\n");
×
236
    sb.append("    invalidFields: ").append(toIndentedString(invalidFields)).append("\n");
×
237
    sb.append("    pspReference: ").append(toIndentedString(pspReference)).append("\n");
×
238
    sb.append("    resultCode: ").append(toIndentedString(resultCode)).append("\n");
×
239
    sb.append("    totalBalance: ").append(toIndentedString(totalBalance)).append("\n");
×
240
    sb.append("}");
×
241
    return sb.toString();
×
242
  }
243

244
  /**
245
   * Convert the given object to string with each line indented by 4 spaces
246
   * (except the first line).
247
   */
248
  private String toIndentedString(Object o) {
249
    if (o == null) {
×
250
      return "null";
×
251
    }
252
    return o.toString().replace("\n", "\n    ");
×
253
  }
254

255
/**
256
   * Create an instance of AccountHolderBalanceResponse given an JSON string
257
   *
258
   * @param jsonString JSON string
259
   * @return An instance of AccountHolderBalanceResponse
260
   * @throws JsonProcessingException if the JSON string is invalid with respect to AccountHolderBalanceResponse
261
   */
262
  public static AccountHolderBalanceResponse fromJson(String jsonString) throws JsonProcessingException {
263
    return JSON.getMapper().readValue(jsonString, AccountHolderBalanceResponse.class);
×
264
  }
265
/**
266
  * Convert an instance of AccountHolderBalanceResponse to an JSON string
267
  *
268
  * @return JSON string
269
  */
270
  public String toJson() throws JsonProcessingException {
271
    return JSON.getMapper().writeValueAsString(this);
×
272
  }
273
}
274

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

© 2026 Coveralls, Inc