com.conekta.model.CustomerFiscalEntitiesRequest 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.
The newest version!
/*
* 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.CustomerAddress;
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 java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.conekta.JSON;
/**
* CustomerFiscalEntitiesRequest
*/
@JsonPropertyOrder({
CustomerFiscalEntitiesRequest.JSON_PROPERTY_ADDRESS,
CustomerFiscalEntitiesRequest.JSON_PROPERTY_TAX_ID,
CustomerFiscalEntitiesRequest.JSON_PROPERTY_EMAIL,
CustomerFiscalEntitiesRequest.JSON_PROPERTY_PHONE,
CustomerFiscalEntitiesRequest.JSON_PROPERTY_METADATA,
CustomerFiscalEntitiesRequest.JSON_PROPERTY_COMPANY_NAME
})
@JsonTypeName("customer_fiscal_entities_request")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0")
public class CustomerFiscalEntitiesRequest {
public static final String JSON_PROPERTY_ADDRESS = "address";
private CustomerAddress address;
public static final String JSON_PROPERTY_TAX_ID = "tax_id";
private String taxId;
public static final String JSON_PROPERTY_EMAIL = "email";
private String email;
public static final String JSON_PROPERTY_PHONE = "phone";
private String phone;
public static final String JSON_PROPERTY_METADATA = "metadata";
private Map metadata = new HashMap<>();
public static final String JSON_PROPERTY_COMPANY_NAME = "company_name";
private String companyName;
public CustomerFiscalEntitiesRequest() {
}
public CustomerFiscalEntitiesRequest address(CustomerAddress address) {
this.address = address;
return this;
}
/**
* Get address
* @return address
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_ADDRESS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public CustomerAddress getAddress() {
return address;
}
@JsonProperty(JSON_PROPERTY_ADDRESS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setAddress(CustomerAddress address) {
this.address = address;
}
public CustomerFiscalEntitiesRequest taxId(String taxId) {
this.taxId = taxId;
return this;
}
/**
* Get taxId
* @return taxId
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TAX_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getTaxId() {
return taxId;
}
@JsonProperty(JSON_PROPERTY_TAX_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTaxId(String taxId) {
this.taxId = taxId;
}
public CustomerFiscalEntitiesRequest email(String email) {
this.email = email;
return this;
}
/**
* Get email
* @return email
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_EMAIL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getEmail() {
return email;
}
@JsonProperty(JSON_PROPERTY_EMAIL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEmail(String email) {
this.email = email;
}
public CustomerFiscalEntitiesRequest phone(String phone) {
this.phone = phone;
return this;
}
/**
* Get phone
* @return phone
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PHONE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPhone() {
return phone;
}
@JsonProperty(JSON_PROPERTY_PHONE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPhone(String phone) {
this.phone = phone;
}
public CustomerFiscalEntitiesRequest metadata(Map metadata) {
this.metadata = metadata;
return this;
}
public CustomerFiscalEntitiesRequest putMetadataItem(String key, Object metadataItem) {
if (this.metadata == null) {
this.metadata = new HashMap<>();
}
this.metadata.put(key, metadataItem);
return this;
}
/**
* Get metadata
* @return metadata
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_METADATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map getMetadata() {
return metadata;
}
@JsonProperty(JSON_PROPERTY_METADATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMetadata(Map metadata) {
this.metadata = metadata;
}
public CustomerFiscalEntitiesRequest companyName(String companyName) {
this.companyName = companyName;
return this;
}
/**
* Get companyName
* @return companyName
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_COMPANY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCompanyName() {
return companyName;
}
@JsonProperty(JSON_PROPERTY_COMPANY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
/**
* Return true if this customer_fiscal_entities_request object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CustomerFiscalEntitiesRequest customerFiscalEntitiesRequest = (CustomerFiscalEntitiesRequest) o;
return Objects.equals(this.address, customerFiscalEntitiesRequest.address) &&
Objects.equals(this.taxId, customerFiscalEntitiesRequest.taxId) &&
Objects.equals(this.email, customerFiscalEntitiesRequest.email) &&
Objects.equals(this.phone, customerFiscalEntitiesRequest.phone) &&
Objects.equals(this.metadata, customerFiscalEntitiesRequest.metadata) &&
Objects.equals(this.companyName, customerFiscalEntitiesRequest.companyName);
}
@Override
public int hashCode() {
return Objects.hash(address, taxId, email, phone, metadata, companyName);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CustomerFiscalEntitiesRequest {\n");
sb.append(" address: ").append(toIndentedString(address)).append("\n");
sb.append(" taxId: ").append(toIndentedString(taxId)).append("\n");
sb.append(" email: ").append(toIndentedString(email)).append("\n");
sb.append(" phone: ").append(toIndentedString(phone)).append("\n");
sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
sb.append(" companyName: ").append(toIndentedString(companyName)).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 ");
}
}