com.zuora.model.TimeSlicedMetricsGeneratedReason 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;
/**
* Specify the reason why the metrics are generated by the certain order action. This field is only available to existing Orders customers who already have access to the field. **Note:** The following Order Metrics have been deprecated. Any new customers who onboard on [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) or [Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization) will not get these metrics. * The Order ELP and Order Item objects * The \"Generated Reason\" and \"Order Item ID\" fields in the Order MRR, Order TCB, Order TCV, and Order Quantity objects Existing Orders customers who have these metrics will continue to be supported.
*/
@JsonAdapter(TimeSlicedMetricsGeneratedReason.Adapter.class)
public enum TimeSlicedMetricsGeneratedReason {
INCREASEQUANTITY("IncreaseQuantity"),
DECREASEQUANTITY("DecreaseQuantity"),
CHANGEPRICE("ChangePrice"),
EXTENSION("Extension"),
CONTRACTION("Contraction");
private String value;
TimeSlicedMetricsGeneratedReason(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static TimeSlicedMetricsGeneratedReason fromValue(String value) {
for (TimeSlicedMetricsGeneratedReason b : TimeSlicedMetricsGeneratedReason.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 TimeSlicedMetricsGeneratedReason enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public TimeSlicedMetricsGeneratedReason read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return TimeSlicedMetricsGeneratedReason.fromValue(value);
}
}
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
String value = jsonElement.getAsString();
TimeSlicedMetricsGeneratedReason.fromValue(value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy