com.conekta.model.CompanyResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ct-conekta-java Show documentation
Show all versions of ct-conekta-java Show documentation
This is a java library that allows interaction with https://api.conekta.io API.
/*
* Conekta API
* Conekta sdk
*
* The version of the OpenAPI document: 2.1.0
* Contact: [email protected]
*
* 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.conekta.model;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.conekta.model.CompanyFiscalInfoResponse;
import com.conekta.model.CompanyPayoutDestinationResponse;
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.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.conekta.JSON;
/**
* Company model
*/
@JsonPropertyOrder({
CompanyResponse.JSON_PROPERTY_ID,
CompanyResponse.JSON_PROPERTY_CREATED_AT,
CompanyResponse.JSON_PROPERTY_NAME,
CompanyResponse.JSON_PROPERTY_OBJECT,
CompanyResponse.JSON_PROPERTY_PARENT_COMPANY_ID,
CompanyResponse.JSON_PROPERTY_USE_PARENT_FISCAL_DATA,
CompanyResponse.JSON_PROPERTY_PAYOUT_DESTINATION,
CompanyResponse.JSON_PROPERTY_FISCAL_INFO
})
@JsonTypeName("company_response")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0")
public class CompanyResponse {
public static final String JSON_PROPERTY_ID = "id";
private String id;
public static final String JSON_PROPERTY_CREATED_AT = "created_at";
private Long createdAt;
public static final String JSON_PROPERTY_NAME = "name";
private String name;
/**
* The resource's type
*/
public enum ObjectEnum {
COMPANY("company");
private String value;
ObjectEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static ObjectEnum fromValue(String value) {
for (ObjectEnum b : ObjectEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_OBJECT = "object";
private ObjectEnum _object;
public static final String JSON_PROPERTY_PARENT_COMPANY_ID = "parent_company_id";
private String parentCompanyId;
public static final String JSON_PROPERTY_USE_PARENT_FISCAL_DATA = "use_parent_fiscal_data";
private Boolean useParentFiscalData;
public static final String JSON_PROPERTY_PAYOUT_DESTINATION = "payout_destination";
private CompanyPayoutDestinationResponse payoutDestination;
public static final String JSON_PROPERTY_FISCAL_INFO = "fiscal_info";
private CompanyFiscalInfoResponse fiscalInfo;
public CompanyResponse() {
}
public CompanyResponse id(String id) {
this.id = id;
return this;
}
/**
* The child company's unique identifier
* @return id
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getId() {
return id;
}
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(String id) {
this.id = id;
}
public CompanyResponse createdAt(Long createdAt) {
this.createdAt = createdAt;
return this;
}
/**
* The resource's creation date (unix timestamp)
* @return createdAt
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CREATED_AT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getCreatedAt() {
return createdAt;
}
@JsonProperty(JSON_PROPERTY_CREATED_AT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCreatedAt(Long createdAt) {
this.createdAt = createdAt;
}
public CompanyResponse name(String name) {
this.name = name;
return this;
}
/**
* The child company's name
* @return name
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setName(String name) {
this.name = name;
}
public CompanyResponse _object(ObjectEnum _object) {
this._object = _object;
return this;
}
/**
* The resource's type
* @return _object
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_OBJECT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ObjectEnum getObject() {
return _object;
}
@JsonProperty(JSON_PROPERTY_OBJECT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setObject(ObjectEnum _object) {
this._object = _object;
}
public CompanyResponse parentCompanyId(String parentCompanyId) {
this.parentCompanyId = parentCompanyId;
return this;
}
/**
* Id of the parent company
* @return parentCompanyId
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PARENT_COMPANY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getParentCompanyId() {
return parentCompanyId;
}
@JsonProperty(JSON_PROPERTY_PARENT_COMPANY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setParentCompanyId(String parentCompanyId) {
this.parentCompanyId = parentCompanyId;
}
public CompanyResponse useParentFiscalData(Boolean useParentFiscalData) {
this.useParentFiscalData = useParentFiscalData;
return this;
}
/**
* Whether the parent company's fiscal data is to be used for liquidation and tax purposes
* @return useParentFiscalData
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_USE_PARENT_FISCAL_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getUseParentFiscalData() {
return useParentFiscalData;
}
@JsonProperty(JSON_PROPERTY_USE_PARENT_FISCAL_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setUseParentFiscalData(Boolean useParentFiscalData) {
this.useParentFiscalData = useParentFiscalData;
}
public CompanyResponse payoutDestination(CompanyPayoutDestinationResponse payoutDestination) {
this.payoutDestination = payoutDestination;
return this;
}
/**
* Get payoutDestination
* @return payoutDestination
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PAYOUT_DESTINATION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public CompanyPayoutDestinationResponse getPayoutDestination() {
return payoutDestination;
}
@JsonProperty(JSON_PROPERTY_PAYOUT_DESTINATION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPayoutDestination(CompanyPayoutDestinationResponse payoutDestination) {
this.payoutDestination = payoutDestination;
}
public CompanyResponse fiscalInfo(CompanyFiscalInfoResponse fiscalInfo) {
this.fiscalInfo = fiscalInfo;
return this;
}
/**
* Get fiscalInfo
* @return fiscalInfo
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_FISCAL_INFO)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public CompanyFiscalInfoResponse getFiscalInfo() {
return fiscalInfo;
}
@JsonProperty(JSON_PROPERTY_FISCAL_INFO)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setFiscalInfo(CompanyFiscalInfoResponse fiscalInfo) {
this.fiscalInfo = fiscalInfo;
}
/**
* Return true if this company_response object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CompanyResponse companyResponse = (CompanyResponse) o;
return Objects.equals(this.id, companyResponse.id) &&
Objects.equals(this.createdAt, companyResponse.createdAt) &&
Objects.equals(this.name, companyResponse.name) &&
Objects.equals(this._object, companyResponse._object) &&
Objects.equals(this.parentCompanyId, companyResponse.parentCompanyId) &&
Objects.equals(this.useParentFiscalData, companyResponse.useParentFiscalData) &&
Objects.equals(this.payoutDestination, companyResponse.payoutDestination) &&
Objects.equals(this.fiscalInfo, companyResponse.fiscalInfo);
}
@Override
public int hashCode() {
return Objects.hash(id, createdAt, name, _object, parentCompanyId, useParentFiscalData, payoutDestination, fiscalInfo);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CompanyResponse {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" _object: ").append(toIndentedString(_object)).append("\n");
sb.append(" parentCompanyId: ").append(toIndentedString(parentCompanyId)).append("\n");
sb.append(" useParentFiscalData: ").append(toIndentedString(useParentFiscalData)).append("\n");
sb.append(" payoutDestination: ").append(toIndentedString(payoutDestination)).append("\n");
sb.append(" fiscalInfo: ").append(toIndentedString(fiscalInfo)).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 ");
}
}