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

com.plaid.client.model.AccountsBalanceGetResponsePaymentRiskAssessment Maven / Gradle / Ivy

There is a newer version: 29.0.0
Show newest version
/*
 * The Plaid API
 * The Plaid REST API. Please see https://plaid.com/docs/api for more details.
 *
 * The version of the OpenAPI document: 2020-09-14_1.565.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.plaid.client.model;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.plaid.client.model.BalancePlusAttributes;
import com.plaid.client.model.BalancePlusRiskLevel;
import com.plaid.client.model.RiskReason;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * Provides a detailed risk assessment for the requested transaction. For this field to be returned, the client must be enrolled in the Balance Plus beta program and the [`payment_details`](http://plaid.com/docs/balance/balance-plus/#accounts-balance-get-request-payment-details) object must have been sent in the request.
 */
@ApiModel(description = "Provides a detailed risk assessment for the requested transaction. For this field to be returned, the client must be enrolled in the Balance Plus beta program and the [`payment_details`](http://plaid.com/docs/balance/balance-plus/#accounts-balance-get-request-payment-details) object must have been sent in the request.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-17T16:42:02.150702Z[Etc/UTC]")
public class AccountsBalanceGetResponsePaymentRiskAssessment {
  public static final String SERIALIZED_NAME_RISK_LEVEL = "risk_level";
  @SerializedName(SERIALIZED_NAME_RISK_LEVEL)
  private BalancePlusRiskLevel riskLevel;

  public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes";
  @SerializedName(SERIALIZED_NAME_ATTRIBUTES)
  private BalancePlusAttributes attributes;

  public static final String SERIALIZED_NAME_SCORE = "score";
  @SerializedName(SERIALIZED_NAME_SCORE)
  private Integer score;

  public static final String SERIALIZED_NAME_BALANCE_LAST_UPDATED = "balance_last_updated";
  @SerializedName(SERIALIZED_NAME_BALANCE_LAST_UPDATED)
  private OffsetDateTime balanceLastUpdated;

  public static final String SERIALIZED_NAME_RISK_REASONS = "risk_reasons";
  @SerializedName(SERIALIZED_NAME_RISK_REASONS)
  private List riskReasons = null;

  public static final String SERIALIZED_NAME_EXCEEDS_BALANCE_THRESHOLD = "exceeds_balance_threshold";
  @SerializedName(SERIALIZED_NAME_EXCEEDS_BALANCE_THRESHOLD)
  private Boolean exceedsBalanceThreshold;


  public AccountsBalanceGetResponsePaymentRiskAssessment riskLevel(BalancePlusRiskLevel riskLevel) {
    
    this.riskLevel = riskLevel;
    return this;
  }

   /**
   * Get riskLevel
   * @return riskLevel
  **/
  @ApiModelProperty(required = true, value = "")

  public BalancePlusRiskLevel getRiskLevel() {
    return riskLevel;
  }


  public void setRiskLevel(BalancePlusRiskLevel riskLevel) {
    this.riskLevel = riskLevel;
  }


  public AccountsBalanceGetResponsePaymentRiskAssessment attributes(BalancePlusAttributes attributes) {
    
    this.attributes = attributes;
    return this;
  }

   /**
   * Get attributes
   * @return attributes
  **/
  @ApiModelProperty(required = true, value = "")

  public BalancePlusAttributes getAttributes() {
    return attributes;
  }


  public void setAttributes(BalancePlusAttributes attributes) {
    this.attributes = attributes;
  }


  public AccountsBalanceGetResponsePaymentRiskAssessment score(Integer score) {
    
    this.score = score;
    return this;
  }

   /**
   * A risk score ranging from 1-99, reflecting the likelihood of ACH debit return. A higher score indicates a greater risk of return, often due to overdrawn accounts or account ineligibility to receive ACH transactions. Typical return codes include \"R01\", \"R02\", \"R03\", \"R04\", \"R06\", \"R08\", \"R09\", \"R13\", \"R16\", \"R17\", \"R20\", \"R23\", etc., with a turnaround of 2 banking days.
   * minimum: 1
   * maximum: 99
   * @return score
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "A risk score ranging from 1-99, reflecting the likelihood of ACH debit return. A higher score indicates a greater risk of return, often due to overdrawn accounts or account ineligibility to receive ACH transactions. Typical return codes include \"R01\", \"R02\", \"R03\", \"R04\", \"R06\", \"R08\", \"R09\", \"R13\", \"R16\", \"R17\", \"R20\", \"R23\", etc., with a turnaround of 2 banking days.")

  public Integer getScore() {
    return score;
  }


  public void setScore(Integer score) {
    this.score = score;
  }


  public AccountsBalanceGetResponsePaymentRiskAssessment balanceLastUpdated(OffsetDateTime balanceLastUpdated) {
    
    this.balanceLastUpdated = balanceLastUpdated;
    return this;
  }

   /**
   * Timestamp of the last successful balance update, in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
   * @return balanceLastUpdated
  **/
  @ApiModelProperty(required = true, value = "Timestamp of the last successful balance update, in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.")

  public OffsetDateTime getBalanceLastUpdated() {
    return balanceLastUpdated;
  }


  public void setBalanceLastUpdated(OffsetDateTime balanceLastUpdated) {
    this.balanceLastUpdated = balanceLastUpdated;
  }


  public AccountsBalanceGetResponsePaymentRiskAssessment riskReasons(List riskReasons) {
    
    this.riskReasons = riskReasons;
    return this;
  }

  public AccountsBalanceGetResponsePaymentRiskAssessment addRiskReasonsItem(RiskReason riskReasonsItem) {
    if (this.riskReasons == null) {
      this.riskReasons = new ArrayList<>();
    }
    this.riskReasons.add(riskReasonsItem);
    return this;
  }

   /**
   * An array of objects, each representing a specific reason contributing to the risk assessment of an ACH transaction. This field is only supplied for transactions classified as `HIGH`, `MEDIUM-HIGH`, or `MEDIUM` risk.
   * @return riskReasons
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "An array of objects, each representing a specific reason contributing to the risk assessment of an ACH transaction. This field is only supplied for transactions classified as `HIGH`, `MEDIUM-HIGH`, or `MEDIUM` risk.")

  public List getRiskReasons() {
    return riskReasons;
  }


  public void setRiskReasons(List riskReasons) {
    this.riskReasons = riskReasons;
  }


  public AccountsBalanceGetResponsePaymentRiskAssessment exceedsBalanceThreshold(Boolean exceedsBalanceThreshold) {
    
    this.exceedsBalanceThreshold = exceedsBalanceThreshold;
    return this;
  }

   /**
   * Whether the proposed transaction exceeds the balance threshold set in the request. `true` indicates higher risk; `false` indicates lower risk. If the `amount` multiplied by the `balance_threshold_percentage` (as a percentage) exceeds the balance in the account, then `exceeds_balance_threshold` will be true, otherwise, it will be false. For example, if the `amount` is 200 and the `balance_threshold_percentage` is 90, then the account balance must be at least 180 for `exceeds_balance_threshold` to be false.   By default, the available balance will be used for this calculation; if it cannot be obtained, the current balance will be used.   This field is particularly useful for customers using indirect Items and who do not have direct access to raw balance data.
   * @return exceedsBalanceThreshold
  **/
  @ApiModelProperty(required = true, value = "Whether the proposed transaction exceeds the balance threshold set in the request. `true` indicates higher risk; `false` indicates lower risk. If the `amount` multiplied by the `balance_threshold_percentage` (as a percentage) exceeds the balance in the account, then `exceeds_balance_threshold` will be true, otherwise, it will be false. For example, if the `amount` is 200 and the `balance_threshold_percentage` is 90, then the account balance must be at least 180 for `exceeds_balance_threshold` to be false.   By default, the available balance will be used for this calculation; if it cannot be obtained, the current balance will be used.   This field is particularly useful for customers using indirect Items and who do not have direct access to raw balance data.")

  public Boolean getExceedsBalanceThreshold() {
    return exceedsBalanceThreshold;
  }


  public void setExceedsBalanceThreshold(Boolean exceedsBalanceThreshold) {
    this.exceedsBalanceThreshold = exceedsBalanceThreshold;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AccountsBalanceGetResponsePaymentRiskAssessment accountsBalanceGetResponsePaymentRiskAssessment = (AccountsBalanceGetResponsePaymentRiskAssessment) o;
    return Objects.equals(this.riskLevel, accountsBalanceGetResponsePaymentRiskAssessment.riskLevel) &&
        Objects.equals(this.attributes, accountsBalanceGetResponsePaymentRiskAssessment.attributes) &&
        Objects.equals(this.score, accountsBalanceGetResponsePaymentRiskAssessment.score) &&
        Objects.equals(this.balanceLastUpdated, accountsBalanceGetResponsePaymentRiskAssessment.balanceLastUpdated) &&
        Objects.equals(this.riskReasons, accountsBalanceGetResponsePaymentRiskAssessment.riskReasons) &&
        Objects.equals(this.exceedsBalanceThreshold, accountsBalanceGetResponsePaymentRiskAssessment.exceedsBalanceThreshold);
  }

  @Override
  public int hashCode() {
    return Objects.hash(riskLevel, attributes, score, balanceLastUpdated, riskReasons, exceedsBalanceThreshold);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class AccountsBalanceGetResponsePaymentRiskAssessment {\n");
    sb.append("    riskLevel: ").append(toIndentedString(riskLevel)).append("\n");
    sb.append("    attributes: ").append(toIndentedString(attributes)).append("\n");
    sb.append("    score: ").append(toIndentedString(score)).append("\n");
    sb.append("    balanceLastUpdated: ").append(toIndentedString(balanceLastUpdated)).append("\n");
    sb.append("    riskReasons: ").append(toIndentedString(riskReasons)).append("\n");
    sb.append("    exceedsBalanceThreshold: ").append(toIndentedString(exceedsBalanceThreshold)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy