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

com.adyen.model.legalentitymanagement.LegalEntityAssociation Maven / Gradle / Ivy

There is a newer version: 38.1.0
Show newest version
/*
 * Legal Entity Management API
 *
 * The version of the OpenAPI document: 3
 * 
 *
 * 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.adyen.model.legalentitymanagement;

import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;


/**
 * LegalEntityAssociation
 */
@JsonPropertyOrder({
  LegalEntityAssociation.JSON_PROPERTY_ASSOCIATOR_ID,
  LegalEntityAssociation.JSON_PROPERTY_ENTITY_TYPE,
  LegalEntityAssociation.JSON_PROPERTY_JOB_TITLE,
  LegalEntityAssociation.JSON_PROPERTY_LEGAL_ENTITY_ID,
  LegalEntityAssociation.JSON_PROPERTY_NAME,
  LegalEntityAssociation.JSON_PROPERTY_NOMINEE,
  LegalEntityAssociation.JSON_PROPERTY_RELATIONSHIP,
  LegalEntityAssociation.JSON_PROPERTY_SETTLOR_EXEMPTION_REASON,
  LegalEntityAssociation.JSON_PROPERTY_TYPE
})

public class LegalEntityAssociation {
  public static final String JSON_PROPERTY_ASSOCIATOR_ID = "associatorId";
  private String associatorId;

  public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType";
  private String entityType;

  public static final String JSON_PROPERTY_JOB_TITLE = "jobTitle";
  private String jobTitle;

  public static final String JSON_PROPERTY_LEGAL_ENTITY_ID = "legalEntityId";
  private String legalEntityId;

  public static final String JSON_PROPERTY_NAME = "name";
  private String name;

  public static final String JSON_PROPERTY_NOMINEE = "nominee";
  private Boolean nominee;

  public static final String JSON_PROPERTY_RELATIONSHIP = "relationship";
  private String relationship;

  public static final String JSON_PROPERTY_SETTLOR_EXEMPTION_REASON = "settlorExemptionReason";
  private List settlorExemptionReason;

  /**
   * Defines the relationship of the legal entity to the current legal entity.  Possible value for individuals: **legalRepresentative**.  Possible values for organizations: **director**, **signatory**, **trustOwnership**, **uboThroughOwnership**, **uboThroughControl**, or **ultimateParentCompany**.  Possible values for sole proprietorships: **soleProprietorship**.  Possible value for trusts: **trust**.  Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**.  Possible value for unincorporated partnership: **unincorporatedPartnership**.  Possible values for unincorporated partnership members: **secondaryPartner**, **uboThroughControl**, **uboThroughOwnership**
   */
  public enum TypeEnum {
    DEFINEDBENEFICIARY(String.valueOf("definedBeneficiary")),
    
    DIRECTOR(String.valueOf("director")),
    
    IMMEDIATEPARENTCOMPANY(String.valueOf("immediateParentCompany")),
    
    LEGALREPRESENTATIVE(String.valueOf("legalRepresentative")),
    
    PCISIGNATORY(String.valueOf("pciSignatory")),
    
    PROTECTOR(String.valueOf("protector")),
    
    SECONDARYPARTNER(String.valueOf("secondaryPartner")),
    
    SECONDARYTRUSTEE(String.valueOf("secondaryTrustee")),
    
    SETTLOR(String.valueOf("settlor")),
    
    SIGNATORY(String.valueOf("signatory")),
    
    SOLEPROPRIETORSHIP(String.valueOf("soleProprietorship")),
    
    TRUST(String.valueOf("trust")),
    
    TRUSTOWNERSHIP(String.valueOf("trustOwnership")),
    
    UBOTHROUGHCONTROL(String.valueOf("uboThroughControl")),
    
    UBOTHROUGHOWNERSHIP(String.valueOf("uboThroughOwnership")),
    
    ULTIMATEPARENTCOMPANY(String.valueOf("ultimateParentCompany")),
    
    UNDEFINEDBENEFICIARY(String.valueOf("undefinedBeneficiary")),
    
    UNINCORPORATEDPARTNERSHIP(String.valueOf("unincorporatedPartnership"));

    private String value;

    TypeEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static TypeEnum fromValue(String value) {
      for (TypeEnum b : TypeEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }
  }

  public static final String JSON_PROPERTY_TYPE = "type";
  private TypeEnum type;

  public LegalEntityAssociation() { 
  }

  @JsonCreator
  public LegalEntityAssociation(
    @JsonProperty(JSON_PROPERTY_ASSOCIATOR_ID) String associatorId, 
    @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) String entityType, 
    @JsonProperty(JSON_PROPERTY_NAME) String name
  ) {
    this();
    this.associatorId = associatorId;
    this.entityType = entityType;
    this.name = name;
  }

  /**
   * The unique identifier of another legal entity with which the `legalEntityId` is associated. When the `legalEntityId` is associated to legal entities other than the current one, the response returns all the associations.
   * @return associatorId The unique identifier of another legal entity with which the `legalEntityId` is associated. When the `legalEntityId` is associated to legal entities other than the current one, the response returns all the associations.
   */
  @JsonProperty(JSON_PROPERTY_ASSOCIATOR_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getAssociatorId() {
    return associatorId;
  }


  /**
   * The legal entity type of associated legal entity.  For example, **organization**, **soleProprietorship** or **individual**.
   * @return entityType The legal entity type of associated legal entity.  For example, **organization**, **soleProprietorship** or **individual**.
   */
  @JsonProperty(JSON_PROPERTY_ENTITY_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getEntityType() {
    return entityType;
  }


  /**
   * The individual's job title if the `type` is **uboThroughControl** or **signatory**.
   *
   * @param jobTitle The individual's job title if the `type` is **uboThroughControl** or **signatory**.
   * @return the current {@code LegalEntityAssociation} instance, allowing for method chaining
   */
  public LegalEntityAssociation jobTitle(String jobTitle) {
    this.jobTitle = jobTitle;
    return this;
  }

  /**
   * The individual's job title if the `type` is **uboThroughControl** or **signatory**.
   * @return jobTitle The individual's job title if the `type` is **uboThroughControl** or **signatory**.
   */
  @JsonProperty(JSON_PROPERTY_JOB_TITLE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getJobTitle() {
    return jobTitle;
  }

  /**
   * The individual's job title if the `type` is **uboThroughControl** or **signatory**.
   *
   * @param jobTitle The individual's job title if the `type` is **uboThroughControl** or **signatory**.
   */
  @JsonProperty(JSON_PROPERTY_JOB_TITLE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setJobTitle(String jobTitle) {
    this.jobTitle = jobTitle;
  }

  /**
   * The unique identifier of the associated [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id).
   *
   * @param legalEntityId The unique identifier of the associated [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id).
   * @return the current {@code LegalEntityAssociation} instance, allowing for method chaining
   */
  public LegalEntityAssociation legalEntityId(String legalEntityId) {
    this.legalEntityId = legalEntityId;
    return this;
  }

  /**
   * The unique identifier of the associated [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id).
   * @return legalEntityId The unique identifier of the associated [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id).
   */
  @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getLegalEntityId() {
    return legalEntityId;
  }

  /**
   * The unique identifier of the associated [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id).
   *
   * @param legalEntityId The unique identifier of the associated [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id).
   */
  @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setLegalEntityId(String legalEntityId) {
    this.legalEntityId = legalEntityId;
  }

  /**
   * The name of the associated [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id).  - For **individual**, `name.firstName` and `name.lastName`. - For **organization**, `legalName`. - For **soleProprietorship**, `name`.
   * @return name The name of the associated [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id).  - For **individual**, `name.firstName` and `name.lastName`. - For **organization**, `legalName`. - For **soleProprietorship**, `name`.
   */
  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getName() {
    return name;
  }


  /**
   * Default value: **false** Set to **true** if the entity association `type` **director**, **secondaryPartner** or **shareholder** is also a nominee. Only applicable to New Zealand.
   *
   * @param nominee Default value: **false** Set to **true** if the entity association `type` **director**, **secondaryPartner** or **shareholder** is also a nominee. Only applicable to New Zealand.
   * @return the current {@code LegalEntityAssociation} instance, allowing for method chaining
   */
  public LegalEntityAssociation nominee(Boolean nominee) {
    this.nominee = nominee;
    return this;
  }

  /**
   * Default value: **false** Set to **true** if the entity association `type` **director**, **secondaryPartner** or **shareholder** is also a nominee. Only applicable to New Zealand.
   * @return nominee Default value: **false** Set to **true** if the entity association `type` **director**, **secondaryPartner** or **shareholder** is also a nominee. Only applicable to New Zealand.
   */
  @JsonProperty(JSON_PROPERTY_NOMINEE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Boolean getNominee() {
    return nominee;
  }

  /**
   * Default value: **false** Set to **true** if the entity association `type` **director**, **secondaryPartner** or **shareholder** is also a nominee. Only applicable to New Zealand.
   *
   * @param nominee Default value: **false** Set to **true** if the entity association `type` **director**, **secondaryPartner** or **shareholder** is also a nominee. Only applicable to New Zealand.
   */
  @JsonProperty(JSON_PROPERTY_NOMINEE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setNominee(Boolean nominee) {
    this.nominee = nominee;
  }

  /**
   * The individual's relationship to a legal representative if the `type` is **legalRepresentative**. Possible values: **parent**, **guardian**.
   *
   * @param relationship The individual's relationship to a legal representative if the `type` is **legalRepresentative**. Possible values: **parent**, **guardian**.
   * @return the current {@code LegalEntityAssociation} instance, allowing for method chaining
   */
  public LegalEntityAssociation relationship(String relationship) {
    this.relationship = relationship;
    return this;
  }

  /**
   * The individual's relationship to a legal representative if the `type` is **legalRepresentative**. Possible values: **parent**, **guardian**.
   * @return relationship The individual's relationship to a legal representative if the `type` is **legalRepresentative**. Possible values: **parent**, **guardian**.
   */
  @JsonProperty(JSON_PROPERTY_RELATIONSHIP)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getRelationship() {
    return relationship;
  }

  /**
   * The individual's relationship to a legal representative if the `type` is **legalRepresentative**. Possible values: **parent**, **guardian**.
   *
   * @param relationship The individual's relationship to a legal representative if the `type` is **legalRepresentative**. Possible values: **parent**, **guardian**.
   */
  @JsonProperty(JSON_PROPERTY_RELATIONSHIP)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRelationship(String relationship) {
    this.relationship = relationship;
  }

  /**
   * Defines the KYC exemption reason for a settlor associated with a trust. Only applicable to trusts in Australia.  For example, **professionalServiceProvider**, **deceased**, or **contributionBelowThreshold**.
   *
   * @param settlorExemptionReason Defines the KYC exemption reason for a settlor associated with a trust. Only applicable to trusts in Australia.  For example, **professionalServiceProvider**, **deceased**, or **contributionBelowThreshold**.
   * @return the current {@code LegalEntityAssociation} instance, allowing for method chaining
   */
  public LegalEntityAssociation settlorExemptionReason(List settlorExemptionReason) {
    this.settlorExemptionReason = settlorExemptionReason;
    return this;
  }

  public LegalEntityAssociation addSettlorExemptionReasonItem(String settlorExemptionReasonItem) {
    if (this.settlorExemptionReason == null) {
      this.settlorExemptionReason = new ArrayList<>();
    }
    this.settlorExemptionReason.add(settlorExemptionReasonItem);
    return this;
  }

  /**
   * Defines the KYC exemption reason for a settlor associated with a trust. Only applicable to trusts in Australia.  For example, **professionalServiceProvider**, **deceased**, or **contributionBelowThreshold**.
   * @return settlorExemptionReason Defines the KYC exemption reason for a settlor associated with a trust. Only applicable to trusts in Australia.  For example, **professionalServiceProvider**, **deceased**, or **contributionBelowThreshold**.
   */
  @JsonProperty(JSON_PROPERTY_SETTLOR_EXEMPTION_REASON)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public List getSettlorExemptionReason() {
    return settlorExemptionReason;
  }

  /**
   * Defines the KYC exemption reason for a settlor associated with a trust. Only applicable to trusts in Australia.  For example, **professionalServiceProvider**, **deceased**, or **contributionBelowThreshold**.
   *
   * @param settlorExemptionReason Defines the KYC exemption reason for a settlor associated with a trust. Only applicable to trusts in Australia.  For example, **professionalServiceProvider**, **deceased**, or **contributionBelowThreshold**.
   */
  @JsonProperty(JSON_PROPERTY_SETTLOR_EXEMPTION_REASON)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSettlorExemptionReason(List settlorExemptionReason) {
    this.settlorExemptionReason = settlorExemptionReason;
  }

  /**
   * Defines the relationship of the legal entity to the current legal entity.  Possible value for individuals: **legalRepresentative**.  Possible values for organizations: **director**, **signatory**, **trustOwnership**, **uboThroughOwnership**, **uboThroughControl**, or **ultimateParentCompany**.  Possible values for sole proprietorships: **soleProprietorship**.  Possible value for trusts: **trust**.  Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**.  Possible value for unincorporated partnership: **unincorporatedPartnership**.  Possible values for unincorporated partnership members: **secondaryPartner**, **uboThroughControl**, **uboThroughOwnership**
   *
   * @param type Defines the relationship of the legal entity to the current legal entity.  Possible value for individuals: **legalRepresentative**.  Possible values for organizations: **director**, **signatory**, **trustOwnership**, **uboThroughOwnership**, **uboThroughControl**, or **ultimateParentCompany**.  Possible values for sole proprietorships: **soleProprietorship**.  Possible value for trusts: **trust**.  Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**.  Possible value for unincorporated partnership: **unincorporatedPartnership**.  Possible values for unincorporated partnership members: **secondaryPartner**, **uboThroughControl**, **uboThroughOwnership**
   * @return the current {@code LegalEntityAssociation} instance, allowing for method chaining
   */
  public LegalEntityAssociation type(TypeEnum type) {
    this.type = type;
    return this;
  }

  /**
   * Defines the relationship of the legal entity to the current legal entity.  Possible value for individuals: **legalRepresentative**.  Possible values for organizations: **director**, **signatory**, **trustOwnership**, **uboThroughOwnership**, **uboThroughControl**, or **ultimateParentCompany**.  Possible values for sole proprietorships: **soleProprietorship**.  Possible value for trusts: **trust**.  Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**.  Possible value for unincorporated partnership: **unincorporatedPartnership**.  Possible values for unincorporated partnership members: **secondaryPartner**, **uboThroughControl**, **uboThroughOwnership**
   * @return type Defines the relationship of the legal entity to the current legal entity.  Possible value for individuals: **legalRepresentative**.  Possible values for organizations: **director**, **signatory**, **trustOwnership**, **uboThroughOwnership**, **uboThroughControl**, or **ultimateParentCompany**.  Possible values for sole proprietorships: **soleProprietorship**.  Possible value for trusts: **trust**.  Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**.  Possible value for unincorporated partnership: **unincorporatedPartnership**.  Possible values for unincorporated partnership members: **secondaryPartner**, **uboThroughControl**, **uboThroughOwnership**
   */
  @JsonProperty(JSON_PROPERTY_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public TypeEnum getType() {
    return type;
  }

  /**
   * Defines the relationship of the legal entity to the current legal entity.  Possible value for individuals: **legalRepresentative**.  Possible values for organizations: **director**, **signatory**, **trustOwnership**, **uboThroughOwnership**, **uboThroughControl**, or **ultimateParentCompany**.  Possible values for sole proprietorships: **soleProprietorship**.  Possible value for trusts: **trust**.  Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**.  Possible value for unincorporated partnership: **unincorporatedPartnership**.  Possible values for unincorporated partnership members: **secondaryPartner**, **uboThroughControl**, **uboThroughOwnership**
   *
   * @param type Defines the relationship of the legal entity to the current legal entity.  Possible value for individuals: **legalRepresentative**.  Possible values for organizations: **director**, **signatory**, **trustOwnership**, **uboThroughOwnership**, **uboThroughControl**, or **ultimateParentCompany**.  Possible values for sole proprietorships: **soleProprietorship**.  Possible value for trusts: **trust**.  Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**.  Possible value for unincorporated partnership: **unincorporatedPartnership**.  Possible values for unincorporated partnership members: **secondaryPartner**, **uboThroughControl**, **uboThroughOwnership**
   */
  @JsonProperty(JSON_PROPERTY_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setType(TypeEnum type) {
    this.type = type;
  }

  /**
   * Return true if this LegalEntityAssociation object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    LegalEntityAssociation legalEntityAssociation = (LegalEntityAssociation) o;
    return Objects.equals(this.associatorId, legalEntityAssociation.associatorId) &&
        Objects.equals(this.entityType, legalEntityAssociation.entityType) &&
        Objects.equals(this.jobTitle, legalEntityAssociation.jobTitle) &&
        Objects.equals(this.legalEntityId, legalEntityAssociation.legalEntityId) &&
        Objects.equals(this.name, legalEntityAssociation.name) &&
        Objects.equals(this.nominee, legalEntityAssociation.nominee) &&
        Objects.equals(this.relationship, legalEntityAssociation.relationship) &&
        Objects.equals(this.settlorExemptionReason, legalEntityAssociation.settlorExemptionReason) &&
        Objects.equals(this.type, legalEntityAssociation.type);
  }

  @Override
  public int hashCode() {
    return Objects.hash(associatorId, entityType, jobTitle, legalEntityId, name, nominee, relationship, settlorExemptionReason, type);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class LegalEntityAssociation {\n");
    sb.append("    associatorId: ").append(toIndentedString(associatorId)).append("\n");
    sb.append("    entityType: ").append(toIndentedString(entityType)).append("\n");
    sb.append("    jobTitle: ").append(toIndentedString(jobTitle)).append("\n");
    sb.append("    legalEntityId: ").append(toIndentedString(legalEntityId)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    nominee: ").append(toIndentedString(nominee)).append("\n");
    sb.append("    relationship: ").append(toIndentedString(relationship)).append("\n");
    sb.append("    settlorExemptionReason: ").append(toIndentedString(settlorExemptionReason)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).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    ");
  }

/**
   * Create an instance of LegalEntityAssociation given an JSON string
   *
   * @param jsonString JSON string
   * @return An instance of LegalEntityAssociation
   * @throws JsonProcessingException if the JSON string is invalid with respect to LegalEntityAssociation
   */
  public static LegalEntityAssociation fromJson(String jsonString) throws JsonProcessingException {
    return JSON.getMapper().readValue(jsonString, LegalEntityAssociation.class);
  }
/**
  * Convert an instance of LegalEntityAssociation to an JSON string
  *
  * @return JSON string
  */
  public String toJson() throws JsonProcessingException {
    return JSON.getMapper().writeValueAsString(this);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy