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

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

02 Oct 2023 02:08PM UTC coverage: 12.623%. First build
#2676

push

web-flow
Merge 8c2a459f7 into 9e36e9c01

9362 of 9362 new or added lines in 164 files covered. (100.0%)

11051 of 87544 relevant lines covered (12.62%)

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/Split.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.SplitAmount;
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 com.fasterxml.jackson.annotation.JsonPropertyOrder;
29
import com.fasterxml.jackson.core.JsonProcessingException;
30

31

32
/**
33
 * Split
34
 */
35
@JsonPropertyOrder({
36
  Split.JSON_PROPERTY_ACCOUNT,
37
  Split.JSON_PROPERTY_AMOUNT,
38
  Split.JSON_PROPERTY_DESCRIPTION,
39
  Split.JSON_PROPERTY_REFERENCE,
40
  Split.JSON_PROPERTY_TYPE
41
})
42

43
public class Split {
44
  public static final String JSON_PROPERTY_ACCOUNT = "account";
45
  private String account;
46

47
  public static final String JSON_PROPERTY_AMOUNT = "amount";
48
  private SplitAmount amount;
49

50
  public static final String JSON_PROPERTY_DESCRIPTION = "description";
51
  private String description;
52

53
  public static final String JSON_PROPERTY_REFERENCE = "reference";
54
  private String reference;
55

56
  /**
57
   * The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**.
58
   */
59
  public enum TypeEnum {
×
60
    BALANCEACCOUNT("BalanceAccount"),
×
61
    
62
    COMMISSION("Commission"),
×
63
    
64
    DEFAULT("Default"),
×
65
    
66
    MARKETPLACE("MarketPlace"),
×
67
    
68
    PAYMENTFEE("PaymentFee"),
×
69
    
70
    PAYMENTFEEACQUIRING("PaymentFeeAcquiring"),
×
71
    
72
    PAYMENTFEEADYEN("PaymentFeeAdyen"),
×
73
    
74
    PAYMENTFEEADYENCOMMISSION("PaymentFeeAdyenCommission"),
×
75
    
76
    PAYMENTFEEADYENMARKUP("PaymentFeeAdyenMarkup"),
×
77
    
78
    PAYMENTFEEINTERCHANGE("PaymentFeeInterchange"),
×
79
    
80
    PAYMENTFEESCHEMEFEE("PaymentFeeSchemeFee"),
×
81
    
82
    REMAINDER("Remainder"),
×
83
    
84
    SURCHARGE("Surcharge"),
×
85
    
86
    TIP("Tip"),
×
87
    
88
    VAT("VAT"),
×
89
    
90
    VERIFICATION("Verification");
×
91

92
    private String value;
93

94
    TypeEnum(String value) {
×
95
      this.value = value;
×
96
    }
×
97

98
    @JsonValue
99
    public String getValue() {
100
      return value;
×
101
    }
102

103
    @Override
104
    public String toString() {
105
      return String.valueOf(value);
×
106
    }
107

108
    @JsonCreator
109
    public static TypeEnum fromValue(String value) {
110
      for (TypeEnum b : TypeEnum.values()) {
×
111
        if (b.value.equals(value)) {
×
112
          return b;
×
113
        }
114
      }
115
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
116
    }
117
  }
118

119
  public static final String JSON_PROPERTY_TYPE = "type";
120
  private TypeEnum type;
121

122
  public Split() { 
×
123
  }
×
124

125
  public Split account(String account) {
126
    this.account = account;
×
127
    return this;
×
128
  }
129

130
   /**
131
   * Unique identifier of the account where the split amount should be sent. This is required if `type` is **MarketPlace** or **BalanceAccount**.  
132
   * @return account
133
  **/
134
  @ApiModelProperty(value = "Unique identifier of the account where the split amount should be sent. This is required if `type` is **MarketPlace** or **BalanceAccount**.  ")
135
  @JsonProperty(JSON_PROPERTY_ACCOUNT)
136
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
137

138
  public String getAccount() {
139
    return account;
×
140
  }
141

142

143
  @JsonProperty(JSON_PROPERTY_ACCOUNT)
144
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
145
  public void setAccount(String account) {
146
    this.account = account;
×
147
  }
×
148

149

150
  public Split amount(SplitAmount amount) {
151
    this.amount = amount;
×
152
    return this;
×
153
  }
154

155
   /**
156
   * Get amount
157
   * @return amount
158
  **/
159
  @ApiModelProperty(required = true, value = "")
160
  @JsonProperty(JSON_PROPERTY_AMOUNT)
161
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
162

163
  public SplitAmount getAmount() {
164
    return amount;
×
165
  }
166

167

168
  @JsonProperty(JSON_PROPERTY_AMOUNT)
169
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
170
  public void setAmount(SplitAmount amount) {
171
    this.amount = amount;
×
172
  }
×
173

174

175
  public Split description(String description) {
176
    this.description = description;
×
177
    return this;
×
178
  }
179

180
   /**
181
   * A description of this split.
182
   * @return description
183
  **/
184
  @ApiModelProperty(value = "A description of this split.")
185
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
186
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
187

188
  public String getDescription() {
189
    return description;
×
190
  }
191

192

193
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
194
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
195
  public void setDescription(String description) {
196
    this.description = description;
×
197
  }
×
198

199

200
  public Split reference(String reference) {
201
    this.reference = reference;
×
202
    return this;
×
203
  }
204

205
   /**
206
   * Your reference for the split, which you can use to link the split to other operations such as captures and refunds.  This is required if `type` is **MarketPlace** or **BalanceAccount**. For the other types, we also recommend sending a reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. If the reference is not provided, the split is reported as part of the aggregated [TransferBalance record type](https://docs.adyen.com/reporting/marketpay-payments-accounting-report) in Adyen for Platforms.
207
   * @return reference
208
  **/
209
  @ApiModelProperty(value = "Your reference for the split, which you can use to link the split to other operations such as captures and refunds.  This is required if `type` is **MarketPlace** or **BalanceAccount**. For the other types, we also recommend sending a reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. If the reference is not provided, the split is reported as part of the aggregated [TransferBalance record type](https://docs.adyen.com/reporting/marketpay-payments-accounting-report) in Adyen for Platforms.")
210
  @JsonProperty(JSON_PROPERTY_REFERENCE)
211
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
212

213
  public String getReference() {
214
    return reference;
×
215
  }
216

217

218
  @JsonProperty(JSON_PROPERTY_REFERENCE)
219
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
220
  public void setReference(String reference) {
221
    this.reference = reference;
×
222
  }
×
223

224

225
  public Split type(TypeEnum type) {
226
    this.type = type;
×
227
    return this;
×
228
  }
229

230
   /**
231
   * The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**.
232
   * @return type
233
  **/
234
  @ApiModelProperty(required = true, value = "The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**.")
235
  @JsonProperty(JSON_PROPERTY_TYPE)
236
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
237

238
  public TypeEnum getType() {
239
    return type;
×
240
  }
241

242

243
  @JsonProperty(JSON_PROPERTY_TYPE)
244
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
245
  public void setType(TypeEnum type) {
246
    this.type = type;
×
247
  }
×
248

249

250
  /**
251
   * Return true if this Split object is equal to o.
252
   */
253
  @Override
254
  public boolean equals(Object o) {
255
    if (this == o) {
×
256
      return true;
×
257
    }
258
    if (o == null || getClass() != o.getClass()) {
×
259
      return false;
×
260
    }
261
    Split split = (Split) o;
×
262
    return Objects.equals(this.account, split.account) &&
×
263
        Objects.equals(this.amount, split.amount) &&
×
264
        Objects.equals(this.description, split.description) &&
×
265
        Objects.equals(this.reference, split.reference) &&
×
266
        Objects.equals(this.type, split.type);
×
267
  }
268

269
  @Override
270
  public int hashCode() {
271
    return Objects.hash(account, amount, description, reference, type);
×
272
  }
273

274
  @Override
275
  public String toString() {
276
    StringBuilder sb = new StringBuilder();
×
277
    sb.append("class Split {\n");
×
278
    sb.append("    account: ").append(toIndentedString(account)).append("\n");
×
279
    sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
×
280
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
×
281
    sb.append("    reference: ").append(toIndentedString(reference)).append("\n");
×
282
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
283
    sb.append("}");
×
284
    return sb.toString();
×
285
  }
286

287
  /**
288
   * Convert the given object to string with each line indented by 4 spaces
289
   * (except the first line).
290
   */
291
  private String toIndentedString(Object o) {
292
    if (o == null) {
×
293
      return "null";
×
294
    }
295
    return o.toString().replace("\n", "\n    ");
×
296
  }
297

298
/**
299
   * Create an instance of Split given an JSON string
300
   *
301
   * @param jsonString JSON string
302
   * @return An instance of Split
303
   * @throws JsonProcessingException if the JSON string is invalid with respect to Split
304
   */
305
  public static Split fromJson(String jsonString) throws JsonProcessingException {
306
    return JSON.getMapper().readValue(jsonString, Split.class);
×
307
  }
308
/**
309
  * Convert an instance of Split to an JSON string
310
  *
311
  * @return JSON string
312
  */
313
  public String toJson() throws JsonProcessingException {
314
    return JSON.getMapper().writeValueAsString(this);
×
315
  }
316
}
317

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