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

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

13 Oct 2023 01:23PM UTC coverage: 12.744%. First build
#2694

push

web-flow
Merge a1c66a0d9 into b9e6d393c

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

15.79
/src/main/java/com/adyen/model/disputes/DownloadDefenseDocumentResponse.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.adyen.model.disputes.DisputeServiceResult;
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
 * DownloadDefenseDocumentResponse
34
 */
35
@JsonPropertyOrder({
36
  DownloadDefenseDocumentResponse.JSON_PROPERTY_CONTENT,
37
  DownloadDefenseDocumentResponse.JSON_PROPERTY_CONTENT_TYPE,
38
  DownloadDefenseDocumentResponse.JSON_PROPERTY_DISPUTE_SERVICE_RESULT
39
})
40

41
public class DownloadDefenseDocumentResponse {
42
  public static final String JSON_PROPERTY_CONTENT = "content";
43
  private byte[] content;
44

45
  public static final String JSON_PROPERTY_CONTENT_TYPE = "contentType";
46
  private String contentType;
47

48
  public static final String JSON_PROPERTY_DISPUTE_SERVICE_RESULT = "disputeServiceResult";
49
  private DisputeServiceResult disputeServiceResult;
50

51
  public DownloadDefenseDocumentResponse() { 
1✔
52
  }
1✔
53

54
  public DownloadDefenseDocumentResponse content(byte[] content) {
55
    this.content = content;
×
56
    return this;
×
57
  }
58

59
   /**
60
   * The content of the defense document in Base64 binary format. Must be encoded in the format that is specified in the `contentType` field.
61
   * @return content
62
  **/
63
  @ApiModelProperty(value = "The content of the defense document in Base64 binary format. Must be encoded in the format that is specified in the `contentType` field.")
64
  @JsonProperty(JSON_PROPERTY_CONTENT)
65
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
66

67
  public byte[] getContent() {
68
    return content;
×
69
  }
70

71

72
  @JsonProperty(JSON_PROPERTY_CONTENT)
73
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
74
  public void setContent(byte[] content) {
75
    this.content = content;
×
76
  }
×
77

78

79
  public DownloadDefenseDocumentResponse contentType(String contentType) {
80
    this.contentType = contentType;
×
81
    return this;
×
82
  }
83

84
   /**
85
   * The content type of the dispute defense document.  Possible values:   * **image/jpg**  * **image/jpeg**  * **image/tiff**  * **application/pdf**
86
   * @return contentType
87
  **/
88
  @ApiModelProperty(value = "The content type of the dispute defense document.  Possible values:   * **image/jpg**  * **image/jpeg**  * **image/tiff**  * **application/pdf**")
89
  @JsonProperty(JSON_PROPERTY_CONTENT_TYPE)
90
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
91

92
  public String getContentType() {
93
    return contentType;
×
94
  }
95

96

97
  @JsonProperty(JSON_PROPERTY_CONTENT_TYPE)
98
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
99
  public void setContentType(String contentType) {
100
    this.contentType = contentType;
×
101
  }
×
102

103

104
  public DownloadDefenseDocumentResponse disputeServiceResult(DisputeServiceResult disputeServiceResult) {
105
    this.disputeServiceResult = disputeServiceResult;
×
106
    return this;
×
107
  }
108

109
   /**
110
   * Get disputeServiceResult
111
   * @return disputeServiceResult
112
  **/
113
  @ApiModelProperty(required = true, value = "")
114
  @JsonProperty(JSON_PROPERTY_DISPUTE_SERVICE_RESULT)
115
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
116

117
  public DisputeServiceResult getDisputeServiceResult() {
118
    return disputeServiceResult;
1✔
119
  }
120

121

122
  @JsonProperty(JSON_PROPERTY_DISPUTE_SERVICE_RESULT)
123
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
124
  public void setDisputeServiceResult(DisputeServiceResult disputeServiceResult) {
125
    this.disputeServiceResult = disputeServiceResult;
1✔
126
  }
1✔
127

128

129
  /**
130
   * Return true if this DownloadDefenseDocumentResponse object is equal to o.
131
   */
132
  @Override
133
  public boolean equals(Object o) {
134
    if (this == o) {
×
135
      return true;
×
136
    }
137
    if (o == null || getClass() != o.getClass()) {
×
138
      return false;
×
139
    }
140
    DownloadDefenseDocumentResponse downloadDefenseDocumentResponse = (DownloadDefenseDocumentResponse) o;
×
141
    return Arrays.equals(this.content, downloadDefenseDocumentResponse.content) &&
×
142
        Objects.equals(this.contentType, downloadDefenseDocumentResponse.contentType) &&
×
143
        Objects.equals(this.disputeServiceResult, downloadDefenseDocumentResponse.disputeServiceResult);
×
144
  }
145

146
  @Override
147
  public int hashCode() {
148
    return Objects.hash(Arrays.hashCode(content), contentType, disputeServiceResult);
×
149
  }
150

151
  @Override
152
  public String toString() {
153
    StringBuilder sb = new StringBuilder();
×
154
    sb.append("class DownloadDefenseDocumentResponse {\n");
×
155
    sb.append("    content: ").append(toIndentedString(content)).append("\n");
×
156
    sb.append("    contentType: ").append(toIndentedString(contentType)).append("\n");
×
157
    sb.append("    disputeServiceResult: ").append(toIndentedString(disputeServiceResult)).append("\n");
×
158
    sb.append("}");
×
159
    return sb.toString();
×
160
  }
161

162
  /**
163
   * Convert the given object to string with each line indented by 4 spaces
164
   * (except the first line).
165
   */
166
  private String toIndentedString(Object o) {
167
    if (o == null) {
×
168
      return "null";
×
169
    }
170
    return o.toString().replace("\n", "\n    ");
×
171
  }
172

173
/**
174
   * Create an instance of DownloadDefenseDocumentResponse given an JSON string
175
   *
176
   * @param jsonString JSON string
177
   * @return An instance of DownloadDefenseDocumentResponse
178
   * @throws JsonProcessingException if the JSON string is invalid with respect to DownloadDefenseDocumentResponse
179
   */
180
  public static DownloadDefenseDocumentResponse fromJson(String jsonString) throws JsonProcessingException {
181
    return JSON.getMapper().readValue(jsonString, DownloadDefenseDocumentResponse.class);
1✔
182
  }
183
/**
184
  * Convert an instance of DownloadDefenseDocumentResponse to an JSON string
185
  *
186
  * @return JSON string
187
  */
188
  public String toJson() throws JsonProcessingException {
189
    return JSON.getMapper().writeValueAsString(this);
×
190
  }
191
}
192

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