org.openapitools.client.model.UsageCreateRequest 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.threeten.bp.OffsetDateTime;
import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
* UsageCreateRequest
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class UsageCreateRequest {
public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "account_number";
@SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER)
private String accountNumber;
public static final String SERIALIZED_NAME_ACCOUNT_ID = "account_id";
@SerializedName(SERIALIZED_NAME_ACCOUNT_ID)
private String accountId;
public static final String SERIALIZED_NAME_SUBSCRIPTION_ITEM_ID = "subscription_item_id";
@SerializedName(SERIALIZED_NAME_SUBSCRIPTION_ITEM_ID)
private String subscriptionItemId;
public static final String SERIALIZED_NAME_SUBSCRIPTION_ITEM_NUMBER = "subscription_item_number";
@SerializedName(SERIALIZED_NAME_SUBSCRIPTION_ITEM_NUMBER)
private String subscriptionItemNumber;
public static final String SERIALIZED_NAME_DESCRIPTION = "description";
@SerializedName(SERIALIZED_NAME_DESCRIPTION)
private String description;
public static final String SERIALIZED_NAME_END_TIME = "end_time";
@SerializedName(SERIALIZED_NAME_END_TIME)
private OffsetDateTime endTime;
public static final String SERIALIZED_NAME_QUANTITY = "quantity";
@SerializedName(SERIALIZED_NAME_QUANTITY)
private BigDecimal quantity;
public static final String SERIALIZED_NAME_START_TIME = "start_time";
@SerializedName(SERIALIZED_NAME_START_TIME)
private OffsetDateTime startTime;
public static final String SERIALIZED_NAME_SUBSCRIPTION_ID = "subscription_id";
@SerializedName(SERIALIZED_NAME_SUBSCRIPTION_ID)
private String subscriptionId;
public static final String SERIALIZED_NAME_SUBSCRIPTION_NUMBER = "subscription_number";
@SerializedName(SERIALIZED_NAME_SUBSCRIPTION_NUMBER)
private String subscriptionNumber;
public static final String SERIALIZED_NAME_UNIT_OF_MEASURE = "unit_of_measure";
@SerializedName(SERIALIZED_NAME_UNIT_OF_MEASURE)
private String unitOfMeasure;
public static final String SERIALIZED_NAME_CUSTOM_FIELDS = "custom_fields";
@SerializedName(SERIALIZED_NAME_CUSTOM_FIELDS)
@JsonAdapter(CustomFieldAdapter.class)
private Map customFields = null;
public UsageCreateRequest() {
}
public UsageCreateRequest accountNumber(String accountNumber) {
this.accountNumber = accountNumber;
return this;
}
/**
* Human-readable identifier of the account. It can be user-supplied. Either `account_number` or `account_id` is required.
* @return accountNumber
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "A-100001", value = "Human-readable identifier of the account. It can be user-supplied. Either `account_number` or `account_id` is required.")
public String getAccountNumber() {
return accountNumber;
}
public void setAccountNumber(String accountNumber) {
this.accountNumber = accountNumber;
}
public UsageCreateRequest accountId(String accountId) {
this.accountId = accountId;
return this;
}
/**
* Identifier of the account associated with this subscription. Either `account_id` or `account_number` is required.
* @return accountId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Identifier of the account associated with this subscription. Either `account_id` or `account_number` is required.")
public String getAccountId() {
return accountId;
}
public void setAccountId(String accountId) {
this.accountId = accountId;
}
public UsageCreateRequest subscriptionItemId(String subscriptionItemId) {
this.subscriptionItemId = subscriptionItemId;
return this;
}
/**
* Identifier of the subscription item.
* @return subscriptionItemId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Identifier of the subscription item.")
public String getSubscriptionItemId() {
return subscriptionItemId;
}
public void setSubscriptionItemId(String subscriptionItemId) {
this.subscriptionItemId = subscriptionItemId;
}
public UsageCreateRequest subscriptionItemNumber(String subscriptionItemNumber) {
this.subscriptionItemNumber = subscriptionItemNumber;
return this;
}
/**
* Human-readable identifier of the subscription item.
* @return subscriptionItemNumber
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Human-readable identifier of the subscription item.")
public String getSubscriptionItemNumber() {
return subscriptionItemNumber;
}
public void setSubscriptionItemNumber(String subscriptionItemNumber) {
this.subscriptionItemNumber = subscriptionItemNumber;
}
public UsageCreateRequest description(String description) {
this.description = description;
return this;
}
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
* @return description
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "description of test account", value = "An arbitrary string attached to the object. Often useful for displaying to users.")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public UsageCreateRequest endTime(OffsetDateTime endTime) {
this.endTime = endTime;
return this;
}
/**
* The end time for which usage is recorded.
* @return endTime
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The end time for which usage is recorded.")
public OffsetDateTime getEndTime() {
return endTime;
}
public void setEndTime(OffsetDateTime endTime) {
this.endTime = endTime;
}
public UsageCreateRequest quantity(BigDecimal quantity) {
this.quantity = quantity;
return this;
}
/**
* The number of units of this item.
* @return quantity
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "The number of units of this item.")
public BigDecimal getQuantity() {
return quantity;
}
public void setQuantity(BigDecimal quantity) {
this.quantity = quantity;
}
public UsageCreateRequest startTime(OffsetDateTime startTime) {
this.startTime = startTime;
return this;
}
/**
* The start time for which usage is recorded.
* @return startTime
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "The start time for which usage is recorded.")
public OffsetDateTime getStartTime() {
return startTime;
}
public void setStartTime(OffsetDateTime startTime) {
this.startTime = startTime;
}
public UsageCreateRequest subscriptionId(String subscriptionId) {
this.subscriptionId = subscriptionId;
return this;
}
/**
* The identifier of the subscription associated with the billing document item.
* @return subscriptionId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The identifier of the subscription associated with the billing document item.")
public String getSubscriptionId() {
return subscriptionId;
}
public void setSubscriptionId(String subscriptionId) {
this.subscriptionId = subscriptionId;
}
public UsageCreateRequest subscriptionNumber(String subscriptionNumber) {
this.subscriptionNumber = subscriptionNumber;
return this;
}
/**
* Human-readable identifier of the subscription. It can be user-supplied.
* @return subscriptionNumber
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Human-readable identifier of the subscription. It can be user-supplied.")
public String getSubscriptionNumber() {
return subscriptionNumber;
}
public void setSubscriptionNumber(String subscriptionNumber) {
this.subscriptionNumber = subscriptionNumber;
}
public UsageCreateRequest unitOfMeasure(String unitOfMeasure) {
this.unitOfMeasure = unitOfMeasure;
return this;
}
/**
* Specifies the units to measure usage. Units of measure are configured in Zuora Central. Your values depend on your configuration in Billing Settings.
* @return unitOfMeasure
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "Specifies the units to measure usage. Units of measure are configured in Zuora Central. Your values depend on your configuration in Billing Settings.")
public String getUnitOfMeasure() {
return unitOfMeasure;
}
public void setUnitOfMeasure(String unitOfMeasure) {
this.unitOfMeasure = unitOfMeasure;
}
public UsageCreateRequest customFields(Map customFields) {
this.customFields = customFields;
return this;
}
public UsageCreateRequest 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;
}
UsageCreateRequest usageCreateRequest = (UsageCreateRequest) o;
return Objects.equals(this.accountNumber, usageCreateRequest.accountNumber) &&
Objects.equals(this.accountId, usageCreateRequest.accountId) &&
Objects.equals(this.subscriptionItemId, usageCreateRequest.subscriptionItemId) &&
Objects.equals(this.subscriptionItemNumber, usageCreateRequest.subscriptionItemNumber) &&
Objects.equals(this.description, usageCreateRequest.description) &&
Objects.equals(this.endTime, usageCreateRequest.endTime) &&
Objects.equals(this.quantity, usageCreateRequest.quantity) &&
Objects.equals(this.startTime, usageCreateRequest.startTime) &&
Objects.equals(this.subscriptionId, usageCreateRequest.subscriptionId) &&
Objects.equals(this.subscriptionNumber, usageCreateRequest.subscriptionNumber) &&
Objects.equals(this.unitOfMeasure, usageCreateRequest.unitOfMeasure) &&
Objects.equals(this.customFields, usageCreateRequest.customFields);
}
@Override
public int hashCode() {
return Objects.hash(accountNumber, accountId, subscriptionItemId, subscriptionItemNumber, description, endTime, quantity, startTime, subscriptionId, subscriptionNumber, unitOfMeasure, customFields);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class UsageCreateRequest {\n");
sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n");
sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n");
sb.append(" subscriptionItemId: ").append(toIndentedString(subscriptionItemId)).append("\n");
sb.append(" subscriptionItemNumber: ").append(toIndentedString(subscriptionItemNumber)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n");
sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");
sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n");
sb.append(" subscriptionId: ").append(toIndentedString(subscriptionId)).append("\n");
sb.append(" subscriptionNumber: ").append(toIndentedString(subscriptionNumber)).append("\n");
sb.append(" unitOfMeasure: ").append(toIndentedString(unitOfMeasure)).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