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

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

18 Sep 2023 12:27PM UTC coverage: 13.146%. First build
#2660

push

web-flow
Merge fdf590561 into ba706cfa8

2480 of 2480 new or added lines in 54 files covered. (100.0%)

10283 of 78224 relevant lines covered (13.15%)

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/configurationwebhooks/Balance.java
1
/*
2
 * Configuration webhooks
3
 *
4
 * The version of the OpenAPI document: 1
5
 * 
6
 *
7
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8
 * https://openapi-generator.tech
9
 * Do not edit the class manually.
10
 */
11

12

13
package com.adyen.model.configurationwebhooks;
14

15
import java.util.Objects;
16
import java.util.Arrays;
17
import java.util.Map;
18
import java.util.HashMap;
19
import com.fasterxml.jackson.annotation.JsonInclude;
20
import com.fasterxml.jackson.annotation.JsonProperty;
21
import com.fasterxml.jackson.annotation.JsonCreator;
22
import com.fasterxml.jackson.annotation.JsonTypeName;
23
import com.fasterxml.jackson.annotation.JsonValue;
24
import io.swagger.annotations.ApiModel;
25
import io.swagger.annotations.ApiModelProperty;
26
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
27
import com.fasterxml.jackson.core.JsonProcessingException;
28

29

30
/**
31
 * Balance
32
 */
33
@JsonPropertyOrder({
34
  Balance.JSON_PROPERTY_AVAILABLE,
35
  Balance.JSON_PROPERTY_BALANCE,
36
  Balance.JSON_PROPERTY_CURRENCY,
37
  Balance.JSON_PROPERTY_PENDING,
38
  Balance.JSON_PROPERTY_RESERVED
39
})
40

41
public class Balance {
42
  public static final String JSON_PROPERTY_AVAILABLE = "available";
43
  private Long available;
44

45
  public static final String JSON_PROPERTY_BALANCE = "balance";
46
  private Long balance;
47

48
  public static final String JSON_PROPERTY_CURRENCY = "currency";
49
  private String currency;
50

51
  public static final String JSON_PROPERTY_PENDING = "pending";
52
  private Long pending;
53

54
  public static final String JSON_PROPERTY_RESERVED = "reserved";
55
  private Long reserved;
56

57
  public Balance() { 
×
58
  }
×
59

60
  public Balance available(Long available) {
61
    this.available = available;
×
62
    return this;
×
63
  }
64

65
   /**
66
   * The remaining amount available for spending.
67
   * @return available
68
  **/
69
  @ApiModelProperty(required = true, value = "The remaining amount available for spending.")
70
  @JsonProperty(JSON_PROPERTY_AVAILABLE)
71
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
72

73
  public Long getAvailable() {
74
    return available;
×
75
  }
76

77

78
  @JsonProperty(JSON_PROPERTY_AVAILABLE)
79
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
80
  public void setAvailable(Long available) {
81
    this.available = available;
×
82
  }
×
83

84

85
  public Balance balance(Long balance) {
86
    this.balance = balance;
×
87
    return this;
×
88
  }
89

90
   /**
91
   * The total amount in the balance.
92
   * @return balance
93
  **/
94
  @ApiModelProperty(required = true, value = "The total amount in the balance.")
95
  @JsonProperty(JSON_PROPERTY_BALANCE)
96
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
97

98
  public Long getBalance() {
99
    return balance;
×
100
  }
101

102

103
  @JsonProperty(JSON_PROPERTY_BALANCE)
104
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
105
  public void setBalance(Long balance) {
106
    this.balance = balance;
×
107
  }
×
108

109

110
  public Balance currency(String currency) {
111
    this.currency = currency;
×
112
    return this;
×
113
  }
114

115
   /**
116
   * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance.
117
   * @return currency
118
  **/
119
  @ApiModelProperty(required = true, value = "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance.")
120
  @JsonProperty(JSON_PROPERTY_CURRENCY)
121
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
122

123
  public String getCurrency() {
124
    return currency;
×
125
  }
126

127

128
  @JsonProperty(JSON_PROPERTY_CURRENCY)
129
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
130
  public void setCurrency(String currency) {
131
    this.currency = currency;
×
132
  }
×
133

134

135
  public Balance pending(Long pending) {
136
    this.pending = pending;
×
137
    return this;
×
138
  }
139

140
   /**
141
   * The amount pending to be paid out but not yet available in the balance.
142
   * @return pending
143
  **/
144
  @ApiModelProperty(value = "The amount pending to be paid out but not yet available in the balance.")
145
  @JsonProperty(JSON_PROPERTY_PENDING)
146
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
147

148
  public Long getPending() {
149
    return pending;
×
150
  }
151

152

153
  @JsonProperty(JSON_PROPERTY_PENDING)
154
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
155
  public void setPending(Long pending) {
156
    this.pending = pending;
×
157
  }
×
158

159

160
  public Balance reserved(Long reserved) {
161
    this.reserved = reserved;
×
162
    return this;
×
163
  }
164

165
   /**
166
   * The amount reserved for payments that have been authorised, but have not been captured yet.
167
   * @return reserved
168
  **/
169
  @ApiModelProperty(required = true, value = "The amount reserved for payments that have been authorised, but have not been captured yet.")
170
  @JsonProperty(JSON_PROPERTY_RESERVED)
171
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
172

173
  public Long getReserved() {
174
    return reserved;
×
175
  }
176

177

178
  @JsonProperty(JSON_PROPERTY_RESERVED)
179
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
180
  public void setReserved(Long reserved) {
181
    this.reserved = reserved;
×
182
  }
×
183

184

185
  /**
186
   * Return true if this Balance object is equal to o.
187
   */
188
  @Override
189
  public boolean equals(Object o) {
190
    if (this == o) {
×
191
      return true;
×
192
    }
193
    if (o == null || getClass() != o.getClass()) {
×
194
      return false;
×
195
    }
196
    Balance balance = (Balance) o;
×
197
    return Objects.equals(this.available, balance.available) &&
×
198
        Objects.equals(this.balance, balance.balance) &&
×
199
        Objects.equals(this.currency, balance.currency) &&
×
200
        Objects.equals(this.pending, balance.pending) &&
×
201
        Objects.equals(this.reserved, balance.reserved);
×
202
  }
203

204
  @Override
205
  public int hashCode() {
206
    return Objects.hash(available, balance, currency, pending, reserved);
×
207
  }
208

209
  @Override
210
  public String toString() {
211
    StringBuilder sb = new StringBuilder();
×
212
    sb.append("class Balance {\n");
×
213
    sb.append("    available: ").append(toIndentedString(available)).append("\n");
×
214
    sb.append("    balance: ").append(toIndentedString(balance)).append("\n");
×
215
    sb.append("    currency: ").append(toIndentedString(currency)).append("\n");
×
216
    sb.append("    pending: ").append(toIndentedString(pending)).append("\n");
×
217
    sb.append("    reserved: ").append(toIndentedString(reserved)).append("\n");
×
218
    sb.append("}");
×
219
    return sb.toString();
×
220
  }
221

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

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

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