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

com.zuora.model.BillRunStatus Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
/*
 * Zuora API Reference
 * REST API reference for the Zuora Billing, Payments, and Central Platform! Check out the [REST API Overview](https://www.zuora.com/developer/api-references/api/overview/).
 *
 * The version of the OpenAPI document: 2024-05-20
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.zuora.model;

import java.util.Objects;
import com.google.gson.annotations.SerializedName;

import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.JsonElement;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;

/**
 * A bill run can have one of the following possible [statuses](https://knowledgecenter.zuora.com/Zuora_Billing/Bill_your_customers/Automate_billing_document_generation/Bill_runs/AA_Get_started_with_bill_runs#Bill_run_status_types).  The status provides information about how the bill run is being processed in Zuora. 
 */
@JsonAdapter(BillRunStatus.Adapter.class)
public enum BillRunStatus {
  
  PENDING("Pending"),
  
  PROCESSING("Processing"),
  
  COMPLETED("Completed"),
  
  ERROR("Error"),
  
  CANCELED("Canceled"),
  
  POSTED("Posted"),
  
  POSTINPROGRESS("PostInProgress"),
  
  CANCELINPROGRESS("CancelInProgress"),
  
  REMOVEINPROGRESS("RemoveInProgress"),
  
  PAUSED("Paused");

  private String value;

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

  public String getValue() {
    return value;
  }

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

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

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

  public static void validateJsonElement(JsonElement jsonElement) throws IOException {
    String value = jsonElement.getAsString();
    BillRunStatus.fromValue(value);
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy