All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openapitools.client.model.BillRunPreview Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
/*
* 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.HashMap;
import java.util.List;
import java.util.Map;
import org.openapitools.client.model.BillRunPreviewFile;
import org.openapitools.client.model.BillRunPreviewStateTransitions;
import org.openapitools.client.model.CustomObject;
import org.openapitools.client.model.ListCustomObjectResponse;
import org.threeten.bp.LocalDate;
import org.threeten.bp.OffsetDateTime;

import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
 * BillRunPreview
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class BillRunPreview {
  public static final String SERIALIZED_NAME_ID = "id";
  @SerializedName(SERIALIZED_NAME_ID)
  private String id;

  public static final String SERIALIZED_NAME_UPDATED_BY_ID = "updated_by_id";
  @SerializedName(SERIALIZED_NAME_UPDATED_BY_ID)
  private String updatedById;

  public static final String SERIALIZED_NAME_UPDATED_TIME = "updated_time";
  @SerializedName(SERIALIZED_NAME_UPDATED_TIME)
  private OffsetDateTime updatedTime;

  public static final String SERIALIZED_NAME_CREATED_BY_ID = "created_by_id";
  @SerializedName(SERIALIZED_NAME_CREATED_BY_ID)
  private String createdById;

  public static final String SERIALIZED_NAME_CREATED_TIME = "created_time";
  @SerializedName(SERIALIZED_NAME_CREATED_TIME)
  private OffsetDateTime createdTime;

  public static final String SERIALIZED_NAME_CUSTOM_FIELDS = "custom_fields";
  @SerializedName(SERIALIZED_NAME_CUSTOM_FIELDS)
  @JsonAdapter(CustomFieldAdapter.class)
  private Map customFields = null;

  public static final String SERIALIZED_NAME_CUSTOM_OBJECTS = "custom_objects";
  @SerializedName(SERIALIZED_NAME_CUSTOM_OBJECTS)
  private Map customObjects = null;

  /**
   * Indicates whether to generate a preview of future invoice items and credit memo items with the assumption that the subscriptions are renewed. **all**: The assumption is applied to all the subscriptions. Zuora generates preview invoice item data and credit memo item data from the first day of the customer's next billing period to the target date. **auto_renew_only**: The assumption is applied to the subscriptions that have auto_renew enabled. Zuora generates preview invoice item data and credit memo item data from the first day of the customer's next billing period to the target date.
   */
  @JsonAdapter(AssumeRenewalEnum.Adapter.class)
  public enum AssumeRenewalEnum {
    ALL("all"),
    
    AUTO_RENEW_ONLY("auto_renew_only"),
    
    NONE("none"),
    
    UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");

    private String value;

    AssumeRenewalEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static AssumeRenewalEnum fromValue(String value) {
      for (AssumeRenewalEnum b : AssumeRenewalEnum.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 AssumeRenewalEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public AssumeRenewalEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return AssumeRenewalEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_ASSUME_RENEWAL = "assume_renewal";
  @SerializedName(SERIALIZED_NAME_ASSUME_RENEWAL)
  private AssumeRenewalEnum assumeRenewal;

  public static final String SERIALIZED_NAME_BATCHES = "batches";
  @SerializedName(SERIALIZED_NAME_BATCHES)
  private List batches = null;

  /**
   * Gets or Sets chargesExcluded
   */
  @JsonAdapter(ChargesExcludedEnum.Adapter.class)
  public enum ChargesExcludedEnum {
    ONE_TIME("one_time"),
    
    RECURRING("recurring"),
    
    USAGE("usage"),
    
    UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");

    private String value;

    ChargesExcludedEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static ChargesExcludedEnum fromValue(String value) {
      for (ChargesExcludedEnum b : ChargesExcludedEnum.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 ChargesExcludedEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public ChargesExcludedEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return ChargesExcludedEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_CHARGES_EXCLUDED = "charges_excluded";
  @SerializedName(SERIALIZED_NAME_CHARGES_EXCLUDED)
  private List chargesExcluded = null;

  public static final String SERIALIZED_NAME_INCLUDE_DRAFT_ITEMS = "include_draft_items";
  @SerializedName(SERIALIZED_NAME_INCLUDE_DRAFT_ITEMS)
  private Boolean includeDraftItems;

  public static final String SERIALIZED_NAME_INCLUDE_EVERGREEN_SUBSCRIPTIONS = "include_evergreen_subscriptions";
  @SerializedName(SERIALIZED_NAME_INCLUDE_EVERGREEN_SUBSCRIPTIONS)
  private Boolean includeEvergreenSubscriptions;

  public static final String SERIALIZED_NAME_TARGET_DATE = "target_date";
  @SerializedName(SERIALIZED_NAME_TARGET_DATE)
  private LocalDate targetDate;

  public static final String SERIALIZED_NAME_STATE_TRANSITIONS = "state_transitions";
  @SerializedName(SERIALIZED_NAME_STATE_TRANSITIONS)
  private BillRunPreviewStateTransitions stateTransitions;

  public static final String SERIALIZED_NAME_FILE = "file";
  @SerializedName(SERIALIZED_NAME_FILE)
  private BillRunPreviewFile _file;

  public static final String SERIALIZED_NAME_BILLING_PREVIEW_RUN_NUMBER = "billing_preview_run_number";
  @SerializedName(SERIALIZED_NAME_BILLING_PREVIEW_RUN_NUMBER)
  private String billingPreviewRunNumber;

  /**
   * The state of the bill run preview.
   */
  @JsonAdapter(StateEnum.Adapter.class)
  public enum StateEnum {
    PENDING("pending"),
    
    PROCESSING("processing"),
    
    COMPLETED("completed"),
    
    FAILED("failed"),
    
    CANCELED("canceled"),
    
    UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");

    private String value;

    StateEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static StateEnum fromValue(String value) {
      for (StateEnum b : StateEnum.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 StateEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public StateEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return StateEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_STATE = "state";
  @SerializedName(SERIALIZED_NAME_STATE)
  private StateEnum state;

  public static final String SERIALIZED_NAME_NUMBER_OF_ACCOUNTS_SUCCEEDED = "number_of_accounts_succeeded";
  @SerializedName(SERIALIZED_NAME_NUMBER_OF_ACCOUNTS_SUCCEEDED)
  private BigDecimal numberOfAccountsSucceeded;

  public static final String SERIALIZED_NAME_NUMBER_OF_ACCOUNTS = "number_of_accounts";
  @SerializedName(SERIALIZED_NAME_NUMBER_OF_ACCOUNTS)
  private BigDecimal numberOfAccounts;

  public BillRunPreview() { 
  }

  
  public BillRunPreview(
     String id, 
     String updatedById, 
     OffsetDateTime updatedTime, 
     String createdById, 
     OffsetDateTime createdTime, 
     Map customObjects
  ) {
    this();
    this.id = id;
    this.updatedById = updatedById;
    this.updatedTime = updatedTime;
    this.createdById = createdById;
    this.createdTime = createdTime;
    this.customObjects = customObjects;
  }

   /**
   * Unique identifier for the object.
   * @return id
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Unique identifier for the object.")

  public String getId() {
    return id;
  }




   /**
   * Unique identifier of the Zuora user who last updated the object
   * @return updatedById
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Unique identifier of the Zuora user who last updated the object")

  public String getUpdatedById() {
    return updatedById;
  }




   /**
   * The date and time when the object was last updated in ISO 8601 UTC format.
   * @return updatedTime
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The date and time when the object was last updated in ISO 8601 UTC format.")

  public OffsetDateTime getUpdatedTime() {
    return updatedTime;
  }




   /**
   * Unique identifier of the Zuora user who created the object
   * @return createdById
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Unique identifier of the Zuora user who created the object")

  public String getCreatedById() {
    return createdById;
  }




   /**
   * The date and time when the object was created in ISO 8601 UTC format.
   * @return createdTime
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The date and time when the object was created in ISO 8601 UTC format.")

  public OffsetDateTime getCreatedTime() {
    return createdTime;
  }




  public BillRunPreview customFields(Map customFields) {
    
    this.customFields = customFields;
    return this;
  }

  public BillRunPreview 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;
  }


   /**
   * The custom objects associated with a Zuora standard object.
   * @return customObjects
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The custom objects associated with a Zuora standard object.")

  public Map getCustomObjects() {
    return customObjects;
  }




  public BillRunPreview assumeRenewal(AssumeRenewalEnum assumeRenewal) {
    
    this.assumeRenewal = assumeRenewal;
    return this;
  }

   /**
   * Indicates whether to generate a preview of future invoice items and credit memo items with the assumption that the subscriptions are renewed. **all**: The assumption is applied to all the subscriptions. Zuora generates preview invoice item data and credit memo item data from the first day of the customer's next billing period to the target date. **auto_renew_only**: The assumption is applied to the subscriptions that have auto_renew enabled. Zuora generates preview invoice item data and credit memo item data from the first day of the customer's next billing period to the target date.
   * @return assumeRenewal
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Indicates whether to generate a preview of future invoice items and credit memo items with the assumption that the subscriptions are renewed. **all**: The assumption is applied to all the subscriptions. Zuora generates preview invoice item data and credit memo item data from the first day of the customer's next billing period to the target date. **auto_renew_only**: The assumption is applied to the subscriptions that have auto_renew enabled. Zuora generates preview invoice item data and credit memo item data from the first day of the customer's next billing period to the target date.")

  public AssumeRenewalEnum getAssumeRenewal() {
    return assumeRenewal;
  }


  public void setAssumeRenewal(AssumeRenewalEnum assumeRenewal) {
    this.assumeRenewal = assumeRenewal;
  }


  public BillRunPreview batches(List batches) {
    
    this.batches = batches;
    return this;
  }

  public BillRunPreview addBatchesItem(String batchesItem) {
    if (this.batches == null) {
      this.batches = new ArrayList();
    }
    this.batches.add(batchesItem);
    return this;
  }

   /**
   * Identifiers of the customer account batches to be included in this bill run preview.
   * @return batches
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Identifiers of the customer account batches to be included in this bill run preview.")

  public List getBatches() {
    return batches;
  }


  public void setBatches(List batches) {
    this.batches = batches;
  }


  public BillRunPreview chargesExcluded(List chargesExcluded) {
    
    this.chargesExcluded = chargesExcluded;
    return this;
  }

  public BillRunPreview addChargesExcludedItem(ChargesExcludedEnum chargesExcludedItem) {
    if (this.chargesExcluded == null) {
      this.chargesExcluded = new ArrayList();
    }
    this.chargesExcluded.add(chargesExcludedItem);
    return this;
  }

   /**
   * Charge type or types to be excluded from this bill run preview.
   * @return chargesExcluded
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Charge type or types to be excluded from this bill run preview.")

  public List getChargesExcluded() {
    return chargesExcluded;
  }


  public void setChargesExcluded(List chargesExcluded) {
    this.chargesExcluded = chargesExcluded;
  }


  public BillRunPreview includeDraftItems(Boolean includeDraftItems) {
    
    this.includeDraftItems = includeDraftItems;
    return this;
  }

   /**
   * If true, draft items will be included in this bill run preview.
   * @return includeDraftItems
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "If true, draft items will be included in this bill run preview.")

  public Boolean getIncludeDraftItems() {
    return includeDraftItems;
  }


  public void setIncludeDraftItems(Boolean includeDraftItems) {
    this.includeDraftItems = includeDraftItems;
  }


  public BillRunPreview includeEvergreenSubscriptions(Boolean includeEvergreenSubscriptions) {
    
    this.includeEvergreenSubscriptions = includeEvergreenSubscriptions;
    return this;
  }

   /**
   * If true, evergreen subscriptions will be included in this bill run preview.
   * @return includeEvergreenSubscriptions
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "If true, evergreen subscriptions will be included in this bill run preview.")

  public Boolean getIncludeEvergreenSubscriptions() {
    return includeEvergreenSubscriptions;
  }


  public void setIncludeEvergreenSubscriptions(Boolean includeEvergreenSubscriptions) {
    this.includeEvergreenSubscriptions = includeEvergreenSubscriptions;
  }


  public BillRunPreview targetDate(LocalDate targetDate) {
    
    this.targetDate = targetDate;
    return this;
  }

   /**
   * All unbilled items on or before this date are included in this bill run.
   * @return targetDate
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "All unbilled items on or before this date are included in this bill run.")

  public LocalDate getTargetDate() {
    return targetDate;
  }


  public void setTargetDate(LocalDate targetDate) {
    this.targetDate = targetDate;
  }


  public BillRunPreview stateTransitions(BillRunPreviewStateTransitions stateTransitions) {
    
    this.stateTransitions = stateTransitions;
    return this;
  }

   /**
   * Get stateTransitions
   * @return stateTransitions
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public BillRunPreviewStateTransitions getStateTransitions() {
    return stateTransitions;
  }


  public void setStateTransitions(BillRunPreviewStateTransitions stateTransitions) {
    this.stateTransitions = stateTransitions;
  }


  public BillRunPreview _file(BillRunPreviewFile _file) {
    
    this._file = _file;
    return this;
  }

   /**
   * Get _file
   * @return _file
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public BillRunPreviewFile getFile() {
    return _file;
  }


  public void setFile(BillRunPreviewFile _file) {
    this._file = _file;
  }


  public BillRunPreview billingPreviewRunNumber(String billingPreviewRunNumber) {
    
    this.billingPreviewRunNumber = billingPreviewRunNumber;
    return this;
  }

   /**
   * Human-readable identifier for this object.
   * @return billingPreviewRunNumber
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Human-readable identifier for this object.")

  public String getBillingPreviewRunNumber() {
    return billingPreviewRunNumber;
  }


  public void setBillingPreviewRunNumber(String billingPreviewRunNumber) {
    this.billingPreviewRunNumber = billingPreviewRunNumber;
  }


  public BillRunPreview state(StateEnum state) {
    
    this.state = state;
    return this;
  }

   /**
   * The state of the bill run preview.
   * @return state
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The state of the bill run preview.")

  public StateEnum getState() {
    return state;
  }


  public void setState(StateEnum state) {
    this.state = state;
  }


  public BillRunPreview numberOfAccountsSucceeded(BigDecimal numberOfAccountsSucceeded) {
    
    this.numberOfAccountsSucceeded = numberOfAccountsSucceeded;
    return this;
  }

   /**
   * The number of the customer accounts whose bill run preview job succeeded.
   * @return numberOfAccountsSucceeded
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The number of the customer accounts whose bill run preview job succeeded.")

  public BigDecimal getNumberOfAccountsSucceeded() {
    return numberOfAccountsSucceeded;
  }


  public void setNumberOfAccountsSucceeded(BigDecimal numberOfAccountsSucceeded) {
    this.numberOfAccountsSucceeded = numberOfAccountsSucceeded;
  }


  public BillRunPreview numberOfAccounts(BigDecimal numberOfAccounts) {
    
    this.numberOfAccounts = numberOfAccounts;
    return this;
  }

   /**
   * The number of the customer accounts included in the bill run preview job.
   * @return numberOfAccounts
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The number of the customer accounts included in the bill run preview job.")

  public BigDecimal getNumberOfAccounts() {
    return numberOfAccounts;
  }


  public void setNumberOfAccounts(BigDecimal numberOfAccounts) {
    this.numberOfAccounts = numberOfAccounts;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    BillRunPreview billRunPreview = (BillRunPreview) o;
    return Objects.equals(this.id, billRunPreview.id) &&
        Objects.equals(this.updatedById, billRunPreview.updatedById) &&
        Objects.equals(this.updatedTime, billRunPreview.updatedTime) &&
        Objects.equals(this.createdById, billRunPreview.createdById) &&
        Objects.equals(this.createdTime, billRunPreview.createdTime) &&
        Objects.equals(this.customFields, billRunPreview.customFields) &&
        Objects.equals(this.customObjects, billRunPreview.customObjects) &&
        Objects.equals(this.assumeRenewal, billRunPreview.assumeRenewal) &&
        Objects.equals(this.batches, billRunPreview.batches) &&
        Objects.equals(this.chargesExcluded, billRunPreview.chargesExcluded) &&
        Objects.equals(this.includeDraftItems, billRunPreview.includeDraftItems) &&
        Objects.equals(this.includeEvergreenSubscriptions, billRunPreview.includeEvergreenSubscriptions) &&
        Objects.equals(this.targetDate, billRunPreview.targetDate) &&
        Objects.equals(this.stateTransitions, billRunPreview.stateTransitions) &&
        Objects.equals(this._file, billRunPreview._file) &&
        Objects.equals(this.billingPreviewRunNumber, billRunPreview.billingPreviewRunNumber) &&
        Objects.equals(this.state, billRunPreview.state) &&
        Objects.equals(this.numberOfAccountsSucceeded, billRunPreview.numberOfAccountsSucceeded) &&
        Objects.equals(this.numberOfAccounts, billRunPreview.numberOfAccounts);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, updatedById, updatedTime, createdById, createdTime, customFields, customObjects, assumeRenewal, batches, chargesExcluded, includeDraftItems, includeEvergreenSubscriptions, targetDate, stateTransitions, _file, billingPreviewRunNumber, state, numberOfAccountsSucceeded, numberOfAccounts);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class BillRunPreview {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    updatedById: ").append(toIndentedString(updatedById)).append("\n");
    sb.append("    updatedTime: ").append(toIndentedString(updatedTime)).append("\n");
    sb.append("    createdById: ").append(toIndentedString(createdById)).append("\n");
    sb.append("    createdTime: ").append(toIndentedString(createdTime)).append("\n");
    sb.append("    customFields: ").append(toIndentedString(customFields)).append("\n");
    sb.append("    customObjects: ").append(toIndentedString(customObjects)).append("\n");
    sb.append("    assumeRenewal: ").append(toIndentedString(assumeRenewal)).append("\n");
    sb.append("    batches: ").append(toIndentedString(batches)).append("\n");
    sb.append("    chargesExcluded: ").append(toIndentedString(chargesExcluded)).append("\n");
    sb.append("    includeDraftItems: ").append(toIndentedString(includeDraftItems)).append("\n");
    sb.append("    includeEvergreenSubscriptions: ").append(toIndentedString(includeEvergreenSubscriptions)).append("\n");
    sb.append("    targetDate: ").append(toIndentedString(targetDate)).append("\n");
    sb.append("    stateTransitions: ").append(toIndentedString(stateTransitions)).append("\n");
    sb.append("    _file: ").append(toIndentedString(_file)).append("\n");
    sb.append("    billingPreviewRunNumber: ").append(toIndentedString(billingPreviewRunNumber)).append("\n");
    sb.append("    state: ").append(toIndentedString(state)).append("\n");
    sb.append("    numberOfAccountsSucceeded: ").append(toIndentedString(numberOfAccountsSucceeded)).append("\n");
    sb.append("    numberOfAccounts: ").append(toIndentedString(numberOfAccounts)).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