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

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

16 Oct 2023 09:08AM CUT coverage: 12.568%. First build
#2703

push

web-flow
Merge 5bb3765b7 into fe719ccb3

6014 of 6014 new or added lines in 86 files covered. (100.0%)

11852 of 94302 relevant lines covered (12.57%)

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/marketpaywebhooks/Split.java
1
/*
2
 * Classic Platforms - Notifications
3
 *
4
 * The version of the OpenAPI document: 6
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.marketpaywebhooks;
14

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

30

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

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

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

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

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

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

91
    private String value;
92

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

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

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

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

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

121
  public Split() { 
×
122
  }
×
123

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

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

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

141

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

148

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

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

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

166

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

173

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

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

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

191

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

198

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

204
   /**
205
   * 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.
206
   * @return reference
207
  **/
208
  @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.")
209
  @JsonProperty(JSON_PROPERTY_REFERENCE)
210
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
211

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

216

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

223

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

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

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

241

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

248

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

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

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

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

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

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