com.conekta.model.PlanResponse 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;
/**
* plans model
*/
@JsonPropertyOrder({
PlanResponse.JSON_PROPERTY_AMOUNT,
PlanResponse.JSON_PROPERTY_CREATED_AT,
PlanResponse.JSON_PROPERTY_CURRENCY,
PlanResponse.JSON_PROPERTY_EXPIRY_COUNT,
PlanResponse.JSON_PROPERTY_FREQUENCY,
PlanResponse.JSON_PROPERTY_ID,
PlanResponse.JSON_PROPERTY_INTERVAL,
PlanResponse.JSON_PROPERTY_LIVEMODE,
PlanResponse.JSON_PROPERTY_NAME,
PlanResponse.JSON_PROPERTY_OBJECT,
PlanResponse.JSON_PROPERTY_TRIAL_PERIOD_DAYS
})
@JsonTypeName("plan_response")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0")
public class PlanResponse {
public static final String JSON_PROPERTY_AMOUNT = "amount";
private Integer amount;
public static final String JSON_PROPERTY_CREATED_AT = "created_at";
private Long createdAt;
public static final String JSON_PROPERTY_CURRENCY = "currency";
private String currency;
public static final String JSON_PROPERTY_EXPIRY_COUNT = "expiry_count";
private Integer expiryCount;
public static final String JSON_PROPERTY_FREQUENCY = "frequency";
private Integer frequency;
public static final String JSON_PROPERTY_ID = "id";
private String id;
public static final String JSON_PROPERTY_INTERVAL = "interval";
private String interval;
public static final String JSON_PROPERTY_LIVEMODE = "livemode";
private Boolean livemode;
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public static final String JSON_PROPERTY_OBJECT = "object";
private String _object;
public static final String JSON_PROPERTY_TRIAL_PERIOD_DAYS = "trial_period_days";
private Integer trialPeriodDays;
public PlanResponse() {
}
public PlanResponse amount(Integer amount) {
this.amount = amount;
return this;
}
/**
* Get amount
* @return amount
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_AMOUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getAmount() {
return amount;
}
@JsonProperty(JSON_PROPERTY_AMOUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAmount(Integer amount) {
this.amount = amount;
}
public PlanResponse createdAt(Long createdAt) {
this.createdAt = createdAt;
return this;
}
/**
* Get createdAt
* @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 PlanResponse currency(String currency) {
this.currency = currency;
return this;
}
/**
* Get currency
* @return currency
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CURRENCY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCurrency() {
return currency;
}
@JsonProperty(JSON_PROPERTY_CURRENCY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCurrency(String currency) {
this.currency = currency;
}
public PlanResponse expiryCount(Integer expiryCount) {
this.expiryCount = expiryCount;
return this;
}
/**
* Get expiryCount
* @return expiryCount
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_EXPIRY_COUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getExpiryCount() {
return expiryCount;
}
@JsonProperty(JSON_PROPERTY_EXPIRY_COUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setExpiryCount(Integer expiryCount) {
this.expiryCount = expiryCount;
}
public PlanResponse frequency(Integer frequency) {
this.frequency = frequency;
return this;
}
/**
* Get frequency
* @return frequency
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_FREQUENCY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getFrequency() {
return frequency;
}
@JsonProperty(JSON_PROPERTY_FREQUENCY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setFrequency(Integer frequency) {
this.frequency = frequency;
}
public PlanResponse id(String id) {
this.id = id;
return this;
}
/**
* Get id
* @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 PlanResponse interval(String interval) {
this.interval = interval;
return this;
}
/**
* Get interval
* @return interval
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_INTERVAL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getInterval() {
return interval;
}
@JsonProperty(JSON_PROPERTY_INTERVAL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setInterval(String interval) {
this.interval = interval;
}
public PlanResponse livemode(Boolean livemode) {
this.livemode = livemode;
return this;
}
/**
* Get livemode
* @return livemode
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_LIVEMODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getLivemode() {
return livemode;
}
@JsonProperty(JSON_PROPERTY_LIVEMODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLivemode(Boolean livemode) {
this.livemode = livemode;
}
public PlanResponse name(String name) {
this.name = name;
return this;
}
/**
* Get 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 PlanResponse _object(String _object) {
this._object = _object;
return this;
}
/**
* Get _object
* @return _object
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_OBJECT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getObject() {
return _object;
}
@JsonProperty(JSON_PROPERTY_OBJECT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setObject(String _object) {
this._object = _object;
}
public PlanResponse trialPeriodDays(Integer trialPeriodDays) {
this.trialPeriodDays = trialPeriodDays;
return this;
}
/**
* Get trialPeriodDays
* @return trialPeriodDays
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TRIAL_PERIOD_DAYS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getTrialPeriodDays() {
return trialPeriodDays;
}
@JsonProperty(JSON_PROPERTY_TRIAL_PERIOD_DAYS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTrialPeriodDays(Integer trialPeriodDays) {
this.trialPeriodDays = trialPeriodDays;
}
/**
* Return true if this plan_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;
}
PlanResponse planResponse = (PlanResponse) o;
return Objects.equals(this.amount, planResponse.amount) &&
Objects.equals(this.createdAt, planResponse.createdAt) &&
Objects.equals(this.currency, planResponse.currency) &&
Objects.equals(this.expiryCount, planResponse.expiryCount) &&
Objects.equals(this.frequency, planResponse.frequency) &&
Objects.equals(this.id, planResponse.id) &&
Objects.equals(this.interval, planResponse.interval) &&
Objects.equals(this.livemode, planResponse.livemode) &&
Objects.equals(this.name, planResponse.name) &&
Objects.equals(this._object, planResponse._object) &&
Objects.equals(this.trialPeriodDays, planResponse.trialPeriodDays);
}
@Override
public int hashCode() {
return Objects.hash(amount, createdAt, currency, expiryCount, frequency, id, interval, livemode, name, _object, trialPeriodDays);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PlanResponse {\n");
sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
sb.append(" expiryCount: ").append(toIndentedString(expiryCount)).append("\n");
sb.append(" frequency: ").append(toIndentedString(frequency)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" interval: ").append(toIndentedString(interval)).append("\n");
sb.append(" livemode: ").append(toIndentedString(livemode)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" _object: ").append(toIndentedString(_object)).append("\n");
sb.append(" trialPeriodDays: ").append(toIndentedString(trialPeriodDays)).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 ");
}
}