org.openapitools.client.model.ResumeSubscriptionRequest 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.util.HashMap;
import java.util.List;
import java.util.Map;
import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
* Behavior of the paused subscription when it resumes.
*/
@ApiModel(description = "Behavior of the paused subscription when it resumes.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ResumeSubscriptionRequest {
public static final String SERIALIZED_NAME_EXTEND_TERM = "extend_term";
@SerializedName(SERIALIZED_NAME_EXTEND_TERM)
private Boolean extendTerm = false;
public static final String SERIALIZED_NAME_RESUME_DATE = "resume_date";
@SerializedName(SERIALIZED_NAME_RESUME_DATE)
private String resumeDate;
/**
* You can use this field to resume a paused subscription from the pause date.
*/
@JsonAdapter(ResumeAtEnum.Adapter.class)
public enum ResumeAtEnum {
PAUSE_DATE("pause_date"),
UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
private String value;
ResumeAtEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static ResumeAtEnum fromValue(String value) {
for (ResumeAtEnum b : ResumeAtEnum.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 ResumeAtEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public ResumeAtEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return ResumeAtEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_RESUME_AT = "resume_at";
@SerializedName(SERIALIZED_NAME_RESUME_AT)
private ResumeAtEnum resumeAt;
public static final String SERIALIZED_NAME_CHANGE_REASON = "change_reason";
@SerializedName(SERIALIZED_NAME_CHANGE_REASON)
private String changeReason;
public static final String SERIALIZED_NAME_CUSTOM_FIELDS = "custom_fields";
@SerializedName(SERIALIZED_NAME_CUSTOM_FIELDS)
@JsonAdapter(CustomFieldAdapter.class)
private Map customFields = null;
public ResumeSubscriptionRequest() {
}
public ResumeSubscriptionRequest extendTerm(Boolean extendTerm) {
this.extendTerm = extendTerm;
return this;
}
/**
* If this field is set to `true`, the subscription term is extended by the length of time the subscription is paused.
* @return extendTerm
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "If this field is set to `true`, the subscription term is extended by the length of time the subscription is paused.")
public Boolean getExtendTerm() {
return extendTerm;
}
public void setExtendTerm(Boolean extendTerm) {
this.extendTerm = extendTerm;
}
public ResumeSubscriptionRequest resumeDate(String resumeDate) {
this.resumeDate = resumeDate;
return this;
}
/**
* Date on which the paused subscription is resumed.
* @return resumeDate
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Date on which the paused subscription is resumed.")
public String getResumeDate() {
return resumeDate;
}
public void setResumeDate(String resumeDate) {
this.resumeDate = resumeDate;
}
public ResumeSubscriptionRequest resumeAt(ResumeAtEnum resumeAt) {
this.resumeAt = resumeAt;
return this;
}
/**
* You can use this field to resume a paused subscription from the pause date.
* @return resumeAt
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "You can use this field to resume a paused subscription from the pause date.")
public ResumeAtEnum getResumeAt() {
return resumeAt;
}
public void setResumeAt(ResumeAtEnum resumeAt) {
this.resumeAt = resumeAt;
}
public ResumeSubscriptionRequest 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 ResumeSubscriptionRequest customFields(Map customFields) {
this.customFields = customFields;
return this;
}
public ResumeSubscriptionRequest 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;
}
ResumeSubscriptionRequest resumeSubscriptionRequest = (ResumeSubscriptionRequest) o;
return Objects.equals(this.extendTerm, resumeSubscriptionRequest.extendTerm) &&
Objects.equals(this.resumeDate, resumeSubscriptionRequest.resumeDate) &&
Objects.equals(this.resumeAt, resumeSubscriptionRequest.resumeAt) &&
Objects.equals(this.changeReason, resumeSubscriptionRequest.changeReason) &&
Objects.equals(this.customFields, resumeSubscriptionRequest.customFields);
}
@Override
public int hashCode() {
return Objects.hash(extendTerm, resumeDate, resumeAt, changeReason, customFields);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ResumeSubscriptionRequest {\n");
sb.append(" extendTerm: ").append(toIndentedString(extendTerm)).append("\n");
sb.append(" resumeDate: ").append(toIndentedString(resumeDate)).append("\n");
sb.append(" resumeAt: ").append(toIndentedString(resumeAt)).append("\n");
sb.append(" changeReason: ").append(toIndentedString(changeReason)).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