com.zuora.model.ChangePlanEffectivePolicy 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;
/**
* The default value for the `effectivePolicy` field is as follows: * If the rate plan change (from old to new) is an upgrade, the effective policy is `EffectiveImmediately` by default. * If the rate plan change (from old to new) is a downgrade, the effective policy is `EffectiveEndOfBillingPeriod` by default. * Otherwise, the effective policy is `SpecificDate` by default. Note that if the `effectivePolicy` field is set to `EffectiveEndOfBillingPeriod`, you cannot set the <a href=\"https://knowledgecenter.zuora.com/Zuora_Billing/Subscriptions/Subscriptions/W_Subscription_and_Amendment_Dates#Billing_Trigger_Dates\" target=\"_blank\">billing trigger dates</a> for the subscription as the system will automatically set the trigger dates to the end of billing period, and you cannot set the following billing trigger date settings to `Yes`: * <a href=\"https://knowledgecenter.zuora.com/Zuora_Billing/Billing_and_Invoicing/Billing_Settings/Define_Default_Subscription_and_Order_Settings#Require_Customer_Acceptance_of_Orders.3F\" target=\"_blank\">Require Customer Acceptance of Orders?</a> * <a href=\"https://knowledgecenter.zuora.com/Zuora_Billing/Billing_and_Invoicing/Billing_Settings/Define_Default_Subscription_and_Order_Settings#Require_Service_Activation_of_Orders.3F\" target=\"_blank\">Require Service Activation of Orders?</a>
*/
@JsonAdapter(ChangePlanEffectivePolicy.Adapter.class)
public enum ChangePlanEffectivePolicy {
EFFECTIVEIMMEDIATELY("EffectiveImmediately"),
EFFECTIVEENDOFBILLINGPERIOD("EffectiveEndOfBillingPeriod"),
SPECIFICDATE("SpecificDate");
private String value;
ChangePlanEffectivePolicy(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static ChangePlanEffectivePolicy fromValue(String value) {
for (ChangePlanEffectivePolicy b : ChangePlanEffectivePolicy.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 ChangePlanEffectivePolicy enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public ChangePlanEffectivePolicy read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return ChangePlanEffectivePolicy.fromValue(value);
}
}
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
String value = jsonElement.getAsString();
ChangePlanEffectivePolicy.fromValue(value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy