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

com.mindee.product.fr.bankaccountdetails.BankAccountDetailsV1Document Maven / Gradle / Ivy

The newest version!
package com.mindee.product.fr.bankaccountdetails;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.mindee.parsing.SummaryHelper;
import com.mindee.parsing.common.Prediction;
import com.mindee.parsing.standard.StringField;
import lombok.EqualsAndHashCode;
import lombok.Getter;

/**
 * Bank Account Details API version 1.0 document data.
 */
@Getter
@EqualsAndHashCode(callSuper = false)
@JsonIgnoreProperties(ignoreUnknown = true)
public class BankAccountDetailsV1Document extends Prediction {

  /**
   * The name of the account holder as seen on the document.
   */
  @JsonProperty("account_holder_name")
  protected StringField accountHolderName;
  /**
   * The International Bank Account Number (IBAN).
   */
  @JsonProperty("iban")
  protected StringField iban;
  /**
   * The bank's SWIFT Business Identifier Code (BIC).
   */
  @JsonProperty("swift")
  protected StringField swift;

  @Override
  public boolean isEmpty() {
    return (
      this.iban == null
      && this.accountHolderName == null
      && this.swift == null
      );
  }

  @Override
  public String toString() {
    StringBuilder outStr = new StringBuilder();
    outStr.append(
        String.format(":IBAN: %s%n", this.getIban())
    );
    outStr.append(
        String.format(":Account Holder's Name: %s%n", this.getAccountHolderName())
    );
    outStr.append(
        String.format(":SWIFT Code: %s%n", this.getSwift())
    );
    return SummaryHelper.cleanSummary(outStr.toString());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy