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

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

11 Oct 2023 10:00AM UTC coverage: 12.744%. First build
#2685

push

web-flow
Merge d19ee818b into 65ca8b246

744 of 744 new or added lines in 20 files covered. (100.0%)

11251 of 88288 relevant lines covered (12.74%)

0.13 hits per line

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

16.13
/src/main/java/com/adyen/model/disputes/DisputeServiceResult.java
1
/*
2
 * Disputes API
3
 * You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes.  ## Authentication Each request to the Disputes API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example:  ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_API_key\" \\ ... ``` Note that 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 Disputes 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://ca-test.adyen.com/ca/services/DisputeService/v30/defendDispute ```
4
 *
5
 * The version of the OpenAPI document: 30
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.disputes;
15

16
import java.util.Objects;
17
import java.util.Arrays;
18
import java.util.Map;
19
import java.util.HashMap;
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
 * DisputeServiceResult
33
 */
34
@JsonPropertyOrder({
35
  DisputeServiceResult.JSON_PROPERTY_ERROR_MESSAGE,
36
  DisputeServiceResult.JSON_PROPERTY_SUCCESS
37
})
38

39
public class DisputeServiceResult {
40
  public static final String JSON_PROPERTY_ERROR_MESSAGE = "errorMessage";
41
  private String errorMessage;
42

43
  public static final String JSON_PROPERTY_SUCCESS = "success";
44
  private Boolean success;
45

46
  public DisputeServiceResult() { 
1✔
47
  }
1✔
48

49
  public DisputeServiceResult errorMessage(String errorMessage) {
50
    this.errorMessage = errorMessage;
×
51
    return this;
×
52
  }
53

54
   /**
55
   * The general error message.
56
   * @return errorMessage
57
  **/
58
  @ApiModelProperty(value = "The general error message.")
59
  @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE)
60
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
61

62
  public String getErrorMessage() {
63
    return errorMessage;
×
64
  }
65

66

67
  @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE)
68
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
69
  public void setErrorMessage(String errorMessage) {
70
    this.errorMessage = errorMessage;
×
71
  }
×
72

73

74
  public DisputeServiceResult success(Boolean success) {
75
    this.success = success;
×
76
    return this;
×
77
  }
78

79
   /**
80
   * Indicates whether the request succeeded.
81
   * @return success
82
  **/
83
  @ApiModelProperty(required = true, value = "Indicates whether the request succeeded.")
84
  @JsonProperty(JSON_PROPERTY_SUCCESS)
85
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
86

87
  public Boolean getSuccess() {
88
    return success;
1✔
89
  }
90

91

92
  @JsonProperty(JSON_PROPERTY_SUCCESS)
93
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
94
  public void setSuccess(Boolean success) {
95
    this.success = success;
1✔
96
  }
1✔
97

98

99
  /**
100
   * Return true if this DisputeServiceResult object is equal to o.
101
   */
102
  @Override
103
  public boolean equals(Object o) {
104
    if (this == o) {
×
105
      return true;
×
106
    }
107
    if (o == null || getClass() != o.getClass()) {
×
108
      return false;
×
109
    }
110
    DisputeServiceResult disputeServiceResult = (DisputeServiceResult) o;
×
111
    return Objects.equals(this.errorMessage, disputeServiceResult.errorMessage) &&
×
112
        Objects.equals(this.success, disputeServiceResult.success);
×
113
  }
114

115
  @Override
116
  public int hashCode() {
117
    return Objects.hash(errorMessage, success);
×
118
  }
119

120
  @Override
121
  public String toString() {
122
    StringBuilder sb = new StringBuilder();
×
123
    sb.append("class DisputeServiceResult {\n");
×
124
    sb.append("    errorMessage: ").append(toIndentedString(errorMessage)).append("\n");
×
125
    sb.append("    success: ").append(toIndentedString(success)).append("\n");
×
126
    sb.append("}");
×
127
    return sb.toString();
×
128
  }
129

130
  /**
131
   * Convert the given object to string with each line indented by 4 spaces
132
   * (except the first line).
133
   */
134
  private String toIndentedString(Object o) {
135
    if (o == null) {
×
136
      return "null";
×
137
    }
138
    return o.toString().replace("\n", "\n    ");
×
139
  }
140

141
/**
142
   * Create an instance of DisputeServiceResult given an JSON string
143
   *
144
   * @param jsonString JSON string
145
   * @return An instance of DisputeServiceResult
146
   * @throws JsonProcessingException if the JSON string is invalid with respect to DisputeServiceResult
147
   */
148
  public static DisputeServiceResult fromJson(String jsonString) throws JsonProcessingException {
149
    return JSON.getMapper().readValue(jsonString, DisputeServiceResult.class);
×
150
  }
151
/**
152
  * Convert an instance of DisputeServiceResult to an JSON string
153
  *
154
  * @return JSON string
155
  */
156
  public String toJson() throws JsonProcessingException {
157
    return JSON.getMapper().writeValueAsString(this);
×
158
  }
159
}
160

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