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

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

23 Oct 2023 01:52PM UTC coverage: 12.821%. First build
#2748

push

web-flow
Merge c6d37d76d into c99ba89a9

2931 of 2931 new or added lines in 118 files covered. (100.0%)

12345 of 96286 relevant lines covered (12.82%)

0.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

12.77
/src/main/java/com/adyen/model/transfers/PlatformPayment.java
1
/*
2
 * Transfers API
3
 *
4
 * The version of the OpenAPI document: 4
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.transfers;
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
 * PlatformPayment
32
 */
33
@JsonPropertyOrder({
34
  PlatformPayment.JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE,
35
  PlatformPayment.JSON_PROPERTY_MODIFICATION_PSP_REFERENCE,
36
  PlatformPayment.JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE,
37
  PlatformPayment.JSON_PROPERTY_PLATFORM_PAYMENT_TYPE,
38
  PlatformPayment.JSON_PROPERTY_PSP_PAYMENT_REFERENCE,
39
  PlatformPayment.JSON_PROPERTY_TYPE
40
})
41

42
public class PlatformPayment {
43
  public static final String JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE = "modificationMerchantReference";
44
  private String modificationMerchantReference;
45

46
  public static final String JSON_PROPERTY_MODIFICATION_PSP_REFERENCE = "modificationPspReference";
47
  private String modificationPspReference;
48

49
  public static final String JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE = "paymentMerchantReference";
50
  private String paymentMerchantReference;
51

52
  /**
53
   * The type of the related split.
54
   */
55
  public enum PlatformPaymentTypeEnum {
×
56
    ACQUIRINGFEES("AcquiringFees"),
×
57
    
58
    ADYENCOMMISSION("AdyenCommission"),
×
59
    
60
    ADYENFEES("AdyenFees"),
×
61
    
62
    ADYENMARKUP("AdyenMarkup"),
×
63
    
64
    BALANCEACCOUNT("BalanceAccount"),
×
65
    
66
    COMMISSION("Commission"),
×
67
    
68
    DEFAULT("Default"),
×
69
    
70
    INTERCHANGE("Interchange"),
×
71
    
72
    PAYMENTFEE("PaymentFee"),
×
73
    
74
    REMAINDER("Remainder"),
×
75
    
76
    SCHEMEFEE("SchemeFee"),
×
77
    
78
    TOPUP("TopUp"),
×
79
    
80
    VAT("VAT");
×
81

82
    private String value;
83

84
    PlatformPaymentTypeEnum(String value) {
×
85
      this.value = value;
×
86
    }
×
87

88
    @JsonValue
89
    public String getValue() {
90
      return value;
×
91
    }
92

93
    @Override
94
    public String toString() {
95
      return String.valueOf(value);
×
96
    }
97

98
    @JsonCreator
99
    public static PlatformPaymentTypeEnum fromValue(String value) {
100
      for (PlatformPaymentTypeEnum b : PlatformPaymentTypeEnum.values()) {
×
101
        if (b.value.equals(value)) {
×
102
          return b;
×
103
        }
104
      }
105
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
×
106
    }
107
  }
108

109
  public static final String JSON_PROPERTY_PLATFORM_PAYMENT_TYPE = "platformPaymentType";
110
  private PlatformPaymentTypeEnum platformPaymentType;
111

112
  public static final String JSON_PROPERTY_PSP_PAYMENT_REFERENCE = "pspPaymentReference";
113
  private String pspPaymentReference;
114

115
  /**
116
   * **platformPayment**
117
   */
118
  public enum TypeEnum {
1✔
119
    PLATFORMPAYMENT("platformPayment");
1✔
120

121
    private String value;
122

123
    TypeEnum(String value) {
1✔
124
      this.value = value;
1✔
125
    }
1✔
126

127
    @JsonValue
128
    public String getValue() {
129
      return value;
1✔
130
    }
131

132
    @Override
133
    public String toString() {
134
      return String.valueOf(value);
×
135
    }
136

137
    @JsonCreator
138
    public static TypeEnum fromValue(String value) {
139
      for (TypeEnum b : TypeEnum.values()) {
1✔
140
        if (b.value.equals(value)) {
1✔
141
          return b;
×
142
        }
143
      }
144
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
1✔
145
    }
146
  }
147

148
  public static final String JSON_PROPERTY_TYPE = "type";
149
  private TypeEnum type = TypeEnum.PLATFORMPAYMENT;
1✔
150

151
  public PlatformPayment() { 
1✔
152
  }
1✔
153

154
  public PlatformPayment modificationMerchantReference(String modificationMerchantReference) {
155
    this.modificationMerchantReference = modificationMerchantReference;
×
156
    return this;
×
157
  }
158

159
   /**
160
   * The capture's merchant reference included in the transfer.
161
   * @return modificationMerchantReference
162
  **/
163
  @ApiModelProperty(value = "The capture's merchant reference included in the transfer.")
164
  @JsonProperty(JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE)
165
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
166

167
  public String getModificationMerchantReference() {
168
    return modificationMerchantReference;
×
169
  }
170

171

172
  @JsonProperty(JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE)
173
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
174
  public void setModificationMerchantReference(String modificationMerchantReference) {
175
    this.modificationMerchantReference = modificationMerchantReference;
×
176
  }
×
177

178

179
  public PlatformPayment modificationPspReference(String modificationPspReference) {
180
    this.modificationPspReference = modificationPspReference;
×
181
    return this;
×
182
  }
183

184
   /**
185
   * The capture reference included in the transfer.
186
   * @return modificationPspReference
187
  **/
188
  @ApiModelProperty(value = "The capture reference included in the transfer.")
189
  @JsonProperty(JSON_PROPERTY_MODIFICATION_PSP_REFERENCE)
190
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
191

192
  public String getModificationPspReference() {
193
    return modificationPspReference;
×
194
  }
195

196

197
  @JsonProperty(JSON_PROPERTY_MODIFICATION_PSP_REFERENCE)
198
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
199
  public void setModificationPspReference(String modificationPspReference) {
200
    this.modificationPspReference = modificationPspReference;
×
201
  }
×
202

203

204
  public PlatformPayment paymentMerchantReference(String paymentMerchantReference) {
205
    this.paymentMerchantReference = paymentMerchantReference;
×
206
    return this;
×
207
  }
208

209
   /**
210
   * The payment's merchant reference included in the transfer.
211
   * @return paymentMerchantReference
212
  **/
213
  @ApiModelProperty(value = "The payment's merchant reference included in the transfer.")
214
  @JsonProperty(JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE)
215
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
216

217
  public String getPaymentMerchantReference() {
218
    return paymentMerchantReference;
×
219
  }
220

221

222
  @JsonProperty(JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE)
223
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
224
  public void setPaymentMerchantReference(String paymentMerchantReference) {
225
    this.paymentMerchantReference = paymentMerchantReference;
×
226
  }
×
227

228

229
  public PlatformPayment platformPaymentType(PlatformPaymentTypeEnum platformPaymentType) {
230
    this.platformPaymentType = platformPaymentType;
×
231
    return this;
×
232
  }
233

234
   /**
235
   * The type of the related split.
236
   * @return platformPaymentType
237
  **/
238
  @ApiModelProperty(value = "The type of the related split.")
239
  @JsonProperty(JSON_PROPERTY_PLATFORM_PAYMENT_TYPE)
240
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
241

242
  public PlatformPaymentTypeEnum getPlatformPaymentType() {
243
    return platformPaymentType;
×
244
  }
245

246

247
  @JsonProperty(JSON_PROPERTY_PLATFORM_PAYMENT_TYPE)
248
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
249
  public void setPlatformPaymentType(PlatformPaymentTypeEnum platformPaymentType) {
250
    this.platformPaymentType = platformPaymentType;
×
251
  }
×
252

253

254
  public PlatformPayment pspPaymentReference(String pspPaymentReference) {
255
    this.pspPaymentReference = pspPaymentReference;
×
256
    return this;
×
257
  }
258

259
   /**
260
   * The payment reference included in the transfer.
261
   * @return pspPaymentReference
262
  **/
263
  @ApiModelProperty(value = "The payment reference included in the transfer.")
264
  @JsonProperty(JSON_PROPERTY_PSP_PAYMENT_REFERENCE)
265
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
266

267
  public String getPspPaymentReference() {
268
    return pspPaymentReference;
×
269
  }
270

271

272
  @JsonProperty(JSON_PROPERTY_PSP_PAYMENT_REFERENCE)
273
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
274
  public void setPspPaymentReference(String pspPaymentReference) {
275
    this.pspPaymentReference = pspPaymentReference;
×
276
  }
×
277

278

279
  public PlatformPayment type(TypeEnum type) {
280
    this.type = type;
×
281
    return this;
×
282
  }
283

284
   /**
285
   * **platformPayment**
286
   * @return type
287
  **/
288
  @ApiModelProperty(value = "**platformPayment**")
289
  @JsonProperty(JSON_PROPERTY_TYPE)
290
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
291

292
  public TypeEnum getType() {
293
    return type;
×
294
  }
295

296

297
  @JsonProperty(JSON_PROPERTY_TYPE)
298
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
299
  public void setType(TypeEnum type) {
300
    this.type = type;
×
301
  }
×
302

303

304
  /**
305
   * Return true if this PlatformPayment object is equal to o.
306
   */
307
  @Override
308
  public boolean equals(Object o) {
309
    if (this == o) {
×
310
      return true;
×
311
    }
312
    if (o == null || getClass() != o.getClass()) {
×
313
      return false;
×
314
    }
315
    PlatformPayment platformPayment = (PlatformPayment) o;
×
316
    return Objects.equals(this.modificationMerchantReference, platformPayment.modificationMerchantReference) &&
×
317
        Objects.equals(this.modificationPspReference, platformPayment.modificationPspReference) &&
×
318
        Objects.equals(this.paymentMerchantReference, platformPayment.paymentMerchantReference) &&
×
319
        Objects.equals(this.platformPaymentType, platformPayment.platformPaymentType) &&
×
320
        Objects.equals(this.pspPaymentReference, platformPayment.pspPaymentReference) &&
×
321
        Objects.equals(this.type, platformPayment.type);
×
322
  }
323

324
  @Override
325
  public int hashCode() {
326
    return Objects.hash(modificationMerchantReference, modificationPspReference, paymentMerchantReference, platformPaymentType, pspPaymentReference, type);
×
327
  }
328

329
  @Override
330
  public String toString() {
331
    StringBuilder sb = new StringBuilder();
×
332
    sb.append("class PlatformPayment {\n");
×
333
    sb.append("    modificationMerchantReference: ").append(toIndentedString(modificationMerchantReference)).append("\n");
×
334
    sb.append("    modificationPspReference: ").append(toIndentedString(modificationPspReference)).append("\n");
×
335
    sb.append("    paymentMerchantReference: ").append(toIndentedString(paymentMerchantReference)).append("\n");
×
336
    sb.append("    platformPaymentType: ").append(toIndentedString(platformPaymentType)).append("\n");
×
337
    sb.append("    pspPaymentReference: ").append(toIndentedString(pspPaymentReference)).append("\n");
×
338
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
×
339
    sb.append("}");
×
340
    return sb.toString();
×
341
  }
342

343
  /**
344
   * Convert the given object to string with each line indented by 4 spaces
345
   * (except the first line).
346
   */
347
  private String toIndentedString(Object o) {
348
    if (o == null) {
×
349
      return "null";
×
350
    }
351
    return o.toString().replace("\n", "\n    ");
×
352
  }
353

354
/**
355
   * Create an instance of PlatformPayment given an JSON string
356
   *
357
   * @param jsonString JSON string
358
   * @return An instance of PlatformPayment
359
   * @throws JsonProcessingException if the JSON string is invalid with respect to PlatformPayment
360
   */
361
  public static PlatformPayment fromJson(String jsonString) throws JsonProcessingException {
362
    return JSON.getMapper().readValue(jsonString, PlatformPayment.class);
×
363
  }
364
/**
365
  * Convert an instance of PlatformPayment to an JSON string
366
  *
367
  * @return JSON string
368
  */
369
  public String toJson() throws JsonProcessingException {
370
    return JSON.getMapper().writeValueAsString(this);
×
371
  }
372
}
373

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