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

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

16 Oct 2023 09:23AM UTC coverage: 12.568%. First build
#2707

push

web-flow
Merge d6cc1d707 into b9e6d393c

6758 of 6758 new or added lines in 106 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

31.71
/src/main/java/com/adyen/model/disputes/SupplyDefenseDocumentRequest.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.DefenseDocument;
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
 * SupplyDefenseDocumentRequest
36
 */
37
@JsonPropertyOrder({
38
  SupplyDefenseDocumentRequest.JSON_PROPERTY_DEFENSE_DOCUMENTS,
39
  SupplyDefenseDocumentRequest.JSON_PROPERTY_DISPUTE_PSP_REFERENCE,
40
  SupplyDefenseDocumentRequest.JSON_PROPERTY_MERCHANT_ACCOUNT_CODE
41
})
42

43
public class SupplyDefenseDocumentRequest {
44
  public static final String JSON_PROPERTY_DEFENSE_DOCUMENTS = "defenseDocuments";
45
  private List<DefenseDocument> defenseDocuments = new ArrayList<>();
1✔
46

47
  public static final String JSON_PROPERTY_DISPUTE_PSP_REFERENCE = "disputePspReference";
48
  private String disputePspReference;
49

50
  public static final String JSON_PROPERTY_MERCHANT_ACCOUNT_CODE = "merchantAccountCode";
51
  private String merchantAccountCode;
52

53
  public SupplyDefenseDocumentRequest() { 
1✔
54
  }
1✔
55

56
  public SupplyDefenseDocumentRequest defenseDocuments(List<DefenseDocument> defenseDocuments) {
57
    this.defenseDocuments = defenseDocuments;
×
58
    return this;
×
59
  }
60

61
  public SupplyDefenseDocumentRequest addDefenseDocumentsItem(DefenseDocument defenseDocumentsItem) {
62
    this.defenseDocuments.add(defenseDocumentsItem);
×
63
    return this;
×
64
  }
65

66
   /**
67
   * An array containing a list of the defense documents.
68
   * @return defenseDocuments
69
  **/
70
  @ApiModelProperty(required = true, value = "An array containing a list of the defense documents.")
71
  @JsonProperty(JSON_PROPERTY_DEFENSE_DOCUMENTS)
72
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
73

74
  public List<DefenseDocument> getDefenseDocuments() {
75
    return defenseDocuments;
1✔
76
  }
77

78

79
  @JsonProperty(JSON_PROPERTY_DEFENSE_DOCUMENTS)
80
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
81
  public void setDefenseDocuments(List<DefenseDocument> defenseDocuments) {
82
    this.defenseDocuments = defenseDocuments;
1✔
83
  }
1✔
84

85

86
  public SupplyDefenseDocumentRequest disputePspReference(String disputePspReference) {
87
    this.disputePspReference = disputePspReference;
×
88
    return this;
×
89
  }
90

91
   /**
92
   * The PSP reference assigned to the dispute.
93
   * @return disputePspReference
94
  **/
95
  @ApiModelProperty(required = true, value = "The PSP reference assigned to the dispute.")
96
  @JsonProperty(JSON_PROPERTY_DISPUTE_PSP_REFERENCE)
97
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
98

99
  public String getDisputePspReference() {
100
    return disputePspReference;
1✔
101
  }
102

103

104
  @JsonProperty(JSON_PROPERTY_DISPUTE_PSP_REFERENCE)
105
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
106
  public void setDisputePspReference(String disputePspReference) {
107
    this.disputePspReference = disputePspReference;
1✔
108
  }
1✔
109

110

111
  public SupplyDefenseDocumentRequest merchantAccountCode(String merchantAccountCode) {
112
    this.merchantAccountCode = merchantAccountCode;
×
113
    return this;
×
114
  }
115

116
   /**
117
   * The merchant account identifier, for which you want to process the dispute transaction.
118
   * @return merchantAccountCode
119
  **/
120
  @ApiModelProperty(required = true, value = "The merchant account identifier, for which you want to process the dispute transaction.")
121
  @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE)
122
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
123

124
  public String getMerchantAccountCode() {
125
    return merchantAccountCode;
1✔
126
  }
127

128

129
  @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE)
130
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
131
  public void setMerchantAccountCode(String merchantAccountCode) {
132
    this.merchantAccountCode = merchantAccountCode;
1✔
133
  }
1✔
134

135

136
  /**
137
   * Return true if this SupplyDefenseDocumentRequest object is equal to o.
138
   */
139
  @Override
140
  public boolean equals(Object o) {
141
    if (this == o) {
×
142
      return true;
×
143
    }
144
    if (o == null || getClass() != o.getClass()) {
×
145
      return false;
×
146
    }
147
    SupplyDefenseDocumentRequest supplyDefenseDocumentRequest = (SupplyDefenseDocumentRequest) o;
×
148
    return Objects.equals(this.defenseDocuments, supplyDefenseDocumentRequest.defenseDocuments) &&
×
149
        Objects.equals(this.disputePspReference, supplyDefenseDocumentRequest.disputePspReference) &&
×
150
        Objects.equals(this.merchantAccountCode, supplyDefenseDocumentRequest.merchantAccountCode);
×
151
  }
152

153
  @Override
154
  public int hashCode() {
155
    return Objects.hash(defenseDocuments, disputePspReference, merchantAccountCode);
×
156
  }
157

158
  @Override
159
  public String toString() {
160
    StringBuilder sb = new StringBuilder();
×
161
    sb.append("class SupplyDefenseDocumentRequest {\n");
×
162
    sb.append("    defenseDocuments: ").append(toIndentedString(defenseDocuments)).append("\n");
×
163
    sb.append("    disputePspReference: ").append(toIndentedString(disputePspReference)).append("\n");
×
164
    sb.append("    merchantAccountCode: ").append(toIndentedString(merchantAccountCode)).append("\n");
×
165
    sb.append("}");
×
166
    return sb.toString();
×
167
  }
168

169
  /**
170
   * Convert the given object to string with each line indented by 4 spaces
171
   * (except the first line).
172
   */
173
  private String toIndentedString(Object o) {
174
    if (o == null) {
×
175
      return "null";
×
176
    }
177
    return o.toString().replace("\n", "\n    ");
×
178
  }
179

180
/**
181
   * Create an instance of SupplyDefenseDocumentRequest given an JSON string
182
   *
183
   * @param jsonString JSON string
184
   * @return An instance of SupplyDefenseDocumentRequest
185
   * @throws JsonProcessingException if the JSON string is invalid with respect to SupplyDefenseDocumentRequest
186
   */
187
  public static SupplyDefenseDocumentRequest fromJson(String jsonString) throws JsonProcessingException {
188
    return JSON.getMapper().readValue(jsonString, SupplyDefenseDocumentRequest.class);
×
189
  }
190
/**
191
  * Convert an instance of SupplyDefenseDocumentRequest to an JSON string
192
  *
193
  * @return JSON string
194
  */
195
  public String toJson() throws JsonProcessingException {
196
    return JSON.getMapper().writeValueAsString(this);
1✔
197
  }
198
}
199

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