|
| 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 | + * AcceptDisputeRequest |
| 33 | + */ |
| 34 | +@JsonPropertyOrder({ |
| 35 | + AcceptDisputeRequest.JSON_PROPERTY_DISPUTE_PSP_REFERENCE, |
| 36 | + AcceptDisputeRequest.JSON_PROPERTY_MERCHANT_ACCOUNT_CODE |
| 37 | +}) |
| 38 | + |
| 39 | +public class AcceptDisputeRequest { |
| 40 | + public static final String JSON_PROPERTY_DISPUTE_PSP_REFERENCE = "disputePspReference"; |
| 41 | + private String disputePspReference; |
| 42 | + |
| 43 | + public static final String JSON_PROPERTY_MERCHANT_ACCOUNT_CODE = "merchantAccountCode"; |
| 44 | + private String merchantAccountCode; |
| 45 | + |
| 46 | + public AcceptDisputeRequest() { |
| 47 | + } |
| 48 | + |
| 49 | + public AcceptDisputeRequest disputePspReference(String disputePspReference) { |
| 50 | + this.disputePspReference = disputePspReference; |
| 51 | + return this; |
| 52 | + } |
| 53 | + |
| 54 | + /** |
| 55 | + * The PSP reference assigned to the dispute. |
| 56 | + * @return disputePspReference |
| 57 | + **/ |
| 58 | + @ApiModelProperty(required = true, value = "The PSP reference assigned to the dispute.") |
| 59 | + @JsonProperty(JSON_PROPERTY_DISPUTE_PSP_REFERENCE) |
| 60 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 61 | + |
| 62 | + public String getDisputePspReference() { |
| 63 | + return disputePspReference; |
| 64 | + } |
| 65 | + |
| 66 | + |
| 67 | + @JsonProperty(JSON_PROPERTY_DISPUTE_PSP_REFERENCE) |
| 68 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 69 | + public void setDisputePspReference(String disputePspReference) { |
| 70 | + this.disputePspReference = disputePspReference; |
| 71 | + } |
| 72 | + |
| 73 | + |
| 74 | + public AcceptDisputeRequest merchantAccountCode(String merchantAccountCode) { |
| 75 | + this.merchantAccountCode = merchantAccountCode; |
| 76 | + return this; |
| 77 | + } |
| 78 | + |
| 79 | + /** |
| 80 | + * The merchant account identifier, for which you want to process the dispute transaction. |
| 81 | + * @return merchantAccountCode |
| 82 | + **/ |
| 83 | + @ApiModelProperty(required = true, value = "The merchant account identifier, for which you want to process the dispute transaction.") |
| 84 | + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE) |
| 85 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 86 | + |
| 87 | + public String getMerchantAccountCode() { |
| 88 | + return merchantAccountCode; |
| 89 | + } |
| 90 | + |
| 91 | + |
| 92 | + @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT_CODE) |
| 93 | + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) |
| 94 | + public void setMerchantAccountCode(String merchantAccountCode) { |
| 95 | + this.merchantAccountCode = merchantAccountCode; |
| 96 | + } |
| 97 | + |
| 98 | + |
| 99 | + /** |
| 100 | + * Return true if this AcceptDisputeRequest 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 | + AcceptDisputeRequest acceptDisputeRequest = (AcceptDisputeRequest) o; |
| 111 | + return Objects.equals(this.disputePspReference, acceptDisputeRequest.disputePspReference) && |
| 112 | + Objects.equals(this.merchantAccountCode, acceptDisputeRequest.merchantAccountCode); |
| 113 | + } |
| 114 | + |
| 115 | + @Override |
| 116 | + public int hashCode() { |
| 117 | + return Objects.hash(disputePspReference, merchantAccountCode); |
| 118 | + } |
| 119 | + |
| 120 | + @Override |
| 121 | + public String toString() { |
| 122 | + StringBuilder sb = new StringBuilder(); |
| 123 | + sb.append("class AcceptDisputeRequest {\n"); |
| 124 | + sb.append(" disputePspReference: ").append(toIndentedString(disputePspReference)).append("\n"); |
| 125 | + sb.append(" merchantAccountCode: ").append(toIndentedString(merchantAccountCode)).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 AcceptDisputeRequest given an JSON string |
| 143 | + * |
| 144 | + * @param jsonString JSON string |
| 145 | + * @return An instance of AcceptDisputeRequest |
| 146 | + * @throws JsonProcessingException if the JSON string is invalid with respect to AcceptDisputeRequest |
| 147 | + */ |
| 148 | + public static AcceptDisputeRequest fromJson(String jsonString) throws JsonProcessingException { |
| 149 | + return JSON.getMapper().readValue(jsonString, AcceptDisputeRequest.class); |
| 150 | + } |
| 151 | +/** |
| 152 | + * Convert an instance of AcceptDisputeRequest 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 | + |
0 commit comments