org.openapitools.client.model.SubscriptionTermPatchRequest 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 org.openapitools.client.model.FlexibleBillingDocumentSettings;
import org.openapitools.client.model.StartOn;
import org.openapitools.client.model.Term;
import org.openapitools.jackson.nullable.JsonNullable;
import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
* Term information of the subscription.
*/
@ApiModel(description = "Term information of the subscription.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class SubscriptionTermPatchRequest {
public static final String SERIALIZED_NAME_CURRENT_TERM = "current_term";
@SerializedName(SERIALIZED_NAME_CURRENT_TERM)
private Term currentTerm;
public static final String SERIALIZED_NAME_RENEWAL_TERM = "renewal_term";
@SerializedName(SERIALIZED_NAME_RENEWAL_TERM)
private Term renewalTerm;
public static final String SERIALIZED_NAME_AUTO_RENEW = "auto_renew";
@SerializedName(SERIALIZED_NAME_AUTO_RENEW)
private Boolean autoRenew;
public static final String SERIALIZED_NAME_START_ON = "start_on";
@SerializedName(SERIALIZED_NAME_START_ON)
private StartOn startOn;
public static final String SERIALIZED_NAME_BILL_TO_ID = "bill_to_id";
@SerializedName(SERIALIZED_NAME_BILL_TO_ID)
@JsonAdapter(NullableFieldAdapter.class)
private String billToId;
public static final String SERIALIZED_NAME_PAYMENT_TERMS = "payment_terms";
@SerializedName(SERIALIZED_NAME_PAYMENT_TERMS)
@JsonAdapter(NullableFieldAdapter.class)
private String paymentTerms;
public static final String SERIALIZED_NAME_BILLING_DOCUMENT_SETTINGS = "billing_document_settings";
@SerializedName(SERIALIZED_NAME_BILLING_DOCUMENT_SETTINGS)
private FlexibleBillingDocumentSettings billingDocumentSettings;
public static final String SERIALIZED_NAME_SOLD_TO_ID = "sold_to_id";
@SerializedName(SERIALIZED_NAME_SOLD_TO_ID)
@JsonAdapter(NullableFieldAdapter.class)
private String soldToId;
public static final String SERIALIZED_NAME_CHANGE_REASON = "change_reason";
@SerializedName(SERIALIZED_NAME_CHANGE_REASON)
private String changeReason;
public SubscriptionTermPatchRequest() {
}
public SubscriptionTermPatchRequest currentTerm(Term currentTerm) {
this.currentTerm = currentTerm;
return this;
}
/**
* Current term information for the subscription.
* @return currentTerm
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Current term information for the subscription.")
public Term getCurrentTerm() {
return currentTerm;
}
public void setCurrentTerm(Term currentTerm) {
this.currentTerm = currentTerm;
}
public SubscriptionTermPatchRequest renewalTerm(Term renewalTerm) {
this.renewalTerm = renewalTerm;
return this;
}
/**
* Renewal term information for the subscription.
* @return renewalTerm
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Renewal term information for the subscription.")
public Term getRenewalTerm() {
return renewalTerm;
}
public void setRenewalTerm(Term renewalTerm) {
this.renewalTerm = renewalTerm;
}
public SubscriptionTermPatchRequest autoRenew(Boolean autoRenew) {
this.autoRenew = autoRenew;
return this;
}
/**
* If true, the subscription automatically renews at the end of the current term.
* @return autoRenew
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "If true, the subscription automatically renews at the end of the current term.")
public Boolean getAutoRenew() {
return autoRenew;
}
public void setAutoRenew(Boolean autoRenew) {
this.autoRenew = autoRenew;
}
public SubscriptionTermPatchRequest startOn(StartOn startOn) {
this.startOn = startOn;
return this;
}
/**
* Get startOn
* @return startOn
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public StartOn getStartOn() {
return startOn;
}
public void setStartOn(StartOn startOn) {
this.startOn = startOn;
}
public SubscriptionTermPatchRequest billToId(String billToId) {
this.billToId = billToId;
return this;
}
/**
* ID of the bill-to contact.
* @return billToId
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "2c92c0f86a8dd422016a9e7a70116b0d", value = "ID of the bill-to contact.")
public String getBillToId() {
return billToId;
}
public void setBillToId(String billToId) {
this.billToId = billToId;
}
public SubscriptionTermPatchRequest paymentTerms(String paymentTerms) {
this.paymentTerms = paymentTerms;
return this;
}
/**
* The name of payment term associated with the invoice.
* @return paymentTerms
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The name of payment term associated with the invoice.")
public String getPaymentTerms() {
return paymentTerms;
}
public void setPaymentTerms(String paymentTerms) {
this.paymentTerms = paymentTerms;
}
public SubscriptionTermPatchRequest billingDocumentSettings(FlexibleBillingDocumentSettings billingDocumentSettings) {
this.billingDocumentSettings = billingDocumentSettings;
return this;
}
/**
* The billing document settings for the customer.
* @return billingDocumentSettings
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The billing document settings for the customer.")
public FlexibleBillingDocumentSettings getBillingDocumentSettings() {
return billingDocumentSettings;
}
public void setBillingDocumentSettings(FlexibleBillingDocumentSettings billingDocumentSettings) {
this.billingDocumentSettings = billingDocumentSettings;
}
public SubscriptionTermPatchRequest soldToId(String soldToId) {
this.soldToId = soldToId;
return this;
}
/**
* ID of the sold-to contact.
* @return soldToId
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "2c92c0f86a8dd422016a9e7a70116b0d", value = "ID of the sold-to contact.")
public String getSoldToId() {
return soldToId;
}
public void setSoldToId(String soldToId) {
this.soldToId = soldToId;
}
public SubscriptionTermPatchRequest 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;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SubscriptionTermPatchRequest subscriptionTermPatchRequest = (SubscriptionTermPatchRequest) o;
return Objects.equals(this.currentTerm, subscriptionTermPatchRequest.currentTerm) &&
Objects.equals(this.renewalTerm, subscriptionTermPatchRequest.renewalTerm) &&
Objects.equals(this.autoRenew, subscriptionTermPatchRequest.autoRenew) &&
Objects.equals(this.startOn, subscriptionTermPatchRequest.startOn) &&
Objects.equals(this.billToId, subscriptionTermPatchRequest.billToId) &&
Objects.equals(this.paymentTerms, subscriptionTermPatchRequest.paymentTerms) &&
Objects.equals(this.billingDocumentSettings, subscriptionTermPatchRequest.billingDocumentSettings) &&
Objects.equals(this.soldToId, subscriptionTermPatchRequest.soldToId) &&
Objects.equals(this.changeReason, subscriptionTermPatchRequest.changeReason);
}
private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
}
@Override
public int hashCode() {
return Objects.hash(currentTerm, renewalTerm, autoRenew, startOn, billToId, paymentTerms, billingDocumentSettings, soldToId, changeReason);
}
private static int hashCodeNullable(JsonNullable a) {
if (a == null) {
return 1;
}
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SubscriptionTermPatchRequest {\n");
sb.append(" currentTerm: ").append(toIndentedString(currentTerm)).append("\n");
sb.append(" renewalTerm: ").append(toIndentedString(renewalTerm)).append("\n");
sb.append(" autoRenew: ").append(toIndentedString(autoRenew)).append("\n");
sb.append(" startOn: ").append(toIndentedString(startOn)).append("\n");
sb.append(" billToId: ").append(toIndentedString(billToId)).append("\n");
sb.append(" paymentTerms: ").append(toIndentedString(paymentTerms)).append("\n");
sb.append(" billingDocumentSettings: ").append(toIndentedString(billingDocumentSettings)).append("\n");
sb.append(" soldToId: ").append(toIndentedString(soldToId)).append("\n");
sb.append(" changeReason: ").append(toIndentedString(changeReason)).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