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

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

16 Oct 2023 09:08AM UTC coverage: 12.744%. First build
#2700

push

web-flow
Merge 5a09e72da 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

28.95
/src/main/java/com/adyen/model/disputes/DefenseDocumentType.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
 * DefenseDocumentType
33
 */
34
@JsonPropertyOrder({
35
  DefenseDocumentType.JSON_PROPERTY_AVAILABLE,
36
  DefenseDocumentType.JSON_PROPERTY_DEFENSE_DOCUMENT_TYPE_CODE,
37
  DefenseDocumentType.JSON_PROPERTY_REQUIREMENT_LEVEL
38
})
39

40
public class DefenseDocumentType {
41
  public static final String JSON_PROPERTY_AVAILABLE = "available";
42
  private Boolean available;
43

44
  public static final String JSON_PROPERTY_DEFENSE_DOCUMENT_TYPE_CODE = "defenseDocumentTypeCode";
45
  private String defenseDocumentTypeCode;
46

47
  public static final String JSON_PROPERTY_REQUIREMENT_LEVEL = "requirementLevel";
48
  private String requirementLevel;
49

50
  public DefenseDocumentType() { 
1✔
51
  }
1✔
52

53
  public DefenseDocumentType available(Boolean available) {
54
    this.available = available;
×
55
    return this;
×
56
  }
57

58
   /**
59
   * When **true**, you've successfully uploaded this type of defense document. When **false**, you haven't uploaded this defense document type.
60
   * @return available
61
  **/
62
  @ApiModelProperty(required = true, value = "When **true**, you've successfully uploaded this type of defense document. When **false**, you haven't uploaded this defense document type.")
63
  @JsonProperty(JSON_PROPERTY_AVAILABLE)
64
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
65

66
  public Boolean getAvailable() {
67
    return available;
1✔
68
  }
69

70

71
  @JsonProperty(JSON_PROPERTY_AVAILABLE)
72
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
73
  public void setAvailable(Boolean available) {
74
    this.available = available;
1✔
75
  }
1✔
76

77

78
  public DefenseDocumentType defenseDocumentTypeCode(String defenseDocumentTypeCode) {
79
    this.defenseDocumentTypeCode = defenseDocumentTypeCode;
×
80
    return this;
×
81
  }
82

83
   /**
84
   * The document type code of the defense document.
85
   * @return defenseDocumentTypeCode
86
  **/
87
  @ApiModelProperty(required = true, value = "The document type code of the defense document.")
88
  @JsonProperty(JSON_PROPERTY_DEFENSE_DOCUMENT_TYPE_CODE)
89
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
90

91
  public String getDefenseDocumentTypeCode() {
92
    return defenseDocumentTypeCode;
1✔
93
  }
94

95

96
  @JsonProperty(JSON_PROPERTY_DEFENSE_DOCUMENT_TYPE_CODE)
97
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
98
  public void setDefenseDocumentTypeCode(String defenseDocumentTypeCode) {
99
    this.defenseDocumentTypeCode = defenseDocumentTypeCode;
1✔
100
  }
1✔
101

102

103
  public DefenseDocumentType requirementLevel(String requirementLevel) {
104
    this.requirementLevel = requirementLevel;
×
105
    return this;
×
106
  }
107

108
   /**
109
   * Indicates to what extent the defense document is required in the defense process.  Possible values:   * **Required**: You must supply the document.   * **OneOrMore**: You must supply at least one of the documents with this label.  * **Optional**: You can choose to supply the document.  * **AlternativeRequired**: You must supply a generic defense document. To enable this functionality, contact our Support Team. When enabled, you can supply a generic defense document for all schemes.
110
   * @return requirementLevel
111
  **/
112
  @ApiModelProperty(required = true, value = "Indicates to what extent the defense document is required in the defense process.  Possible values:   * **Required**: You must supply the document.   * **OneOrMore**: You must supply at least one of the documents with this label.  * **Optional**: You can choose to supply the document.  * **AlternativeRequired**: You must supply a generic defense document. To enable this functionality, contact our Support Team. When enabled, you can supply a generic defense document for all schemes.")
113
  @JsonProperty(JSON_PROPERTY_REQUIREMENT_LEVEL)
114
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
115

116
  public String getRequirementLevel() {
117
    return requirementLevel;
1✔
118
  }
119

120

121
  @JsonProperty(JSON_PROPERTY_REQUIREMENT_LEVEL)
122
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
123
  public void setRequirementLevel(String requirementLevel) {
124
    this.requirementLevel = requirementLevel;
1✔
125
  }
1✔
126

127

128
  /**
129
   * Return true if this DefenseDocumentType object is equal to o.
130
   */
131
  @Override
132
  public boolean equals(Object o) {
133
    if (this == o) {
×
134
      return true;
×
135
    }
136
    if (o == null || getClass() != o.getClass()) {
×
137
      return false;
×
138
    }
139
    DefenseDocumentType defenseDocumentType = (DefenseDocumentType) o;
×
140
    return Objects.equals(this.available, defenseDocumentType.available) &&
×
141
        Objects.equals(this.defenseDocumentTypeCode, defenseDocumentType.defenseDocumentTypeCode) &&
×
142
        Objects.equals(this.requirementLevel, defenseDocumentType.requirementLevel);
×
143
  }
144

145
  @Override
146
  public int hashCode() {
147
    return Objects.hash(available, defenseDocumentTypeCode, requirementLevel);
×
148
  }
149

150
  @Override
151
  public String toString() {
152
    StringBuilder sb = new StringBuilder();
×
153
    sb.append("class DefenseDocumentType {\n");
×
154
    sb.append("    available: ").append(toIndentedString(available)).append("\n");
×
155
    sb.append("    defenseDocumentTypeCode: ").append(toIndentedString(defenseDocumentTypeCode)).append("\n");
×
156
    sb.append("    requirementLevel: ").append(toIndentedString(requirementLevel)).append("\n");
×
157
    sb.append("}");
×
158
    return sb.toString();
×
159
  }
160

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

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

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