All Downloads are FREE. Search and download functionalities are using the official Maven repository.

one.credify.sdk.dto.CredifyApiErrorResponseV1 Maven / Gradle / Ivy

There is a newer version: v0.4.9
Show newest version
package one.credify.sdk.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.*;
import lombok.experimental.FieldDefaults;

import java.util.List;

@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
@FieldDefaults(level = AccessLevel.PRIVATE)
@JsonIgnoreProperties(ignoreUnknown = true)
public class CredifyApiErrorResponseV1 {
    List errors;

    public boolean containsErrorCode(String code) {
        if (errors == null || errors.size() == 0) {
            return false;
        }
        return errors.stream().anyMatch(item -> item.getCode().equals(code));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy