com.conekta.model.SubscriptionResponse 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;
/**
* subscription model
*/
@JsonPropertyOrder({
SubscriptionResponse.JSON_PROPERTY_BILLING_CYCLE_START,
SubscriptionResponse.JSON_PROPERTY_BILLING_CYCLE_END,
SubscriptionResponse.JSON_PROPERTY_CANCELED_AT,
SubscriptionResponse.JSON_PROPERTY_CANCELED_REASON,
SubscriptionResponse.JSON_PROPERTY_CARD_ID,
SubscriptionResponse.JSON_PROPERTY_CHARGE_ID,
SubscriptionResponse.JSON_PROPERTY_CREATED_AT,
SubscriptionResponse.JSON_PROPERTY_CUSTOMER_CUSTOM_REFERENCE,
SubscriptionResponse.JSON_PROPERTY_CUSTOMER_ID,
SubscriptionResponse.JSON_PROPERTY_ID,
SubscriptionResponse.JSON_PROPERTY_LAST_BILLING_CYCLE_ORDER_ID,
SubscriptionResponse.JSON_PROPERTY_OBJECT,
SubscriptionResponse.JSON_PROPERTY_PAUSED_AT,
SubscriptionResponse.JSON_PROPERTY_PLAN_ID,
SubscriptionResponse.JSON_PROPERTY_STATUS,
SubscriptionResponse.JSON_PROPERTY_SUBSCRIPTION_START,
SubscriptionResponse.JSON_PROPERTY_TRIAL_START,
SubscriptionResponse.JSON_PROPERTY_TRIAL_END
})
@JsonTypeName("subscription_response")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0")
public class SubscriptionResponse {
public static final String JSON_PROPERTY_BILLING_CYCLE_START = "billing_cycle_start";
private Long billingCycleStart;
public static final String JSON_PROPERTY_BILLING_CYCLE_END = "billing_cycle_end";
private Long billingCycleEnd;
public static final String JSON_PROPERTY_CANCELED_AT = "canceled_at";
private Long canceledAt;
public static final String JSON_PROPERTY_CANCELED_REASON = "canceled_reason";
private String canceledReason;
public static final String JSON_PROPERTY_CARD_ID = "card_id";
private String cardId;
public static final String JSON_PROPERTY_CHARGE_ID = "charge_id";
private String chargeId;
public static final String JSON_PROPERTY_CREATED_AT = "created_at";
private Long createdAt;
public static final String JSON_PROPERTY_CUSTOMER_CUSTOM_REFERENCE = "customer_custom_reference";
private String customerCustomReference;
public static final String JSON_PROPERTY_CUSTOMER_ID = "customer_id";
private String customerId;
public static final String JSON_PROPERTY_ID = "id";
private String id;
public static final String JSON_PROPERTY_LAST_BILLING_CYCLE_ORDER_ID = "last_billing_cycle_order_id";
private String lastBillingCycleOrderId;
public static final String JSON_PROPERTY_OBJECT = "object";
private String _object;
public static final String JSON_PROPERTY_PAUSED_AT = "paused_at";
private Long pausedAt;
public static final String JSON_PROPERTY_PLAN_ID = "plan_id";
private String planId;
public static final String JSON_PROPERTY_STATUS = "status";
private String status;
public static final String JSON_PROPERTY_SUBSCRIPTION_START = "subscription_start";
private Integer subscriptionStart;
public static final String JSON_PROPERTY_TRIAL_START = "trial_start";
private Long trialStart;
public static final String JSON_PROPERTY_TRIAL_END = "trial_end";
private Long trialEnd;
public SubscriptionResponse() {
}
public SubscriptionResponse billingCycleStart(Long billingCycleStart) {
this.billingCycleStart = billingCycleStart;
return this;
}
/**
* Get billingCycleStart
* @return billingCycleStart
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_BILLING_CYCLE_START)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getBillingCycleStart() {
return billingCycleStart;
}
@JsonProperty(JSON_PROPERTY_BILLING_CYCLE_START)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBillingCycleStart(Long billingCycleStart) {
this.billingCycleStart = billingCycleStart;
}
public SubscriptionResponse billingCycleEnd(Long billingCycleEnd) {
this.billingCycleEnd = billingCycleEnd;
return this;
}
/**
* Get billingCycleEnd
* @return billingCycleEnd
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_BILLING_CYCLE_END)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getBillingCycleEnd() {
return billingCycleEnd;
}
@JsonProperty(JSON_PROPERTY_BILLING_CYCLE_END)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBillingCycleEnd(Long billingCycleEnd) {
this.billingCycleEnd = billingCycleEnd;
}
public SubscriptionResponse canceledAt(Long canceledAt) {
this.canceledAt = canceledAt;
return this;
}
/**
* Get canceledAt
* @return canceledAt
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CANCELED_AT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getCanceledAt() {
return canceledAt;
}
@JsonProperty(JSON_PROPERTY_CANCELED_AT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCanceledAt(Long canceledAt) {
this.canceledAt = canceledAt;
}
public SubscriptionResponse canceledReason(String canceledReason) {
this.canceledReason = canceledReason;
return this;
}
/**
* Reason for cancellation. This field appears when the subscription status is 'canceled'.
* @return canceledReason
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CANCELED_REASON)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCanceledReason() {
return canceledReason;
}
@JsonProperty(JSON_PROPERTY_CANCELED_REASON)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCanceledReason(String canceledReason) {
this.canceledReason = canceledReason;
}
public SubscriptionResponse cardId(String cardId) {
this.cardId = cardId;
return this;
}
/**
* Get cardId
* @return cardId
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CARD_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCardId() {
return cardId;
}
@JsonProperty(JSON_PROPERTY_CARD_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCardId(String cardId) {
this.cardId = cardId;
}
public SubscriptionResponse chargeId(String chargeId) {
this.chargeId = chargeId;
return this;
}
/**
* Get chargeId
* @return chargeId
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CHARGE_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getChargeId() {
return chargeId;
}
@JsonProperty(JSON_PROPERTY_CHARGE_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setChargeId(String chargeId) {
this.chargeId = chargeId;
}
public SubscriptionResponse 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 SubscriptionResponse customerCustomReference(String customerCustomReference) {
this.customerCustomReference = customerCustomReference;
return this;
}
/**
* Get customerCustomReference
* @return customerCustomReference
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CUSTOMER_CUSTOM_REFERENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCustomerCustomReference() {
return customerCustomReference;
}
@JsonProperty(JSON_PROPERTY_CUSTOMER_CUSTOM_REFERENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCustomerCustomReference(String customerCustomReference) {
this.customerCustomReference = customerCustomReference;
}
public SubscriptionResponse customerId(String customerId) {
this.customerId = customerId;
return this;
}
/**
* Get customerId
* @return customerId
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CUSTOMER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCustomerId() {
return customerId;
}
@JsonProperty(JSON_PROPERTY_CUSTOMER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCustomerId(String customerId) {
this.customerId = customerId;
}
public SubscriptionResponse 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 SubscriptionResponse lastBillingCycleOrderId(String lastBillingCycleOrderId) {
this.lastBillingCycleOrderId = lastBillingCycleOrderId;
return this;
}
/**
* Get lastBillingCycleOrderId
* @return lastBillingCycleOrderId
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_LAST_BILLING_CYCLE_ORDER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getLastBillingCycleOrderId() {
return lastBillingCycleOrderId;
}
@JsonProperty(JSON_PROPERTY_LAST_BILLING_CYCLE_ORDER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLastBillingCycleOrderId(String lastBillingCycleOrderId) {
this.lastBillingCycleOrderId = lastBillingCycleOrderId;
}
public SubscriptionResponse _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 SubscriptionResponse pausedAt(Long pausedAt) {
this.pausedAt = pausedAt;
return this;
}
/**
* Get pausedAt
* @return pausedAt
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PAUSED_AT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getPausedAt() {
return pausedAt;
}
@JsonProperty(JSON_PROPERTY_PAUSED_AT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPausedAt(Long pausedAt) {
this.pausedAt = pausedAt;
}
public SubscriptionResponse planId(String planId) {
this.planId = planId;
return this;
}
/**
* Get planId
* @return planId
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PLAN_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPlanId() {
return planId;
}
@JsonProperty(JSON_PROPERTY_PLAN_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPlanId(String planId) {
this.planId = planId;
}
public SubscriptionResponse status(String status) {
this.status = status;
return this;
}
/**
* Get status
* @return status
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getStatus() {
return status;
}
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStatus(String status) {
this.status = status;
}
public SubscriptionResponse subscriptionStart(Integer subscriptionStart) {
this.subscriptionStart = subscriptionStart;
return this;
}
/**
* Get subscriptionStart
* @return subscriptionStart
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SUBSCRIPTION_START)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getSubscriptionStart() {
return subscriptionStart;
}
@JsonProperty(JSON_PROPERTY_SUBSCRIPTION_START)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSubscriptionStart(Integer subscriptionStart) {
this.subscriptionStart = subscriptionStart;
}
public SubscriptionResponse trialStart(Long trialStart) {
this.trialStart = trialStart;
return this;
}
/**
* Get trialStart
* @return trialStart
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TRIAL_START)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getTrialStart() {
return trialStart;
}
@JsonProperty(JSON_PROPERTY_TRIAL_START)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTrialStart(Long trialStart) {
this.trialStart = trialStart;
}
public SubscriptionResponse trialEnd(Long trialEnd) {
this.trialEnd = trialEnd;
return this;
}
/**
* Get trialEnd
* @return trialEnd
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TRIAL_END)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getTrialEnd() {
return trialEnd;
}
@JsonProperty(JSON_PROPERTY_TRIAL_END)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTrialEnd(Long trialEnd) {
this.trialEnd = trialEnd;
}
/**
* Return true if this subscription_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;
}
SubscriptionResponse subscriptionResponse = (SubscriptionResponse) o;
return Objects.equals(this.billingCycleStart, subscriptionResponse.billingCycleStart) &&
Objects.equals(this.billingCycleEnd, subscriptionResponse.billingCycleEnd) &&
Objects.equals(this.canceledAt, subscriptionResponse.canceledAt) &&
Objects.equals(this.canceledReason, subscriptionResponse.canceledReason) &&
Objects.equals(this.cardId, subscriptionResponse.cardId) &&
Objects.equals(this.chargeId, subscriptionResponse.chargeId) &&
Objects.equals(this.createdAt, subscriptionResponse.createdAt) &&
Objects.equals(this.customerCustomReference, subscriptionResponse.customerCustomReference) &&
Objects.equals(this.customerId, subscriptionResponse.customerId) &&
Objects.equals(this.id, subscriptionResponse.id) &&
Objects.equals(this.lastBillingCycleOrderId, subscriptionResponse.lastBillingCycleOrderId) &&
Objects.equals(this._object, subscriptionResponse._object) &&
Objects.equals(this.pausedAt, subscriptionResponse.pausedAt) &&
Objects.equals(this.planId, subscriptionResponse.planId) &&
Objects.equals(this.status, subscriptionResponse.status) &&
Objects.equals(this.subscriptionStart, subscriptionResponse.subscriptionStart) &&
Objects.equals(this.trialStart, subscriptionResponse.trialStart) &&
Objects.equals(this.trialEnd, subscriptionResponse.trialEnd);
}
@Override
public int hashCode() {
return Objects.hash(billingCycleStart, billingCycleEnd, canceledAt, canceledReason, cardId, chargeId, createdAt, customerCustomReference, customerId, id, lastBillingCycleOrderId, _object, pausedAt, planId, status, subscriptionStart, trialStart, trialEnd);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SubscriptionResponse {\n");
sb.append(" billingCycleStart: ").append(toIndentedString(billingCycleStart)).append("\n");
sb.append(" billingCycleEnd: ").append(toIndentedString(billingCycleEnd)).append("\n");
sb.append(" canceledAt: ").append(toIndentedString(canceledAt)).append("\n");
sb.append(" canceledReason: ").append(toIndentedString(canceledReason)).append("\n");
sb.append(" cardId: ").append(toIndentedString(cardId)).append("\n");
sb.append(" chargeId: ").append(toIndentedString(chargeId)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" customerCustomReference: ").append(toIndentedString(customerCustomReference)).append("\n");
sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" lastBillingCycleOrderId: ").append(toIndentedString(lastBillingCycleOrderId)).append("\n");
sb.append(" _object: ").append(toIndentedString(_object)).append("\n");
sb.append(" pausedAt: ").append(toIndentedString(pausedAt)).append("\n");
sb.append(" planId: ").append(toIndentedString(planId)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" subscriptionStart: ").append(toIndentedString(subscriptionStart)).append("\n");
sb.append(" trialStart: ").append(toIndentedString(trialStart)).append("\n");
sb.append(" trialEnd: ").append(toIndentedString(trialEnd)).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 ");
}
}