com.zuora.model.ChargeFunction 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
/*
* 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;
/**
* **Note**: This field is only available if you have the [Unbilled Usage](https://knowledgecenter.zuora.com/Zuora_Billing/Bill_your_customers/Bill_for_usage_or_prepaid_products/Advanced_Consumption_Billing/Unbilled_Usage) feature enabled. Define what type of charge it is in Advanced consumption billing. * Standard: Normal charge with no Prepayment or Commitment or Drawdown. * Prepayment: For recurring charges. Unit or currency based prepaid charge. * CommitmentTrueUp: For recurring charges. Currency based minimum commitment charge. * Drawdown: For usage charges. Drawdown from prepaid funds. * DrawdownAndCreditCommitment: For usage charges. Drawdown from prepaid funds and then credit to minimum commitment funds. * CreditCommitment: For usage charges. Credit to minimum commitment funds.
*/
@JsonAdapter(ChargeFunction.Adapter.class)
public enum ChargeFunction {
STANDARD("Standard"),
PREPAYMENT("Prepayment"),
COMMITMENTTRUEUP("CommitmentTrueUp"),
DRAWDOWN("Drawdown"),
CREDITCOMMITMENT("CreditCommitment"),
DRAWDOWNANDCREDITCOMMITMENT("DrawdownAndCreditCommitment");
private String value;
ChargeFunction(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static ChargeFunction fromValue(String value) {
for (ChargeFunction b : ChargeFunction.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 ChargeFunction enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public ChargeFunction read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return ChargeFunction.fromValue(value);
}
}
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
String value = jsonElement.getAsString();
ChargeFunction.fromValue(value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy