com.zuora.model.StartDatePolicy 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;
/**
* Start date policy of the discount charge to become active when the **Apply to billing period partially** checkbox is selected from the product catalog UI or the `applyToBillingPeriodPartially` field is set as true from the \"CRUD: Create a product rate plan charge\" operation. If the value of this field is `SpecificDate`, use the `specificTriggerDate` field to specify the date when the charge becomes active. If the value of this field is `FixedPeriodAfterApplyToChargeStartDate`, the charge is active for a predefined duration based on the value of the `upToPeriodsType` and `upToPeriods` fields.
*/
@JsonAdapter(StartDatePolicy.Adapter.class)
public enum StartDatePolicy {
ALIGNTOAPPLYTOCHARGE("AlignToApplyToCharge"),
SPECIFICDATE("SpecificDate"),
ENDOFLASTINVOICEPERIODOFAPPLYTOCHARGE("EndOfLastInvoicePeriodOfApplyToCharge"),
FIXEDPERIODAFTERAPPLYTOCHARGESTARTDATE("FixedPeriodAfterApplyToChargeStartDate");
private String value;
StartDatePolicy(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static StartDatePolicy fromValue(String value) {
for (StartDatePolicy b : StartDatePolicy.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 StartDatePolicy enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public StartDatePolicy read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return StartDatePolicy.fromValue(value);
}
}
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
String value = jsonElement.getAsString();
StartDatePolicy.fromValue(value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy