• 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/DetailBalance.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.Amount;
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
 * DetailBalance
36
 */
37
@JsonPropertyOrder({
38
  DetailBalance.JSON_PROPERTY_BALANCE,
39
  DetailBalance.JSON_PROPERTY_ON_HOLD_BALANCE,
40
  DetailBalance.JSON_PROPERTY_PENDING_BALANCE
41
})
42

43
public class DetailBalance {
44
  public static final String JSON_PROPERTY_BALANCE = "balance";
45
  private List<Amount> balance = null;
×
46

47
  public static final String JSON_PROPERTY_ON_HOLD_BALANCE = "onHoldBalance";
48
  private List<Amount> onHoldBalance = null;
×
49

50
  public static final String JSON_PROPERTY_PENDING_BALANCE = "pendingBalance";
51
  private List<Amount> pendingBalance = null;
×
52

53
  public DetailBalance() { 
×
54
  }
×
55

56
  public DetailBalance balance(List<Amount> balance) {
57
    this.balance = balance;
×
58
    return this;
×
59
  }
60

61
  public DetailBalance addBalanceItem(Amount balanceItem) {
62
    if (this.balance == null) {
×
63
      this.balance = new ArrayList<>();
×
64
    }
65
    this.balance.add(balanceItem);
×
66
    return this;
×
67
  }
68

69
   /**
70
   * The list of balances held by the account.
71
   * @return balance
72
  **/
73
  @ApiModelProperty(value = "The list of balances held by the account.")
74
  @JsonProperty(JSON_PROPERTY_BALANCE)
75
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
76

77
  public List<Amount> getBalance() {
78
    return balance;
×
79
  }
80

81

82
  @JsonProperty(JSON_PROPERTY_BALANCE)
83
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
84
  public void setBalance(List<Amount> balance) {
85
    this.balance = balance;
×
86
  }
×
87

88

89
  public DetailBalance onHoldBalance(List<Amount> onHoldBalance) {
90
    this.onHoldBalance = onHoldBalance;
×
91
    return this;
×
92
  }
93

94
  public DetailBalance addOnHoldBalanceItem(Amount onHoldBalanceItem) {
95
    if (this.onHoldBalance == null) {
×
96
      this.onHoldBalance = new ArrayList<>();
×
97
    }
98
    this.onHoldBalance.add(onHoldBalanceItem);
×
99
    return this;
×
100
  }
101

102
   /**
103
   * The list of on hold balances held by the account.
104
   * @return onHoldBalance
105
  **/
106
  @ApiModelProperty(value = "The list of on hold balances held by the account.")
107
  @JsonProperty(JSON_PROPERTY_ON_HOLD_BALANCE)
108
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
109

110
  public List<Amount> getOnHoldBalance() {
111
    return onHoldBalance;
×
112
  }
113

114

115
  @JsonProperty(JSON_PROPERTY_ON_HOLD_BALANCE)
116
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
117
  public void setOnHoldBalance(List<Amount> onHoldBalance) {
118
    this.onHoldBalance = onHoldBalance;
×
119
  }
×
120

121

122
  public DetailBalance pendingBalance(List<Amount> pendingBalance) {
123
    this.pendingBalance = pendingBalance;
×
124
    return this;
×
125
  }
126

127
  public DetailBalance addPendingBalanceItem(Amount pendingBalanceItem) {
128
    if (this.pendingBalance == null) {
×
129
      this.pendingBalance = new ArrayList<>();
×
130
    }
131
    this.pendingBalance.add(pendingBalanceItem);
×
132
    return this;
×
133
  }
134

135
   /**
136
   * The list of pending balances held by the account.
137
   * @return pendingBalance
138
  **/
139
  @ApiModelProperty(value = "The list of pending balances held by the account.")
140
  @JsonProperty(JSON_PROPERTY_PENDING_BALANCE)
141
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
142

143
  public List<Amount> getPendingBalance() {
144
    return pendingBalance;
×
145
  }
146

147

148
  @JsonProperty(JSON_PROPERTY_PENDING_BALANCE)
149
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
150
  public void setPendingBalance(List<Amount> pendingBalance) {
151
    this.pendingBalance = pendingBalance;
×
152
  }
×
153

154

155
  /**
156
   * Return true if this DetailBalance object is equal to o.
157
   */
158
  @Override
159
  public boolean equals(Object o) {
160
    if (this == o) {
×
161
      return true;
×
162
    }
163
    if (o == null || getClass() != o.getClass()) {
×
164
      return false;
×
165
    }
166
    DetailBalance detailBalance = (DetailBalance) o;
×
167
    return Objects.equals(this.balance, detailBalance.balance) &&
×
168
        Objects.equals(this.onHoldBalance, detailBalance.onHoldBalance) &&
×
169
        Objects.equals(this.pendingBalance, detailBalance.pendingBalance);
×
170
  }
171

172
  @Override
173
  public int hashCode() {
174
    return Objects.hash(balance, onHoldBalance, pendingBalance);
×
175
  }
176

177
  @Override
178
  public String toString() {
179
    StringBuilder sb = new StringBuilder();
×
180
    sb.append("class DetailBalance {\n");
×
181
    sb.append("    balance: ").append(toIndentedString(balance)).append("\n");
×
182
    sb.append("    onHoldBalance: ").append(toIndentedString(onHoldBalance)).append("\n");
×
183
    sb.append("    pendingBalance: ").append(toIndentedString(pendingBalance)).append("\n");
×
184
    sb.append("}");
×
185
    return sb.toString();
×
186
  }
187

188
  /**
189
   * Convert the given object to string with each line indented by 4 spaces
190
   * (except the first line).
191
   */
192
  private String toIndentedString(Object o) {
193
    if (o == null) {
×
194
      return "null";
×
195
    }
196
    return o.toString().replace("\n", "\n    ");
×
197
  }
198

199
/**
200
   * Create an instance of DetailBalance given an JSON string
201
   *
202
   * @param jsonString JSON string
203
   * @return An instance of DetailBalance
204
   * @throws JsonProcessingException if the JSON string is invalid with respect to DetailBalance
205
   */
206
  public static DetailBalance fromJson(String jsonString) throws JsonProcessingException {
207
    return JSON.getMapper().readValue(jsonString, DetailBalance.class);
×
208
  }
209
/**
210
  * Convert an instance of DetailBalance to an JSON string
211
  *
212
  * @return JSON string
213
  */
214
  public String toJson() throws JsonProcessingException {
215
    return JSON.getMapper().writeValueAsString(this);
×
216
  }
217
}
218

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