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

org.openapitools.client.model.BillRunCreateRequest 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.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
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;
/**
 * BillRunCreateRequest
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class BillRunCreateRequest {
  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;

  public static final String SERIALIZED_NAME_ACCOUNT_ID = "account_id";
  @SerializedName(SERIALIZED_NAME_ACCOUNT_ID)
  private String accountId;

  public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "account_number";
  @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER)
  private String accountNumber;

  public static final String SERIALIZED_NAME_EMAIL = "email";
  @SerializedName(SERIALIZED_NAME_EMAIL)
  private Boolean email;

  public static final String SERIALIZED_NAME_POST = "post";
  @SerializedName(SERIALIZED_NAME_POST)
  private Boolean post;

  public static final String SERIALIZED_NAME_RENEW = "renew";
  @SerializedName(SERIALIZED_NAME_RENEW)
  private Boolean renew;

  /**
   * The day of the month on which the multiple customer accounts are billed.
   */
  @JsonAdapter(DayOfMonthEnum.Adapter.class)
  public enum DayOfMonthEnum {
    _1("1"),
    
    _2("2"),
    
    _3("3"),
    
    _4("4"),
    
    _5("5"),
    
    _6("6"),
    
    _7("7"),
    
    _8("8"),
    
    _9("9"),
    
    _10("10"),
    
    _11("11"),
    
    _12("12"),
    
    _13("13"),
    
    _14("14"),
    
    _15("15"),
    
    _16("16"),
    
    _17("17"),
    
    _18("18"),
    
    _19("19"),
    
    _20("20"),
    
    _21("21"),
    
    _22("22"),
    
    _23("23"),
    
    _24("24"),
    
    _25("25"),
    
    _26("26"),
    
    _27("27"),
    
    _28("28"),
    
    _29("29"),
    
    _30("30"),
    
    _31("31"),
    
    ALLBILLCYCLEDAYS("AllBillCycleDays"),
    
    ASRUNDAY("AsRunDay"),
    
    UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");

    private String value;

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

    public String getValue() {
      return value;
    }

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

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

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

  public static final String SERIALIZED_NAME_DAY_OF_MONTH = "day_of_month";
  @SerializedName(SERIALIZED_NAME_DAY_OF_MONTH)
  private DayOfMonthEnum dayOfMonth;

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

  public static final String SERIALIZED_NAME_INVOICE_DATE = "invoice_date";
  @SerializedName(SERIALIZED_NAME_INVOICE_DATE)
  private LocalDate invoiceDate;

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

  public static final String SERIALIZED_NAME_EMAIL_ZERO_AMOUNT_INVOICES = "email_zero_amount_invoices";
  @SerializedName(SERIALIZED_NAME_EMAIL_ZERO_AMOUNT_INVOICES)
  private Boolean emailZeroAmountInvoices = true;

  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_NAME = "name";
  @SerializedName(SERIALIZED_NAME_NAME)
  private String name;

  /**
   * The type of the bill run. This field is only available if you have the <a href=”https://knowledgecenter.zuora.com/Zuora_Billing/Bill_your_customers/Automate_billing_document_generation/Bill_runs/Z_Catch-Up_Bill_Run” target=”_blank”>Catch-Up Bill Run</a> feature enabled in your tenant.
   */
  @JsonAdapter(TypeEnum.Adapter.class)
  public enum TypeEnum {
    REGULAR("regular"),
    
    CATCH_UP("catch_up"),
    
    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_SUBSCRIPTION_IDS = "subscription_ids";
  @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_IDS)
  private List subscriptionIds = null;

  public BillRunCreateRequest() { 
  }

  
  public BillRunCreateRequest(
     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 BillRunCreateRequest customFields(Map customFields) {
    
    this.customFields = customFields;
    return this;
  }

  public BillRunCreateRequest 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 BillRunCreateRequest accountId(String accountId) {
    
    this.accountId = accountId;
    return this;
  }

   /**
   * Identifier of the customer account to bill. Specify this field or `account_number` if you want to create a bill run for a single customer.
   * @return accountId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Identifier of the customer account to bill. Specify this field or `account_number` if you want to create a bill run for a single customer.")

  public String getAccountId() {
    return accountId;
  }


  public void setAccountId(String accountId) {
    this.accountId = accountId;
  }


  public BillRunCreateRequest accountNumber(String accountNumber) {
    
    this.accountNumber = accountNumber;
    return this;
  }

   /**
   * Human-readable identifier of the account to bill. Specify this field or `account_id` if you want to create a bill run for a single customer.
   * @return accountNumber
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Human-readable identifier of the account to bill. Specify this field or `account_id` if you want to create a bill run for a single customer.")

  public String getAccountNumber() {
    return accountNumber;
  }


  public void setAccountNumber(String accountNumber) {
    this.accountNumber = accountNumber;
  }


  public BillRunCreateRequest email(Boolean email) {
    
    this.email = email;
    return this;
  }

   /**
   * If set to `true`, invoices will be automatically emailed to customers.
   * @return email
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "If set to `true`, invoices will be automatically emailed to customers.")

  public Boolean getEmail() {
    return email;
  }


  public void setEmail(Boolean email) {
    this.email = email;
  }


  public BillRunCreateRequest post(Boolean post) {
    
    this.post = post;
    return this;
  }

   /**
   * Indicates whether to automatically post a billing document after it is created.
   * @return post
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Indicates whether to automatically post a billing document after it is created.")

  public Boolean getPost() {
    return post;
  }


  public void setPost(Boolean post) {
    this.post = post;
  }


  public BillRunCreateRequest renew(Boolean renew) {
    
    this.renew = renew;
    return this;
  }

   /**
   * If set to `true`, subscriptions will be automatically renewed.
   * @return renew
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "If set to `true`, subscriptions will be automatically renewed.")

  public Boolean getRenew() {
    return renew;
  }


  public void setRenew(Boolean renew) {
    this.renew = renew;
  }


  public BillRunCreateRequest dayOfMonth(DayOfMonthEnum dayOfMonth) {
    
    this.dayOfMonth = dayOfMonth;
    return this;
  }

   /**
   * The day of the month on which the multiple customer accounts are billed.
   * @return dayOfMonth
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The day of the month on which the multiple customer accounts are billed.")

  public DayOfMonthEnum getDayOfMonth() {
    return dayOfMonth;
  }


  public void setDayOfMonth(DayOfMonthEnum dayOfMonth) {
    this.dayOfMonth = dayOfMonth;
  }


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

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

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

  public List getBatches() {
    return batches;
  }


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


  public BillRunCreateRequest invoiceDate(LocalDate invoiceDate) {
    
    this.invoiceDate = invoiceDate;
    return this;
  }

   /**
   * The date displayed on the invoice.
   * @return invoiceDate
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(example = "Sat Jan 01 00:00:00 GMT 2022", required = true, value = "The date displayed on the invoice.")

  public LocalDate getInvoiceDate() {
    return invoiceDate;
  }


  public void setInvoiceDate(LocalDate invoiceDate) {
    this.invoiceDate = invoiceDate;
  }


  public BillRunCreateRequest 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.Nonnull
  @ApiModelProperty(example = "Sun Jan 01 00:00:00 GMT 2023", required = true, 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 BillRunCreateRequest emailZeroAmountInvoices(Boolean emailZeroAmountInvoices) {
    
    this.emailZeroAmountInvoices = emailZeroAmountInvoices;
    return this;
  }

   /**
   * If it is set to `false`, invoices for zero amounts will not be emailed to customers. 
   * @return emailZeroAmountInvoices
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "If it is set to `false`, invoices for zero amounts will not be emailed to customers. ")

  public Boolean getEmailZeroAmountInvoices() {
    return emailZeroAmountInvoices;
  }


  public void setEmailZeroAmountInvoices(Boolean emailZeroAmountInvoices) {
    this.emailZeroAmountInvoices = emailZeroAmountInvoices;
  }


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

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

   /**
   * Type of the charge to be excluded from the bill run.
   * @return chargesExcluded
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Type of the charge to be excluded from the bill run.")

  public List getChargesExcluded() {
    return chargesExcluded;
  }


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


  public BillRunCreateRequest name(String name) {
    
    this.name = name;
    return this;
  }

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

  public String getName() {
    return name;
  }


  public void setName(String name) {
    this.name = name;
  }


  public BillRunCreateRequest type(TypeEnum type) {
    
    this.type = type;
    return this;
  }

   /**
   * The type of the bill run. This field is only available if you have the <a href=”https://knowledgecenter.zuora.com/Zuora_Billing/Bill_your_customers/Automate_billing_document_generation/Bill_runs/Z_Catch-Up_Bill_Run” target=”_blank”>Catch-Up Bill Run</a> feature enabled in your tenant.
   * @return type
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The type of the bill run. This field is only available if you have the Catch-Up Bill Run feature enabled in your tenant.")

  public TypeEnum getType() {
    return type;
  }


  public void setType(TypeEnum type) {
    this.type = type;
  }


  public BillRunCreateRequest subscriptionIds(List subscriptionIds) {
    
    this.subscriptionIds = subscriptionIds;
    return this;
  }

  public BillRunCreateRequest addSubscriptionIdsItem(String subscriptionIdsItem) {
    if (this.subscriptionIds == null) {
      this.subscriptionIds = new ArrayList();
    }
    this.subscriptionIds.add(subscriptionIdsItem);
    return this;
  }

   /**
   * The target subscriptions for this bill run. Note that all these subscriptions must belong to the same account.
   * @return subscriptionIds
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The target subscriptions for this bill run. Note that all these subscriptions must belong to the same account.")

  public List getSubscriptionIds() {
    return subscriptionIds;
  }


  public void setSubscriptionIds(List subscriptionIds) {
    this.subscriptionIds = subscriptionIds;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    BillRunCreateRequest billRunCreateRequest = (BillRunCreateRequest) o;
    return Objects.equals(this.id, billRunCreateRequest.id) &&
        Objects.equals(this.updatedById, billRunCreateRequest.updatedById) &&
        Objects.equals(this.updatedTime, billRunCreateRequest.updatedTime) &&
        Objects.equals(this.createdById, billRunCreateRequest.createdById) &&
        Objects.equals(this.createdTime, billRunCreateRequest.createdTime) &&
        Objects.equals(this.customFields, billRunCreateRequest.customFields) &&
        Objects.equals(this.customObjects, billRunCreateRequest.customObjects) &&
        Objects.equals(this.accountId, billRunCreateRequest.accountId) &&
        Objects.equals(this.accountNumber, billRunCreateRequest.accountNumber) &&
        Objects.equals(this.email, billRunCreateRequest.email) &&
        Objects.equals(this.post, billRunCreateRequest.post) &&
        Objects.equals(this.renew, billRunCreateRequest.renew) &&
        Objects.equals(this.dayOfMonth, billRunCreateRequest.dayOfMonth) &&
        Objects.equals(this.batches, billRunCreateRequest.batches) &&
        Objects.equals(this.invoiceDate, billRunCreateRequest.invoiceDate) &&
        Objects.equals(this.targetDate, billRunCreateRequest.targetDate) &&
        Objects.equals(this.emailZeroAmountInvoices, billRunCreateRequest.emailZeroAmountInvoices) &&
        Objects.equals(this.chargesExcluded, billRunCreateRequest.chargesExcluded) &&
        Objects.equals(this.name, billRunCreateRequest.name) &&
        Objects.equals(this.type, billRunCreateRequest.type) &&
        Objects.equals(this.subscriptionIds, billRunCreateRequest.subscriptionIds);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, updatedById, updatedTime, createdById, createdTime, customFields, customObjects, accountId, accountNumber, email, post, renew, dayOfMonth, batches, invoiceDate, targetDate, emailZeroAmountInvoices, chargesExcluded, name, type, subscriptionIds);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class BillRunCreateRequest {\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("    accountId: ").append(toIndentedString(accountId)).append("\n");
    sb.append("    accountNumber: ").append(toIndentedString(accountNumber)).append("\n");
    sb.append("    email: ").append(toIndentedString(email)).append("\n");
    sb.append("    post: ").append(toIndentedString(post)).append("\n");
    sb.append("    renew: ").append(toIndentedString(renew)).append("\n");
    sb.append("    dayOfMonth: ").append(toIndentedString(dayOfMonth)).append("\n");
    sb.append("    batches: ").append(toIndentedString(batches)).append("\n");
    sb.append("    invoiceDate: ").append(toIndentedString(invoiceDate)).append("\n");
    sb.append("    targetDate: ").append(toIndentedString(targetDate)).append("\n");
    sb.append("    emailZeroAmountInvoices: ").append(toIndentedString(emailZeroAmountInvoices)).append("\n");
    sb.append("    chargesExcluded: ").append(toIndentedString(chargesExcluded)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    subscriptionIds: ").append(toIndentedString(subscriptionIds)).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