com.zuora.model.EndDateConditionProductRatePlanChargeRest 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;
/**
* Defines when the charge ends after the charge trigger date. **Values**: - `SubscriptionEnd`: The charge ends on the subscription end date after a specified period based on the trigger date of the charge. - `FixedPeriod`: The charge ends after a specified period based on the trigger date of the charge. If you set this field to `FixedPeriod`, you must specify the length of the period and a period type by defining the `UpToPeriods` and `UpToPeriodsType` fields. **Note**: If the subscription ends before the charge end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the charge end date.
*/
@JsonAdapter(EndDateConditionProductRatePlanChargeRest.Adapter.class)
public enum EndDateConditionProductRatePlanChargeRest {
SUBSCRIPTIONEND("SubscriptionEnd"),
FIXEDPERIOD("FixedPeriod");
private String value;
EndDateConditionProductRatePlanChargeRest(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static EndDateConditionProductRatePlanChargeRest fromValue(String value) {
for (EndDateConditionProductRatePlanChargeRest b : EndDateConditionProductRatePlanChargeRest.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 EndDateConditionProductRatePlanChargeRest enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public EndDateConditionProductRatePlanChargeRest read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return EndDateConditionProductRatePlanChargeRest.fromValue(value);
}
}
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
String value = jsonElement.getAsString();
EndDateConditionProductRatePlanChargeRest.fromValue(value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy