org.openapitools.client.model.SubscriptionPausePatchResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zuora-sdk-java Show documentation
Show all versions of zuora-sdk-java Show documentation
The SDK of JAVA language for Zuora pricing system
/*
* Quickstart API Reference
* Zuora Quickstart API is the API that helps you achieve fundamental use cases.
* It provides a much simplified object model and improved performance, enabling developers to easily learn and use.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.openapitools.client.model.ResumeSubscriptionRequest;
import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
* Specify this field if you want to pause a subscription.
*/
@ApiModel(description = "Specify this field if you want to pause a subscription.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class SubscriptionPausePatchResponse {
public static final String SERIALIZED_NAME_PAUSE_DATE = "pause_date";
@SerializedName(SERIALIZED_NAME_PAUSE_DATE)
private String pauseDate;
/**
* Can be either the end of the current billing period or a specific date.
*/
@JsonAdapter(PauseAtEnum.Adapter.class)
public enum PauseAtEnum {
INVOICE_PERIOD_END("invoice_period_end"),
UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
private String value;
PauseAtEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static PauseAtEnum fromValue(String value) {
for (PauseAtEnum b : PauseAtEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final PauseAtEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public PauseAtEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return PauseAtEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_PAUSE_AT = "pause_at";
@SerializedName(SERIALIZED_NAME_PAUSE_AT)
private PauseAtEnum pauseAt;
public static final String SERIALIZED_NAME_PAUSE_INTERVAL_COUNT = "pause_interval_count";
@SerializedName(SERIALIZED_NAME_PAUSE_INTERVAL_COUNT)
private BigDecimal pauseIntervalCount;
/**
* Unit in which the pause duration is defined. One of day, week, month or year.
*/
@JsonAdapter(PauseIntervalEnum.Adapter.class)
public enum PauseIntervalEnum {
MONTH("month"),
DAY("day"),
YEAR("year"),
WEEK("week"),
UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
private String value;
PauseIntervalEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static PauseIntervalEnum fromValue(String value) {
for (PauseIntervalEnum b : PauseIntervalEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final PauseIntervalEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public PauseIntervalEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return PauseIntervalEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_PAUSE_INTERVAL = "pause_interval";
@SerializedName(SERIALIZED_NAME_PAUSE_INTERVAL)
private PauseIntervalEnum pauseInterval;
public static final String SERIALIZED_NAME_CHANGE_REASON = "change_reason";
@SerializedName(SERIALIZED_NAME_CHANGE_REASON)
private String changeReason;
public static final String SERIALIZED_NAME_RESUME_BEHAVIOR = "resume_behavior";
@SerializedName(SERIALIZED_NAME_RESUME_BEHAVIOR)
private ResumeSubscriptionRequest resumeBehavior;
public static final String SERIALIZED_NAME_CUSTOM_FIELDS = "custom_fields";
@SerializedName(SERIALIZED_NAME_CUSTOM_FIELDS)
@JsonAdapter(CustomFieldAdapter.class)
private Map customFields = null;
public SubscriptionPausePatchResponse() {
}
public SubscriptionPausePatchResponse pauseDate(String pauseDate) {
this.pauseDate = pauseDate;
return this;
}
/**
* Date on which the subscription is paused.
* @return pauseDate
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Date on which the subscription is paused.")
public String getPauseDate() {
return pauseDate;
}
public void setPauseDate(String pauseDate) {
this.pauseDate = pauseDate;
}
public SubscriptionPausePatchResponse pauseAt(PauseAtEnum pauseAt) {
this.pauseAt = pauseAt;
return this;
}
/**
* Can be either the end of the current billing period or a specific date.
* @return pauseAt
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Can be either the end of the current billing period or a specific date.")
public PauseAtEnum getPauseAt() {
return pauseAt;
}
public void setPauseAt(PauseAtEnum pauseAt) {
this.pauseAt = pauseAt;
}
public SubscriptionPausePatchResponse pauseIntervalCount(BigDecimal pauseIntervalCount) {
this.pauseIntervalCount = pauseIntervalCount;
return this;
}
/**
* The number of intervals in a duration where the subscription is paused. For example, pause_interval=year and pause_interval_count=1 represents a 1-year pause.
* @return pauseIntervalCount
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The number of intervals in a duration where the subscription is paused. For example, pause_interval=year and pause_interval_count=1 represents a 1-year pause.")
public BigDecimal getPauseIntervalCount() {
return pauseIntervalCount;
}
public void setPauseIntervalCount(BigDecimal pauseIntervalCount) {
this.pauseIntervalCount = pauseIntervalCount;
}
public SubscriptionPausePatchResponse pauseInterval(PauseIntervalEnum pauseInterval) {
this.pauseInterval = pauseInterval;
return this;
}
/**
* Unit in which the pause duration is defined. One of day, week, month or year.
* @return pauseInterval
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Unit in which the pause duration is defined. One of day, week, month or year.")
public PauseIntervalEnum getPauseInterval() {
return pauseInterval;
}
public void setPauseInterval(PauseIntervalEnum pauseInterval) {
this.pauseInterval = pauseInterval;
}
public SubscriptionPausePatchResponse changeReason(String changeReason) {
this.changeReason = changeReason;
return this;
}
/**
* A brief description of the reason for this change.
* @return changeReason
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "A brief description of the reason for this change.")
public String getChangeReason() {
return changeReason;
}
public void setChangeReason(String changeReason) {
this.changeReason = changeReason;
}
public SubscriptionPausePatchResponse resumeBehavior(ResumeSubscriptionRequest resumeBehavior) {
this.resumeBehavior = resumeBehavior;
return this;
}
/**
* Get resumeBehavior
* @return resumeBehavior
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public ResumeSubscriptionRequest getResumeBehavior() {
return resumeBehavior;
}
public void setResumeBehavior(ResumeSubscriptionRequest resumeBehavior) {
this.resumeBehavior = resumeBehavior;
}
public SubscriptionPausePatchResponse customFields(Map customFields) {
this.customFields = customFields;
return this;
}
public SubscriptionPausePatchResponse putCustomFieldsItem(String key, String customFieldsItem) {
if (this.customFields == null) {
this.customFields = new HashMap();
}
this.customFields.put(key, customFieldsItem);
return this;
}
/**
* Set of user-defined fields associated with this object. Useful for storing additional information about the object in a structured format.
* @return customFields
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Set of user-defined fields associated with this object. Useful for storing additional information about the object in a structured format.")
public Map getCustomFields() {
return customFields;
}
public void setCustomFields(Map customFields) {
this.customFields = customFields;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SubscriptionPausePatchResponse subscriptionPausePatchResponse = (SubscriptionPausePatchResponse) o;
return Objects.equals(this.pauseDate, subscriptionPausePatchResponse.pauseDate) &&
Objects.equals(this.pauseAt, subscriptionPausePatchResponse.pauseAt) &&
Objects.equals(this.pauseIntervalCount, subscriptionPausePatchResponse.pauseIntervalCount) &&
Objects.equals(this.pauseInterval, subscriptionPausePatchResponse.pauseInterval) &&
Objects.equals(this.changeReason, subscriptionPausePatchResponse.changeReason) &&
Objects.equals(this.resumeBehavior, subscriptionPausePatchResponse.resumeBehavior) &&
Objects.equals(this.customFields, subscriptionPausePatchResponse.customFields);
}
@Override
public int hashCode() {
return Objects.hash(pauseDate, pauseAt, pauseIntervalCount, pauseInterval, changeReason, resumeBehavior, customFields);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SubscriptionPausePatchResponse {\n");
sb.append(" pauseDate: ").append(toIndentedString(pauseDate)).append("\n");
sb.append(" pauseAt: ").append(toIndentedString(pauseAt)).append("\n");
sb.append(" pauseIntervalCount: ").append(toIndentedString(pauseIntervalCount)).append("\n");
sb.append(" pauseInterval: ").append(toIndentedString(pauseInterval)).append("\n");
sb.append(" changeReason: ").append(toIndentedString(changeReason)).append("\n");
sb.append(" resumeBehavior: ").append(toIndentedString(resumeBehavior)).append("\n");
sb.append(" customFields: ").append(toIndentedString(customFields)).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 ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy