org.openapitools.client.model.SubscriptionPreviewBillingDocumentsResponse 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.ArrayList;
import java.util.List;
import org.openapitools.client.model.SubscriptionPreviewBillingDocumentItemResponse;
import org.threeten.bp.LocalDate;
import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
* SubscriptionPreviewBillingDocumentsResponse
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class SubscriptionPreviewBillingDocumentsResponse {
public static final String SERIALIZED_NAME_SUBTOTAL = "subtotal";
@SerializedName(SERIALIZED_NAME_SUBTOTAL)
private BigDecimal subtotal;
public static final String SERIALIZED_NAME_TAX = "tax";
@SerializedName(SERIALIZED_NAME_TAX)
private BigDecimal tax;
public static final String SERIALIZED_NAME_TOTAL = "total";
@SerializedName(SERIALIZED_NAME_TOTAL)
private BigDecimal total;
/**
* The type of billing document. Can be one of the credit memo, debit memo, or invoice.
*/
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
CREDIT_MEMO("credit_memo"),
DEBIT_MEMO("debit_memo"),
INVOICE("invoice"),
UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
private String value;
TypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static TypeEnum fromValue(String value) {
for (TypeEnum b : TypeEnum.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 TypeEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public TypeEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return TypeEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_TYPE = "type";
@SerializedName(SERIALIZED_NAME_TYPE)
private TypeEnum type;
public static final String SERIALIZED_NAME_TARGET_DATE = "target_date";
@SerializedName(SERIALIZED_NAME_TARGET_DATE)
private LocalDate targetDate;
public static final String SERIALIZED_NAME_BILLING_DOCUMENT_ITEMS = "billing_document_items";
@SerializedName(SERIALIZED_NAME_BILLING_DOCUMENT_ITEMS)
private List billingDocumentItems = null;
public SubscriptionPreviewBillingDocumentsResponse() {
}
public SubscriptionPreviewBillingDocumentsResponse(
BigDecimal subtotal,
BigDecimal tax,
BigDecimal total
) {
this();
this.subtotal = subtotal;
this.tax = tax;
this.total = total;
}
/**
* The total amount exclusive of tax.
* @return subtotal
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The total amount exclusive of tax.")
public BigDecimal getSubtotal() {
return subtotal;
}
/**
* The total tax amount.
* @return tax
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The total tax amount.")
public BigDecimal getTax() {
return tax;
}
/**
* The total amount.
* @return total
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The total amount.")
public BigDecimal getTotal() {
return total;
}
public SubscriptionPreviewBillingDocumentsResponse type(TypeEnum type) {
this.type = type;
return this;
}
/**
* The type of billing document. Can be one of the credit memo, debit memo, or invoice.
* @return type
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The type of billing document. Can be one of the credit memo, debit memo, or invoice.")
public TypeEnum getType() {
return type;
}
public void setType(TypeEnum type) {
this.type = type;
}
public SubscriptionPreviewBillingDocumentsResponse targetDate(LocalDate targetDate) {
this.targetDate = targetDate;
return this;
}
/**
* Get targetDate
* @return targetDate
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public LocalDate getTargetDate() {
return targetDate;
}
public void setTargetDate(LocalDate targetDate) {
this.targetDate = targetDate;
}
public SubscriptionPreviewBillingDocumentsResponse billingDocumentItems(List billingDocumentItems) {
this.billingDocumentItems = billingDocumentItems;
return this;
}
public SubscriptionPreviewBillingDocumentsResponse addBillingDocumentItemsItem(SubscriptionPreviewBillingDocumentItemResponse billingDocumentItemsItem) {
if (this.billingDocumentItems == null) {
this.billingDocumentItems = new ArrayList();
}
this.billingDocumentItems.add(billingDocumentItemsItem);
return this;
}
/**
* Get billingDocumentItems
* @return billingDocumentItems
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getBillingDocumentItems() {
return billingDocumentItems;
}
public void setBillingDocumentItems(List billingDocumentItems) {
this.billingDocumentItems = billingDocumentItems;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SubscriptionPreviewBillingDocumentsResponse subscriptionPreviewBillingDocumentsResponse = (SubscriptionPreviewBillingDocumentsResponse) o;
return Objects.equals(this.subtotal, subscriptionPreviewBillingDocumentsResponse.subtotal) &&
Objects.equals(this.tax, subscriptionPreviewBillingDocumentsResponse.tax) &&
Objects.equals(this.total, subscriptionPreviewBillingDocumentsResponse.total) &&
Objects.equals(this.type, subscriptionPreviewBillingDocumentsResponse.type) &&
Objects.equals(this.targetDate, subscriptionPreviewBillingDocumentsResponse.targetDate) &&
Objects.equals(this.billingDocumentItems, subscriptionPreviewBillingDocumentsResponse.billingDocumentItems);
}
@Override
public int hashCode() {
return Objects.hash(subtotal, tax, total, type, targetDate, billingDocumentItems);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SubscriptionPreviewBillingDocumentsResponse {\n");
sb.append(" subtotal: ").append(toIndentedString(subtotal)).append("\n");
sb.append(" tax: ").append(toIndentedString(tax)).append("\n");
sb.append(" total: ").append(toIndentedString(total)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" targetDate: ").append(toIndentedString(targetDate)).append("\n");
sb.append(" billingDocumentItems: ").append(toIndentedString(billingDocumentItems)).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