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

com.adyen.model.legalentitymanagement.BusinessLine 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.adyen.model.legalentitymanagement.CapabilityProblem;
import com.adyen.model.legalentitymanagement.SourceOfFunds;
import com.adyen.model.legalentitymanagement.WebData;
import com.adyen.model.legalentitymanagement.WebDataExemption;
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;


/**
 * BusinessLine
 */
@JsonPropertyOrder({
  BusinessLine.JSON_PROPERTY_CAPABILITY,
  BusinessLine.JSON_PROPERTY_ID,
  BusinessLine.JSON_PROPERTY_INDUSTRY_CODE,
  BusinessLine.JSON_PROPERTY_LEGAL_ENTITY_ID,
  BusinessLine.JSON_PROPERTY_PROBLEMS,
  BusinessLine.JSON_PROPERTY_SALES_CHANNELS,
  BusinessLine.JSON_PROPERTY_SERVICE,
  BusinessLine.JSON_PROPERTY_SOURCE_OF_FUNDS,
  BusinessLine.JSON_PROPERTY_WEB_DATA,
  BusinessLine.JSON_PROPERTY_WEB_DATA_EXEMPTION
})

public class BusinessLine {
  /**
   * The capability for which you are creating the business line.  Possible values: **receivePayments**, **receiveFromPlatformPayments**, **issueBankAccount**
   */
  public enum CapabilityEnum {
    RECEIVEPAYMENTS(String.valueOf("receivePayments")),
    
    RECEIVEFROMPLATFORMPAYMENTS(String.valueOf("receiveFromPlatformPayments")),
    
    ISSUEBANKACCOUNT(String.valueOf("issueBankAccount"));

    private String value;

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

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

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

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

  public static final String JSON_PROPERTY_CAPABILITY = "capability";
  @Deprecated // deprecated since Legal Entity Management API v3: Use `service` instead.
  private CapabilityEnum capability;

  public static final String JSON_PROPERTY_ID = "id";
  private String id;

  public static final String JSON_PROPERTY_INDUSTRY_CODE = "industryCode";
  private String industryCode;

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

  public static final String JSON_PROPERTY_PROBLEMS = "problems";
  private List problems;

  public static final String JSON_PROPERTY_SALES_CHANNELS = "salesChannels";
  private List salesChannels;

  /**
   * The service for which you are creating the business line.    Possible values: *  **paymentProcessing** *  **banking**  
   */
  public enum ServiceEnum {
    PAYMENTPROCESSING(String.valueOf("paymentProcessing")),
    
    BANKING(String.valueOf("banking"));

    private String value;

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

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

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

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

  public static final String JSON_PROPERTY_SERVICE = "service";
  private ServiceEnum service;

  public static final String JSON_PROPERTY_SOURCE_OF_FUNDS = "sourceOfFunds";
  private SourceOfFunds sourceOfFunds;

  public static final String JSON_PROPERTY_WEB_DATA = "webData";
  private List webData;

  public static final String JSON_PROPERTY_WEB_DATA_EXEMPTION = "webDataExemption";
  private WebDataExemption webDataExemption;

  public BusinessLine() { 
  }

  @JsonCreator
  public BusinessLine(
    @JsonProperty(JSON_PROPERTY_ID) String id
  ) {
    this();
    this.id = id;
  }

  /**
   * The capability for which you are creating the business line.  Possible values: **receivePayments**, **receiveFromPlatformPayments**, **issueBankAccount**
   *
   * @param capability The capability for which you are creating the business line.  Possible values: **receivePayments**, **receiveFromPlatformPayments**, **issueBankAccount**
   * @return the current {@code BusinessLine} instance, allowing for method chaining
   *
   * @deprecated since Legal Entity Management API v3
   * Use `service` instead.
   */
  @Deprecated // deprecated since Legal Entity Management API v3: Use `service` instead.
  public BusinessLine capability(CapabilityEnum capability) {
    this.capability = capability;
    return this;
  }

  /**
   * The capability for which you are creating the business line.  Possible values: **receivePayments**, **receiveFromPlatformPayments**, **issueBankAccount**
   * @return capability The capability for which you are creating the business line.  Possible values: **receivePayments**, **receiveFromPlatformPayments**, **issueBankAccount**
   * @deprecated // deprecated since Legal Entity Management API v3: Use `service` instead.
   */
  @Deprecated // deprecated since Legal Entity Management API v3: Use `service` instead.
  @JsonProperty(JSON_PROPERTY_CAPABILITY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public CapabilityEnum getCapability() {
    return capability;
  }

  /**
   * The capability for which you are creating the business line.  Possible values: **receivePayments**, **receiveFromPlatformPayments**, **issueBankAccount**
   *
   * @param capability The capability for which you are creating the business line.  Possible values: **receivePayments**, **receiveFromPlatformPayments**, **issueBankAccount**
   *
   * @deprecated since Legal Entity Management API v3
   * Use `service` instead.
   */
  @Deprecated // deprecated since Legal Entity Management API v3: Use `service` instead.
  @JsonProperty(JSON_PROPERTY_CAPABILITY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCapability(CapabilityEnum capability) {
    this.capability = capability;
  }

  /**
   * The unique identifier of the business line.
   * @return id The unique identifier of the business line.
   */
  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getId() {
    return id;
  }


  /**
   * A code that represents the industry of the legal entity for [marketplaces](https://docs.adyen.com/marketplaces/verification-requirements/reference-additional-products/#list-industry-codes) or [platforms](https://docs.adyen.com/platforms/verification-requirements/reference-additional-products/#list-industry-codes). For example, **4431A** for computer software stores.
   *
   * @param industryCode A code that represents the industry of the legal entity for [marketplaces](https://docs.adyen.com/marketplaces/verification-requirements/reference-additional-products/#list-industry-codes) or [platforms](https://docs.adyen.com/platforms/verification-requirements/reference-additional-products/#list-industry-codes). For example, **4431A** for computer software stores.
   * @return the current {@code BusinessLine} instance, allowing for method chaining
   */
  public BusinessLine industryCode(String industryCode) {
    this.industryCode = industryCode;
    return this;
  }

  /**
   * A code that represents the industry of the legal entity for [marketplaces](https://docs.adyen.com/marketplaces/verification-requirements/reference-additional-products/#list-industry-codes) or [platforms](https://docs.adyen.com/platforms/verification-requirements/reference-additional-products/#list-industry-codes). For example, **4431A** for computer software stores.
   * @return industryCode A code that represents the industry of the legal entity for [marketplaces](https://docs.adyen.com/marketplaces/verification-requirements/reference-additional-products/#list-industry-codes) or [platforms](https://docs.adyen.com/platforms/verification-requirements/reference-additional-products/#list-industry-codes). For example, **4431A** for computer software stores.
   */
  @JsonProperty(JSON_PROPERTY_INDUSTRY_CODE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getIndustryCode() {
    return industryCode;
  }

  /**
   * A code that represents the industry of the legal entity for [marketplaces](https://docs.adyen.com/marketplaces/verification-requirements/reference-additional-products/#list-industry-codes) or [platforms](https://docs.adyen.com/platforms/verification-requirements/reference-additional-products/#list-industry-codes). For example, **4431A** for computer software stores.
   *
   * @param industryCode A code that represents the industry of the legal entity for [marketplaces](https://docs.adyen.com/marketplaces/verification-requirements/reference-additional-products/#list-industry-codes) or [platforms](https://docs.adyen.com/platforms/verification-requirements/reference-additional-products/#list-industry-codes). For example, **4431A** for computer software stores.
   */
  @JsonProperty(JSON_PROPERTY_INDUSTRY_CODE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setIndustryCode(String industryCode) {
    this.industryCode = industryCode;
  }

  /**
   * Unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id) that owns the business line.
   *
   * @param legalEntityId Unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id) that owns the business line.
   * @return the current {@code BusinessLine} instance, allowing for method chaining
   */
  public BusinessLine legalEntityId(String legalEntityId) {
    this.legalEntityId = legalEntityId;
    return this;
  }

  /**
   * Unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id) that owns the business line.
   * @return legalEntityId Unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id) that owns the business line.
   */
  @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getLegalEntityId() {
    return legalEntityId;
  }

  /**
   * Unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id) that owns the business line.
   *
   * @param legalEntityId Unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id) that owns the business line.
   */
  @JsonProperty(JSON_PROPERTY_LEGAL_ENTITY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setLegalEntityId(String legalEntityId) {
    this.legalEntityId = legalEntityId;
  }

  /**
   * The verification errors related to capabilities for this supporting entity.
   *
   * @param problems The verification errors related to capabilities for this supporting entity.
   * @return the current {@code BusinessLine} instance, allowing for method chaining
   */
  public BusinessLine problems(List problems) {
    this.problems = problems;
    return this;
  }

  public BusinessLine addProblemsItem(CapabilityProblem problemsItem) {
    if (this.problems == null) {
      this.problems = new ArrayList<>();
    }
    this.problems.add(problemsItem);
    return this;
  }

  /**
   * The verification errors related to capabilities for this supporting entity.
   * @return problems The verification errors related to capabilities for this supporting entity.
   */
  @JsonProperty(JSON_PROPERTY_PROBLEMS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public List getProblems() {
    return problems;
  }

  /**
   * The verification errors related to capabilities for this supporting entity.
   *
   * @param problems The verification errors related to capabilities for this supporting entity.
   */
  @JsonProperty(JSON_PROPERTY_PROBLEMS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setProblems(List problems) {
    this.problems = problems;
  }

  /**
   * A list of channels where goods or services are sold.  Possible values: **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**.  Required only in combination with the `service` **paymentProcessing**.
   *
   * @param salesChannels A list of channels where goods or services are sold.  Possible values: **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**.  Required only in combination with the `service` **paymentProcessing**.
   * @return the current {@code BusinessLine} instance, allowing for method chaining
   */
  public BusinessLine salesChannels(List salesChannels) {
    this.salesChannels = salesChannels;
    return this;
  }

  public BusinessLine addSalesChannelsItem(String salesChannelsItem) {
    if (this.salesChannels == null) {
      this.salesChannels = new ArrayList<>();
    }
    this.salesChannels.add(salesChannelsItem);
    return this;
  }

  /**
   * A list of channels where goods or services are sold.  Possible values: **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**.  Required only in combination with the `service` **paymentProcessing**.
   * @return salesChannels A list of channels where goods or services are sold.  Possible values: **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**.  Required only in combination with the `service` **paymentProcessing**.
   */
  @JsonProperty(JSON_PROPERTY_SALES_CHANNELS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public List getSalesChannels() {
    return salesChannels;
  }

  /**
   * A list of channels where goods or services are sold.  Possible values: **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**.  Required only in combination with the `service` **paymentProcessing**.
   *
   * @param salesChannels A list of channels where goods or services are sold.  Possible values: **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**.  Required only in combination with the `service` **paymentProcessing**.
   */
  @JsonProperty(JSON_PROPERTY_SALES_CHANNELS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSalesChannels(List salesChannels) {
    this.salesChannels = salesChannels;
  }

  /**
   * The service for which you are creating the business line.    Possible values: *  **paymentProcessing** *  **banking**  
   *
   * @param service The service for which you are creating the business line.    Possible values: *  **paymentProcessing** *  **banking**  
   * @return the current {@code BusinessLine} instance, allowing for method chaining
   */
  public BusinessLine service(ServiceEnum service) {
    this.service = service;
    return this;
  }

  /**
   * The service for which you are creating the business line.    Possible values: *  **paymentProcessing** *  **banking**  
   * @return service The service for which you are creating the business line.    Possible values: *  **paymentProcessing** *  **banking**  
   */
  @JsonProperty(JSON_PROPERTY_SERVICE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public ServiceEnum getService() {
    return service;
  }

  /**
   * The service for which you are creating the business line.    Possible values: *  **paymentProcessing** *  **banking**  
   *
   * @param service The service for which you are creating the business line.    Possible values: *  **paymentProcessing** *  **banking**  
   */
  @JsonProperty(JSON_PROPERTY_SERVICE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setService(ServiceEnum service) {
    this.service = service;
  }

  /**
   * sourceOfFunds
   *
   * @param sourceOfFunds 
   * @return the current {@code BusinessLine} instance, allowing for method chaining
   */
  public BusinessLine sourceOfFunds(SourceOfFunds sourceOfFunds) {
    this.sourceOfFunds = sourceOfFunds;
    return this;
  }

  /**
   * Get sourceOfFunds
   * @return sourceOfFunds 
   */
  @JsonProperty(JSON_PROPERTY_SOURCE_OF_FUNDS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public SourceOfFunds getSourceOfFunds() {
    return sourceOfFunds;
  }

  /**
   * sourceOfFunds
   *
   * @param sourceOfFunds 
   */
  @JsonProperty(JSON_PROPERTY_SOURCE_OF_FUNDS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSourceOfFunds(SourceOfFunds sourceOfFunds) {
    this.sourceOfFunds = sourceOfFunds;
  }

  /**
   * List of website URLs where your user's goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object.
   *
   * @param webData List of website URLs where your user's goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object.
   * @return the current {@code BusinessLine} instance, allowing for method chaining
   */
  public BusinessLine webData(List webData) {
    this.webData = webData;
    return this;
  }

  public BusinessLine addWebDataItem(WebData webDataItem) {
    if (this.webData == null) {
      this.webData = new ArrayList<>();
    }
    this.webData.add(webDataItem);
    return this;
  }

  /**
   * List of website URLs where your user's goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object.
   * @return webData List of website URLs where your user's goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object.
   */
  @JsonProperty(JSON_PROPERTY_WEB_DATA)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public List getWebData() {
    return webData;
  }

  /**
   * List of website URLs where your user's goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object.
   *
   * @param webData List of website URLs where your user's goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object.
   */
  @JsonProperty(JSON_PROPERTY_WEB_DATA)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setWebData(List webData) {
    this.webData = webData;
  }

  /**
   * webDataExemption
   *
   * @param webDataExemption 
   * @return the current {@code BusinessLine} instance, allowing for method chaining
   */
  public BusinessLine webDataExemption(WebDataExemption webDataExemption) {
    this.webDataExemption = webDataExemption;
    return this;
  }

  /**
   * Get webDataExemption
   * @return webDataExemption 
   */
  @JsonProperty(JSON_PROPERTY_WEB_DATA_EXEMPTION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public WebDataExemption getWebDataExemption() {
    return webDataExemption;
  }

  /**
   * webDataExemption
   *
   * @param webDataExemption 
   */
  @JsonProperty(JSON_PROPERTY_WEB_DATA_EXEMPTION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setWebDataExemption(WebDataExemption webDataExemption) {
    this.webDataExemption = webDataExemption;
  }

  /**
   * Return true if this BusinessLine object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    BusinessLine businessLine = (BusinessLine) o;
    return Objects.equals(this.capability, businessLine.capability) &&
        Objects.equals(this.id, businessLine.id) &&
        Objects.equals(this.industryCode, businessLine.industryCode) &&
        Objects.equals(this.legalEntityId, businessLine.legalEntityId) &&
        Objects.equals(this.problems, businessLine.problems) &&
        Objects.equals(this.salesChannels, businessLine.salesChannels) &&
        Objects.equals(this.service, businessLine.service) &&
        Objects.equals(this.sourceOfFunds, businessLine.sourceOfFunds) &&
        Objects.equals(this.webData, businessLine.webData) &&
        Objects.equals(this.webDataExemption, businessLine.webDataExemption);
  }

  @Override
  public int hashCode() {
    return Objects.hash(capability, id, industryCode, legalEntityId, problems, salesChannels, service, sourceOfFunds, webData, webDataExemption);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class BusinessLine {\n");
    sb.append("    capability: ").append(toIndentedString(capability)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    industryCode: ").append(toIndentedString(industryCode)).append("\n");
    sb.append("    legalEntityId: ").append(toIndentedString(legalEntityId)).append("\n");
    sb.append("    problems: ").append(toIndentedString(problems)).append("\n");
    sb.append("    salesChannels: ").append(toIndentedString(salesChannels)).append("\n");
    sb.append("    service: ").append(toIndentedString(service)).append("\n");
    sb.append("    sourceOfFunds: ").append(toIndentedString(sourceOfFunds)).append("\n");
    sb.append("    webData: ").append(toIndentedString(webData)).append("\n");
    sb.append("    webDataExemption: ").append(toIndentedString(webDataExemption)).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 BusinessLine given an JSON string
   *
   * @param jsonString JSON string
   * @return An instance of BusinessLine
   * @throws JsonProcessingException if the JSON string is invalid with respect to BusinessLine
   */
  public static BusinessLine fromJson(String jsonString) throws JsonProcessingException {
    return JSON.getMapper().readValue(jsonString, BusinessLine.class);
  }
/**
  * Convert an instance of BusinessLine to an JSON string
  *
  * @return JSON string
  */
  public String toJson() throws JsonProcessingException {
    return JSON.getMapper().writeValueAsString(this);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy