Skip to content

Commit

Permalink
Add missing attribute title
Browse files Browse the repository at this point in the history
  • Loading branch information
gcatanese committed Mar 3, 2025
1 parent 9a2cce1 commit 8dcfa88
Showing 1 changed file with 58 additions and 20 deletions.
78 changes: 58 additions & 20 deletions src/main/java/com/adyen/model/ApiError.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
/*
* Adyen Checkout API
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* The version of the OpenAPI document: 70
* Adyen Java API Library
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
* Copyright (c) 2025 Adyen B.V.
* See the LICENSE file for more info.
*/


package com.adyen.model;

import java.util.*;
Expand All @@ -19,9 +26,9 @@
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.core.JsonProcessingException;


/**
* ServiceError
* Class that defines the API error model returned when an error (401. 403, 422, etc..) is returned by the API
* Based on the RFC-7807 standard
*/
@JsonPropertyOrder({
ApiError.JSON_PROPERTY_INVALID_FIELDS,
Expand All @@ -30,7 +37,8 @@
ApiError.JSON_PROPERTY_ERROR_TYPE,
ApiError.JSON_PROPERTY_MESSAGE,
ApiError.JSON_PROPERTY_PSP_REFERENCE,
ApiError.JSON_PROPERTY_STATUS
ApiError.JSON_PROPERTY_STATUS,
ApiError.JSON_PROPERTY_TITLE
})

public class ApiError {
Expand All @@ -55,6 +63,9 @@ public class ApiError {
public static final String JSON_PROPERTY_STATUS = "status";
private Integer status;

public static final String JSON_PROPERTY_TITLE = "title";
private String title;

public ApiError() {
}

Expand Down Expand Up @@ -188,20 +199,17 @@ public ApiError message(String message) {
@JsonProperty(JSON_PROPERTY_MESSAGE)
@JsonAlias("detail")
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

public String getMessage() {
return message;
}


@JsonProperty(JSON_PROPERTY_MESSAGE)
@JsonAlias("detail")
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMessage(String message) {
this.message = message;
}


public ApiError pspReference(String pspReference) {
this.pspReference = pspReference;
return this;
Expand All @@ -219,14 +227,12 @@ public String getPspReference() {
return pspReference;
}


@JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPspReference(String pspReference) {
this.pspReference = pspReference;
}


public ApiError status(Integer status) {
this.status = status;
return this;
Expand All @@ -239,7 +245,6 @@ public ApiError status(Integer status) {
@ApiModelProperty(value = "The HTTP response status.")
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

public Integer getStatus() {
return status;
}
Expand All @@ -251,6 +256,37 @@ public void setStatus(Integer status) {
this.status = status;
}

/**
* Set title and return the object
* @param title
* @return
*/
public ApiError title(String title) {
this.title = title;
return this;
}

/**
* The human-readable summary of the problem type
* @return status
**/
@ApiModelProperty(value = "The HTTP response status.")
@JsonProperty(JSON_PROPERTY_TITLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getTitle() {
return title;
}

/**
* Set title
* @param title
*/
@JsonProperty(JSON_PROPERTY_TITLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTitle(String title) {
this.title = title;
}

/**
* Return true if this ServiceError object is equal to o.
*/
Expand All @@ -268,25 +304,27 @@ public boolean equals(Object o) {
Objects.equals(this.errorType, apiError.errorType) &&
Objects.equals(this.message, apiError.message) &&
Objects.equals(this.pspReference, apiError.pspReference) &&
Objects.equals(this.status, apiError.status);
Objects.equals(this.status, apiError.status) &&
Objects.equals(this.title, apiError.title);
}

@Override
public int hashCode() {
return Objects.hash(additionalData, errorCode, errorType, message, pspReference, status);
return Objects.hash(additionalData, errorCode, errorType, message, pspReference, status, title);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ServiceError {\n");
sb.append("class ApiError {\n");
sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n");
sb.append(" additionalData: ").append(toIndentedString(additionalData)).append("\n");
sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n");
sb.append(" errorType: ").append(toIndentedString(errorType)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down

0 comments on commit 8dcfa88

Please sign in to comment.