com.conekta.model.PaymentMethodGeneralRequest 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.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;
/**
* Payment method used in the charge. Go to the [payment methods](https://developers.conekta.com/reference/m%C3%A9todos-de-pago) section for more details
*/
@JsonPropertyOrder({
PaymentMethodGeneralRequest.JSON_PROPERTY_EXPIRES_AT,
PaymentMethodGeneralRequest.JSON_PROPERTY_MONTHLY_INSTALLMENTS,
PaymentMethodGeneralRequest.JSON_PROPERTY_TYPE,
PaymentMethodGeneralRequest.JSON_PROPERTY_TOKEN_ID,
PaymentMethodGeneralRequest.JSON_PROPERTY_PAYMENT_SOURCE_ID,
PaymentMethodGeneralRequest.JSON_PROPERTY_CVC,
PaymentMethodGeneralRequest.JSON_PROPERTY_CONTRACT_ID,
PaymentMethodGeneralRequest.JSON_PROPERTY_CUSTOMER_IP_ADDRESS
})
@JsonTypeName("payment_method_general_request")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0")
public class PaymentMethodGeneralRequest {
public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at";
private Long expiresAt;
public static final String JSON_PROPERTY_MONTHLY_INSTALLMENTS = "monthly_installments";
private Integer monthlyInstallments;
public static final String JSON_PROPERTY_TYPE = "type";
private String type;
public static final String JSON_PROPERTY_TOKEN_ID = "token_id";
private String tokenId;
public static final String JSON_PROPERTY_PAYMENT_SOURCE_ID = "payment_source_id";
private String paymentSourceId;
public static final String JSON_PROPERTY_CVC = "cvc";
private String cvc;
public static final String JSON_PROPERTY_CONTRACT_ID = "contract_id";
private String contractId;
public static final String JSON_PROPERTY_CUSTOMER_IP_ADDRESS = "customer_ip_address";
private String customerIpAddress;
public PaymentMethodGeneralRequest() {
}
public PaymentMethodGeneralRequest expiresAt(Long expiresAt) {
this.expiresAt = expiresAt;
return this;
}
/**
* Method expiration date as unix timestamp
* @return expiresAt
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_EXPIRES_AT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getExpiresAt() {
return expiresAt;
}
@JsonProperty(JSON_PROPERTY_EXPIRES_AT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setExpiresAt(Long expiresAt) {
this.expiresAt = expiresAt;
}
public PaymentMethodGeneralRequest monthlyInstallments(Integer monthlyInstallments) {
this.monthlyInstallments = monthlyInstallments;
return this;
}
/**
* How many months without interest to apply, it can be 3, 6, 9, 12 or 18
* @return monthlyInstallments
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MONTHLY_INSTALLMENTS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getMonthlyInstallments() {
return monthlyInstallments;
}
@JsonProperty(JSON_PROPERTY_MONTHLY_INSTALLMENTS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMonthlyInstallments(Integer monthlyInstallments) {
this.monthlyInstallments = monthlyInstallments;
}
public PaymentMethodGeneralRequest type(String type) {
this.type = type;
return this;
}
/**
* Type of payment method
* @return type
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getType() {
return type;
}
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setType(String type) {
this.type = type;
}
public PaymentMethodGeneralRequest tokenId(String tokenId) {
this.tokenId = tokenId;
return this;
}
/**
* Get tokenId
* @return tokenId
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TOKEN_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getTokenId() {
return tokenId;
}
@JsonProperty(JSON_PROPERTY_TOKEN_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTokenId(String tokenId) {
this.tokenId = tokenId;
}
public PaymentMethodGeneralRequest paymentSourceId(String paymentSourceId) {
this.paymentSourceId = paymentSourceId;
return this;
}
/**
* Get paymentSourceId
* @return paymentSourceId
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PAYMENT_SOURCE_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPaymentSourceId() {
return paymentSourceId;
}
@JsonProperty(JSON_PROPERTY_PAYMENT_SOURCE_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPaymentSourceId(String paymentSourceId) {
this.paymentSourceId = paymentSourceId;
}
public PaymentMethodGeneralRequest cvc(String cvc) {
this.cvc = cvc;
return this;
}
/**
* Optional, It is a value that allows identifying the security code of the card. Only for PCI merchants
* @return cvc
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CVC)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCvc() {
return cvc;
}
@JsonProperty(JSON_PROPERTY_CVC)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCvc(String cvc) {
this.cvc = cvc;
}
public PaymentMethodGeneralRequest contractId(String contractId) {
this.contractId = contractId;
return this;
}
/**
* Optional id sent to indicate the bank contract for recurrent card charges.
* @return contractId
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CONTRACT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getContractId() {
return contractId;
}
@JsonProperty(JSON_PROPERTY_CONTRACT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setContractId(String contractId) {
this.contractId = contractId;
}
public PaymentMethodGeneralRequest customerIpAddress(String customerIpAddress) {
this.customerIpAddress = customerIpAddress;
return this;
}
/**
* Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes
* @return customerIpAddress
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CUSTOMER_IP_ADDRESS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCustomerIpAddress() {
return customerIpAddress;
}
@JsonProperty(JSON_PROPERTY_CUSTOMER_IP_ADDRESS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCustomerIpAddress(String customerIpAddress) {
this.customerIpAddress = customerIpAddress;
}
/**
* Return true if this payment_method_general_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;
}
PaymentMethodGeneralRequest paymentMethodGeneralRequest = (PaymentMethodGeneralRequest) o;
return Objects.equals(this.expiresAt, paymentMethodGeneralRequest.expiresAt) &&
Objects.equals(this.monthlyInstallments, paymentMethodGeneralRequest.monthlyInstallments) &&
Objects.equals(this.type, paymentMethodGeneralRequest.type) &&
Objects.equals(this.tokenId, paymentMethodGeneralRequest.tokenId) &&
Objects.equals(this.paymentSourceId, paymentMethodGeneralRequest.paymentSourceId) &&
Objects.equals(this.cvc, paymentMethodGeneralRequest.cvc) &&
Objects.equals(this.contractId, paymentMethodGeneralRequest.contractId) &&
Objects.equals(this.customerIpAddress, paymentMethodGeneralRequest.customerIpAddress);
}
@Override
public int hashCode() {
return Objects.hash(expiresAt, monthlyInstallments, type, tokenId, paymentSourceId, cvc, contractId, customerIpAddress);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PaymentMethodGeneralRequest {\n");
sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n");
sb.append(" monthlyInstallments: ").append(toIndentedString(monthlyInstallments)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" tokenId: ").append(toIndentedString(tokenId)).append("\n");
sb.append(" paymentSourceId: ").append(toIndentedString(paymentSourceId)).append("\n");
sb.append(" cvc: ").append(toIndentedString(cvc)).append("\n");
sb.append(" contractId: ").append(toIndentedString(contractId)).append("\n");
sb.append(" customerIpAddress: ").append(toIndentedString(customerIpAddress)).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 ");
}
}