org.openapitools.client.model.SubscriptionPlanCreateRequest 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.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.openapitools.client.model.SubscriptionItemCreateRequest;
import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
* Subscription plan information.
*/
@ApiModel(description = "Subscription plan information.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class SubscriptionPlanCreateRequest {
public static final String SERIALIZED_NAME_PLAN_ID = "plan_id";
@SerializedName(SERIALIZED_NAME_PLAN_ID)
private String planId;
public static final String SERIALIZED_NAME_PLAN_NUMBER = "plan_number";
@SerializedName(SERIALIZED_NAME_PLAN_NUMBER)
private String planNumber;
public static final String SERIALIZED_NAME_PRICES = "prices";
@SerializedName(SERIALIZED_NAME_PRICES)
private List prices = null;
public static final String SERIALIZED_NAME_UNIQUE_TOKEN = "unique_token";
@SerializedName(SERIALIZED_NAME_UNIQUE_TOKEN)
private String uniqueToken;
public static final String SERIALIZED_NAME_CUSTOM_FIELDS = "custom_fields";
@SerializedName(SERIALIZED_NAME_CUSTOM_FIELDS)
@JsonAdapter(CustomFieldAdapter.class)
private Map customFields = null;
public SubscriptionPlanCreateRequest() {
}
public SubscriptionPlanCreateRequest planId(String planId) {
this.planId = planId;
return this;
}
/**
* Identifier of the plan associated with this subscription plan.
* @return planId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Identifier of the plan associated with this subscription plan.")
public String getPlanId() {
return planId;
}
public void setPlanId(String planId) {
this.planId = planId;
}
public SubscriptionPlanCreateRequest planNumber(String planNumber) {
this.planNumber = planNumber;
return this;
}
/**
* Human-readable identifier of the plan associated with this subscription plan.
* @return planNumber
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Human-readable identifier of the plan associated with this subscription plan.")
public String getPlanNumber() {
return planNumber;
}
public void setPlanNumber(String planNumber) {
this.planNumber = planNumber;
}
public SubscriptionPlanCreateRequest prices(List prices) {
this.prices = prices;
return this;
}
public SubscriptionPlanCreateRequest addPricesItem(SubscriptionItemCreateRequest pricesItem) {
if (this.prices == null) {
this.prices = new ArrayList();
}
this.prices.add(pricesItem);
return this;
}
/**
* Price information within the subscription plan.
* @return prices
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Price information within the subscription plan.")
public List getPrices() {
return prices;
}
public void setPrices(List prices) {
this.prices = prices;
}
public SubscriptionPlanCreateRequest uniqueToken(String uniqueToken) {
this.uniqueToken = uniqueToken;
return this;
}
/**
* Unique identifier for the subscription plan. This identifier enables you to refer to the subscription plan before the subscription plan has an internal identifier in Zuora.
* @return uniqueToken
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Unique identifier for the subscription plan. This identifier enables you to refer to the subscription plan before the subscription plan has an internal identifier in Zuora.")
public String getUniqueToken() {
return uniqueToken;
}
public void setUniqueToken(String uniqueToken) {
this.uniqueToken = uniqueToken;
}
public SubscriptionPlanCreateRequest customFields(Map customFields) {
this.customFields = customFields;
return this;
}
public SubscriptionPlanCreateRequest 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;
}
SubscriptionPlanCreateRequest subscriptionPlanCreateRequest = (SubscriptionPlanCreateRequest) o;
return Objects.equals(this.planId, subscriptionPlanCreateRequest.planId) &&
Objects.equals(this.planNumber, subscriptionPlanCreateRequest.planNumber) &&
Objects.equals(this.prices, subscriptionPlanCreateRequest.prices) &&
Objects.equals(this.uniqueToken, subscriptionPlanCreateRequest.uniqueToken) &&
Objects.equals(this.customFields, subscriptionPlanCreateRequest.customFields);
}
@Override
public int hashCode() {
return Objects.hash(planId, planNumber, prices, uniqueToken, customFields);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SubscriptionPlanCreateRequest {\n");
sb.append(" planId: ").append(toIndentedString(planId)).append("\n");
sb.append(" planNumber: ").append(toIndentedString(planNumber)).append("\n");
sb.append(" prices: ").append(toIndentedString(prices)).append("\n");
sb.append(" uniqueToken: ").append(toIndentedString(uniqueToken)).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