• 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/PaymentFailureNotificationContent.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.ErrorFieldType;
20
import com.adyen.model.marketpaywebhooks.Message;
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
 * PaymentFailureNotificationContent
36
 */
37
@JsonPropertyOrder({
38
  PaymentFailureNotificationContent.JSON_PROPERTY_ERROR_FIELDS,
39
  PaymentFailureNotificationContent.JSON_PROPERTY_ERROR_MESSAGE,
40
  PaymentFailureNotificationContent.JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE,
41
  PaymentFailureNotificationContent.JSON_PROPERTY_MODIFICATION_PSP_REFERENCE,
42
  PaymentFailureNotificationContent.JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE,
43
  PaymentFailureNotificationContent.JSON_PROPERTY_PAYMENT_PSP_REFERENCE
44
})
45

46
public class PaymentFailureNotificationContent {
47
  public static final String JSON_PROPERTY_ERROR_FIELDS = "errorFields";
48
  private List<ErrorFieldType> errorFields = null;
×
49

50
  public static final String JSON_PROPERTY_ERROR_MESSAGE = "errorMessage";
51
  private Message errorMessage;
52

53
  public static final String JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE = "modificationMerchantReference";
54
  private String modificationMerchantReference;
55

56
  public static final String JSON_PROPERTY_MODIFICATION_PSP_REFERENCE = "modificationPspReference";
57
  private String modificationPspReference;
58

59
  public static final String JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE = "paymentMerchantReference";
60
  private String paymentMerchantReference;
61

62
  public static final String JSON_PROPERTY_PAYMENT_PSP_REFERENCE = "paymentPspReference";
63
  private String paymentPspReference;
64

65
  public PaymentFailureNotificationContent() { 
×
66
  }
×
67

68
  public PaymentFailureNotificationContent errorFields(List<ErrorFieldType> errorFields) {
69
    this.errorFields = errorFields;
×
70
    return this;
×
71
  }
72

73
  public PaymentFailureNotificationContent addErrorFieldsItem(ErrorFieldType errorFieldsItem) {
74
    if (this.errorFields == null) {
×
75
      this.errorFields = new ArrayList<>();
×
76
    }
77
    this.errorFields.add(errorFieldsItem);
×
78
    return this;
×
79
  }
80

81
   /**
82
   * Missing or invalid fields that caused the payment error.
83
   * @return errorFields
84
  **/
85
  @ApiModelProperty(value = "Missing or invalid fields that caused the payment error.")
86
  @JsonProperty(JSON_PROPERTY_ERROR_FIELDS)
87
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
88

89
  public List<ErrorFieldType> getErrorFields() {
90
    return errorFields;
×
91
  }
92

93

94
  @JsonProperty(JSON_PROPERTY_ERROR_FIELDS)
95
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
96
  public void setErrorFields(List<ErrorFieldType> errorFields) {
97
    this.errorFields = errorFields;
×
98
  }
×
99

100

101
  public PaymentFailureNotificationContent errorMessage(Message errorMessage) {
102
    this.errorMessage = errorMessage;
×
103
    return this;
×
104
  }
105

106
   /**
107
   * Get errorMessage
108
   * @return errorMessage
109
  **/
110
  @ApiModelProperty(value = "")
111
  @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE)
112
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
113

114
  public Message getErrorMessage() {
115
    return errorMessage;
×
116
  }
117

118

119
  @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE)
120
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
121
  public void setErrorMessage(Message errorMessage) {
122
    this.errorMessage = errorMessage;
×
123
  }
×
124

125

126
  public PaymentFailureNotificationContent modificationMerchantReference(String modificationMerchantReference) {
127
    this.modificationMerchantReference = modificationMerchantReference;
×
128
    return this;
×
129
  }
130

131
   /**
132
   * The &#x60;reference&#x60; of the capture or refund.
133
   * @return modificationMerchantReference
134
  **/
135
  @ApiModelProperty(value = "The `reference` of the capture or refund.")
136
  @JsonProperty(JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE)
137
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
138

139
  public String getModificationMerchantReference() {
140
    return modificationMerchantReference;
×
141
  }
142

143

144
  @JsonProperty(JSON_PROPERTY_MODIFICATION_MERCHANT_REFERENCE)
145
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
146
  public void setModificationMerchantReference(String modificationMerchantReference) {
147
    this.modificationMerchantReference = modificationMerchantReference;
×
148
  }
×
149

150

151
  public PaymentFailureNotificationContent modificationPspReference(String modificationPspReference) {
152
    this.modificationPspReference = modificationPspReference;
×
153
    return this;
×
154
  }
155

156
   /**
157
   * The &#x60;pspReference&#x60; of the capture or refund.
158
   * @return modificationPspReference
159
  **/
160
  @ApiModelProperty(value = "The `pspReference` of the capture or refund.")
161
  @JsonProperty(JSON_PROPERTY_MODIFICATION_PSP_REFERENCE)
162
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
163

164
  public String getModificationPspReference() {
165
    return modificationPspReference;
×
166
  }
167

168

169
  @JsonProperty(JSON_PROPERTY_MODIFICATION_PSP_REFERENCE)
170
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
171
  public void setModificationPspReference(String modificationPspReference) {
172
    this.modificationPspReference = modificationPspReference;
×
173
  }
×
174

175

176
  public PaymentFailureNotificationContent paymentMerchantReference(String paymentMerchantReference) {
177
    this.paymentMerchantReference = paymentMerchantReference;
×
178
    return this;
×
179
  }
180

181
   /**
182
   * The &#x60;reference&#x60; of the payment.
183
   * @return paymentMerchantReference
184
  **/
185
  @ApiModelProperty(value = "The `reference` of the payment.")
186
  @JsonProperty(JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE)
187
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
188

189
  public String getPaymentMerchantReference() {
190
    return paymentMerchantReference;
×
191
  }
192

193

194
  @JsonProperty(JSON_PROPERTY_PAYMENT_MERCHANT_REFERENCE)
195
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
196
  public void setPaymentMerchantReference(String paymentMerchantReference) {
197
    this.paymentMerchantReference = paymentMerchantReference;
×
198
  }
×
199

200

201
  public PaymentFailureNotificationContent paymentPspReference(String paymentPspReference) {
202
    this.paymentPspReference = paymentPspReference;
×
203
    return this;
×
204
  }
205

206
   /**
207
   * The &#x60;pspReference&#x60; of the payment.
208
   * @return paymentPspReference
209
  **/
210
  @ApiModelProperty(value = "The `pspReference` of the payment.")
211
  @JsonProperty(JSON_PROPERTY_PAYMENT_PSP_REFERENCE)
212
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
213

214
  public String getPaymentPspReference() {
215
    return paymentPspReference;
×
216
  }
217

218

219
  @JsonProperty(JSON_PROPERTY_PAYMENT_PSP_REFERENCE)
220
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
221
  public void setPaymentPspReference(String paymentPspReference) {
222
    this.paymentPspReference = paymentPspReference;
×
223
  }
×
224

225

226
  /**
227
   * Return true if this PaymentFailureNotificationContent object is equal to o.
228
   */
229
  @Override
230
  public boolean equals(Object o) {
231
    if (this == o) {
×
232
      return true;
×
233
    }
234
    if (o == null || getClass() != o.getClass()) {
×
235
      return false;
×
236
    }
237
    PaymentFailureNotificationContent paymentFailureNotificationContent = (PaymentFailureNotificationContent) o;
×
238
    return Objects.equals(this.errorFields, paymentFailureNotificationContent.errorFields) &&
×
239
        Objects.equals(this.errorMessage, paymentFailureNotificationContent.errorMessage) &&
×
240
        Objects.equals(this.modificationMerchantReference, paymentFailureNotificationContent.modificationMerchantReference) &&
×
241
        Objects.equals(this.modificationPspReference, paymentFailureNotificationContent.modificationPspReference) &&
×
242
        Objects.equals(this.paymentMerchantReference, paymentFailureNotificationContent.paymentMerchantReference) &&
×
243
        Objects.equals(this.paymentPspReference, paymentFailureNotificationContent.paymentPspReference);
×
244
  }
245

246
  @Override
247
  public int hashCode() {
248
    return Objects.hash(errorFields, errorMessage, modificationMerchantReference, modificationPspReference, paymentMerchantReference, paymentPspReference);
×
249
  }
250

251
  @Override
252
  public String toString() {
253
    StringBuilder sb = new StringBuilder();
×
254
    sb.append("class PaymentFailureNotificationContent {\n");
×
255
    sb.append("    errorFields: ").append(toIndentedString(errorFields)).append("\n");
×
256
    sb.append("    errorMessage: ").append(toIndentedString(errorMessage)).append("\n");
×
257
    sb.append("    modificationMerchantReference: ").append(toIndentedString(modificationMerchantReference)).append("\n");
×
258
    sb.append("    modificationPspReference: ").append(toIndentedString(modificationPspReference)).append("\n");
×
259
    sb.append("    paymentMerchantReference: ").append(toIndentedString(paymentMerchantReference)).append("\n");
×
260
    sb.append("    paymentPspReference: ").append(toIndentedString(paymentPspReference)).append("\n");
×
261
    sb.append("}");
×
262
    return sb.toString();
×
263
  }
264

265
  /**
266
   * Convert the given object to string with each line indented by 4 spaces
267
   * (except the first line).
268
   */
269
  private String toIndentedString(Object o) {
270
    if (o == null) {
×
271
      return "null";
×
272
    }
273
    return o.toString().replace("\n", "\n    ");
×
274
  }
275

276
/**
277
   * Create an instance of PaymentFailureNotificationContent given an JSON string
278
   *
279
   * @param jsonString JSON string
280
   * @return An instance of PaymentFailureNotificationContent
281
   * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentFailureNotificationContent
282
   */
283
  public static PaymentFailureNotificationContent fromJson(String jsonString) throws JsonProcessingException {
284
    return JSON.getMapper().readValue(jsonString, PaymentFailureNotificationContent.class);
×
285
  }
286
/**
287
  * Convert an instance of PaymentFailureNotificationContent to an JSON string
288
  *
289
  * @return JSON string
290
  */
291
  public String toJson() throws JsonProcessingException {
292
    return JSON.getMapper().writeValueAsString(this);
×
293
  }
294
}
295

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