org.openapitools.client.model.ProcessingOptions 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.threeten.bp.LocalDate;
import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
* Processing options for the invoice or payment.
*/
@ApiModel(description = "Processing options for the invoice or payment.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ProcessingOptions {
public static final String SERIALIZED_NAME_DOCUMENT_DATE = "document_date";
@SerializedName(SERIALIZED_NAME_DOCUMENT_DATE)
private LocalDate documentDate;
public static final String SERIALIZED_NAME_TARGET_DATE = "target_date";
@SerializedName(SERIALIZED_NAME_TARGET_DATE)
private LocalDate targetDate;
/**
* Specifies whether to just create an invoice, or to create an invoice and collect payment.
*/
@JsonAdapter(CollectionMethodEnum.Adapter.class)
public enum CollectionMethodEnum {
COLLECT_PAYMENT("collect_payment"),
CREATE_INVOICE("create_invoice"),
PROCESS_REFUND("process_refund"),
RUN_BILLING("run_billing"),
UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
private String value;
CollectionMethodEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static CollectionMethodEnum fromValue(String value) {
for (CollectionMethodEnum b : CollectionMethodEnum.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 CollectionMethodEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public CollectionMethodEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return CollectionMethodEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_COLLECTION_METHOD = "collection_method";
@SerializedName(SERIALIZED_NAME_COLLECTION_METHOD)
private CollectionMethodEnum collectionMethod;
public static final String SERIALIZED_NAME_PAYMENT_METHOD_ID = "payment_method_id";
@SerializedName(SERIALIZED_NAME_PAYMENT_METHOD_ID)
private String paymentMethodId;
public static final String SERIALIZED_NAME_DRAFT_INVOICE = "draft_invoice";
@SerializedName(SERIALIZED_NAME_DRAFT_INVOICE)
private Boolean draftInvoice;
public static final String SERIALIZED_NAME_PAYMENT_GATEWAY_ID = "payment_gateway_id";
@SerializedName(SERIALIZED_NAME_PAYMENT_GATEWAY_ID)
private String paymentGatewayId;
public static final String SERIALIZED_NAME_REFUND_REASON_CODE = "refund_reason_code";
@SerializedName(SERIALIZED_NAME_REFUND_REASON_CODE)
private String refundReasonCode;
public ProcessingOptions() {
}
public ProcessingOptions documentDate(LocalDate documentDate) {
this.documentDate = documentDate;
return this;
}
/**
* The date printed on billing documents.
* @return documentDate
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The date printed on billing documents.")
public LocalDate getDocumentDate() {
return documentDate;
}
public void setDocumentDate(LocalDate documentDate) {
this.documentDate = documentDate;
}
public ProcessingOptions targetDate(LocalDate targetDate) {
this.targetDate = targetDate;
return this;
}
/**
* The target date for the order to be picked up by bill run for billing.
* @return targetDate
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The target date for the order to be picked up by bill run for billing.")
public LocalDate getTargetDate() {
return targetDate;
}
public void setTargetDate(LocalDate targetDate) {
this.targetDate = targetDate;
}
public ProcessingOptions collectionMethod(CollectionMethodEnum collectionMethod) {
this.collectionMethod = collectionMethod;
return this;
}
/**
* Specifies whether to just create an invoice, or to create an invoice and collect payment.
* @return collectionMethod
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Specifies whether to just create an invoice, or to create an invoice and collect payment.")
public CollectionMethodEnum getCollectionMethod() {
return collectionMethod;
}
public void setCollectionMethod(CollectionMethodEnum collectionMethod) {
this.collectionMethod = collectionMethod;
}
public ProcessingOptions paymentMethodId(String paymentMethodId) {
this.paymentMethodId = paymentMethodId;
return this;
}
/**
* Payment method Id used to pay billing documents.
* @return paymentMethodId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Payment method Id used to pay billing documents.")
public String getPaymentMethodId() {
return paymentMethodId;
}
public void setPaymentMethodId(String paymentMethodId) {
this.paymentMethodId = paymentMethodId;
}
public ProcessingOptions draftInvoice(Boolean draftInvoice) {
this.draftInvoice = draftInvoice;
return this;
}
/**
* Get draftInvoice
* @return draftInvoice
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getDraftInvoice() {
return draftInvoice;
}
public void setDraftInvoice(Boolean draftInvoice) {
this.draftInvoice = draftInvoice;
}
public ProcessingOptions paymentGatewayId(String paymentGatewayId) {
this.paymentGatewayId = paymentGatewayId;
return this;
}
/**
* Get paymentGatewayId
* @return paymentGatewayId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPaymentGatewayId() {
return paymentGatewayId;
}
public void setPaymentGatewayId(String paymentGatewayId) {
this.paymentGatewayId = paymentGatewayId;
}
public ProcessingOptions refundReasonCode(String refundReasonCode) {
this.refundReasonCode = refundReasonCode;
return this;
}
/**
* Get refundReasonCode
* @return refundReasonCode
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getRefundReasonCode() {
return refundReasonCode;
}
public void setRefundReasonCode(String refundReasonCode) {
this.refundReasonCode = refundReasonCode;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ProcessingOptions processingOptions = (ProcessingOptions) o;
return Objects.equals(this.documentDate, processingOptions.documentDate) &&
Objects.equals(this.targetDate, processingOptions.targetDate) &&
Objects.equals(this.collectionMethod, processingOptions.collectionMethod) &&
Objects.equals(this.paymentMethodId, processingOptions.paymentMethodId) &&
Objects.equals(this.draftInvoice, processingOptions.draftInvoice) &&
Objects.equals(this.paymentGatewayId, processingOptions.paymentGatewayId) &&
Objects.equals(this.refundReasonCode, processingOptions.refundReasonCode);
}
@Override
public int hashCode() {
return Objects.hash(documentDate, targetDate, collectionMethod, paymentMethodId, draftInvoice, paymentGatewayId, refundReasonCode);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ProcessingOptions {\n");
sb.append(" documentDate: ").append(toIndentedString(documentDate)).append("\n");
sb.append(" targetDate: ").append(toIndentedString(targetDate)).append("\n");
sb.append(" collectionMethod: ").append(toIndentedString(collectionMethod)).append("\n");
sb.append(" paymentMethodId: ").append(toIndentedString(paymentMethodId)).append("\n");
sb.append(" draftInvoice: ").append(toIndentedString(draftInvoice)).append("\n");
sb.append(" paymentGatewayId: ").append(toIndentedString(paymentGatewayId)).append("\n");
sb.append(" refundReasonCode: ").append(toIndentedString(refundReasonCode)).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