com.zuora.model.GetSubscriptionRatePlanChargesWithAllSegments 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.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.zuora.model.ApplyDiscountTo;
import com.zuora.model.BillingPeriod;
import com.zuora.model.BillingPeriodAlignment;
import com.zuora.model.BillingTiming;
import com.zuora.model.ChargeFunction;
import com.zuora.model.ChargeListPriceBase;
import com.zuora.model.ChargeModel;
import com.zuora.model.ChargeModelConfigurationForSubscription;
import com.zuora.model.ChargeType;
import com.zuora.model.CommitmentType;
import com.zuora.model.DeliverySchedule;
import com.zuora.model.DiscountApplyDetail;
import com.zuora.model.DiscountLevel;
import com.zuora.model.EndDateCondition;
import com.zuora.model.IntervalPricing;
import com.zuora.model.OverageCalculationOption;
import com.zuora.model.OverageUnusedUnitsCreditOption;
import com.zuora.model.PriceChangeOption;
import com.zuora.model.ProductCategory;
import com.zuora.model.RatePlanChargeSegment;
import com.zuora.model.RatePlanChargeTier;
import com.zuora.model.RatingGroup;
import com.zuora.model.SmoothingModel;
import com.zuora.model.TriggerEvent;
import com.zuora.model.UpToPeriodsType;
import com.zuora.model.UsageRecordRatingOption;
import com.zuora.model.ValidityPeriodType;
import java.io.IOException;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.zuora.JSON;
/**
* GetSubscriptionRatePlanChargesWithAllSegments
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.6.0")
public class GetSubscriptionRatePlanChargesWithAllSegments {
public static final String SERIALIZED_NAME_BILLING_DAY = "billingDay";
@SerializedName(SERIALIZED_NAME_BILLING_DAY)
private String billingDay;
public static final String SERIALIZED_NAME_BILLING_PERIOD = "billingPeriod";
@SerializedName(SERIALIZED_NAME_BILLING_PERIOD)
private BillingPeriod billingPeriod;
public static final String SERIALIZED_NAME_BILLING_PERIOD_ALIGNMENT = "billingPeriodAlignment";
@SerializedName(SERIALIZED_NAME_BILLING_PERIOD_ALIGNMENT)
private BillingPeriodAlignment billingPeriodAlignment;
public static final String SERIALIZED_NAME_BILLING_TIMING = "billingTiming";
@SerializedName(SERIALIZED_NAME_BILLING_TIMING)
private BillingTiming billingTiming;
public static final String SERIALIZED_NAME_CHARGE_SEGMENTS = "chargeSegments";
@SerializedName(SERIALIZED_NAME_CHARGE_SEGMENTS)
private List chargeSegments;
public static final String SERIALIZED_NAME_EXCLUDE_ITEM_BILLING_FROM_REVENUE_ACCOUNTING = "excludeItemBillingFromRevenueAccounting";
@SerializedName(SERIALIZED_NAME_EXCLUDE_ITEM_BILLING_FROM_REVENUE_ACCOUNTING)
private Boolean excludeItemBillingFromRevenueAccounting;
public static final String SERIALIZED_NAME_EXCLUDE_ITEM_BOOKING_FROM_REVENUE_ACCOUNTING = "excludeItemBookingFromRevenueAccounting";
@SerializedName(SERIALIZED_NAME_EXCLUDE_ITEM_BOOKING_FROM_REVENUE_ACCOUNTING)
private Boolean excludeItemBookingFromRevenueAccounting;
public static final String SERIALIZED_NAME_INVOICE_SCHEDULE_ID = "invoiceScheduleId";
@SerializedName(SERIALIZED_NAME_INVOICE_SCHEDULE_ID)
private String invoiceScheduleId;
public static final String SERIALIZED_NAME_IS_ALLOCATION_ELIGIBLE = "isAllocationEligible";
@SerializedName(SERIALIZED_NAME_IS_ALLOCATION_ELIGIBLE)
private Boolean isAllocationEligible;
public static final String SERIALIZED_NAME_IS_UNBILLED = "isUnbilled";
@SerializedName(SERIALIZED_NAME_IS_UNBILLED)
private Boolean isUnbilled;
public static final String SERIALIZED_NAME_LIST_PRICE_BASE = "listPriceBase";
@SerializedName(SERIALIZED_NAME_LIST_PRICE_BASE)
private ChargeListPriceBase listPriceBase;
public static final String SERIALIZED_NAME_MODEL = "model";
@SerializedName(SERIALIZED_NAME_MODEL)
private ChargeModel model;
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public static final String SERIALIZED_NAME_NUMBER = "number";
@SerializedName(SERIALIZED_NAME_NUMBER)
private String number;
public static final String SERIALIZED_NAME_NUMBER_OF_PERIODS = "numberOfPeriods";
@SerializedName(SERIALIZED_NAME_NUMBER_OF_PERIODS)
private Long numberOfPeriods;
public static final String SERIALIZED_NAME_ORIGINAL_CHARGE_ID = "originalChargeId";
@SerializedName(SERIALIZED_NAME_ORIGINAL_CHARGE_ID)
private String originalChargeId;
public static final String SERIALIZED_NAME_OVERAGE_CALCULATION_OPTION = "overageCalculationOption";
@SerializedName(SERIALIZED_NAME_OVERAGE_CALCULATION_OPTION)
private OverageCalculationOption overageCalculationOption;
public static final String SERIALIZED_NAME_OVERAGE_UNUSED_UNITS_CREDIT_OPTION = "overageUnusedUnitsCreditOption";
@SerializedName(SERIALIZED_NAME_OVERAGE_UNUSED_UNITS_CREDIT_OPTION)
private OverageUnusedUnitsCreditOption overageUnusedUnitsCreditOption;
public static final String SERIALIZED_NAME_PRODUCT_CATEGORY = "productCategory";
@SerializedName(SERIALIZED_NAME_PRODUCT_CATEGORY)
private ProductCategory productCategory;
public static final String SERIALIZED_NAME_PRODUCT_CLASS = "productClass";
@SerializedName(SERIALIZED_NAME_PRODUCT_CLASS)
private String productClass;
public static final String SERIALIZED_NAME_PRODUCT_FAMILY = "productFamily";
@SerializedName(SERIALIZED_NAME_PRODUCT_FAMILY)
private String productFamily;
public static final String SERIALIZED_NAME_PRODUCT_LINE = "productLine";
@SerializedName(SERIALIZED_NAME_PRODUCT_LINE)
private String productLine;
public static final String SERIALIZED_NAME_PRODUCT_RATE_PLAN_CHARGE_ID = "productRatePlanChargeId";
@SerializedName(SERIALIZED_NAME_PRODUCT_RATE_PLAN_CHARGE_ID)
private String productRatePlanChargeId;
public static final String SERIALIZED_NAME_PRODUCT_RATE_PLAN_CHARGE_NUMBER = "productRatePlanChargeNumber";
@SerializedName(SERIALIZED_NAME_PRODUCT_RATE_PLAN_CHARGE_NUMBER)
private String productRatePlanChargeNumber;
public static final String SERIALIZED_NAME_RATING_GROUP = "ratingGroup";
@SerializedName(SERIALIZED_NAME_RATING_GROUP)
private RatingGroup ratingGroup;
public static final String SERIALIZED_NAME_SMOOTHING_MODEL = "smoothingModel";
@SerializedName(SERIALIZED_NAME_SMOOTHING_MODEL)
private SmoothingModel smoothingModel;
public static final String SERIALIZED_NAME_SPECIFIC_BILLING_PERIOD = "specificBillingPeriod";
@SerializedName(SERIALIZED_NAME_SPECIFIC_BILLING_PERIOD)
private Long specificBillingPeriod;
public static final String SERIALIZED_NAME_SPECIFIC_LIST_PRICE_BASE = "specificListPriceBase";
@SerializedName(SERIALIZED_NAME_SPECIFIC_LIST_PRICE_BASE)
private Integer specificListPriceBase;
public static final String SERIALIZED_NAME_TYPE = "type";
@SerializedName(SERIALIZED_NAME_TYPE)
private ChargeType type;
public static final String SERIALIZED_NAME_UNUSED_UNITS_CREDIT_RATES = "unusedUnitsCreditRates";
@SerializedName(SERIALIZED_NAME_UNUSED_UNITS_CREDIT_RATES)
private BigDecimal unusedUnitsCreditRates;
public static final String SERIALIZED_NAME_UOM = "uom";
@SerializedName(SERIALIZED_NAME_UOM)
private String uom;
public static final String SERIALIZED_NAME_USAGE_RECORD_RATING_OPTION = "usageRecordRatingOption";
@SerializedName(SERIALIZED_NAME_USAGE_RECORD_RATING_OPTION)
private UsageRecordRatingOption usageRecordRatingOption;
public static final String SERIALIZED_NAME_VERSION = "version";
@SerializedName(SERIALIZED_NAME_VERSION)
private Long version;
public static final String SERIALIZED_NAME_AMENDED_BY_ORDER_ON = "amendedByOrderOn";
@SerializedName(SERIALIZED_NAME_AMENDED_BY_ORDER_ON)
private LocalDate amendedByOrderOn;
public static final String SERIALIZED_NAME_APPLY_DISCOUNT_TO = "applyDiscountTo";
@SerializedName(SERIALIZED_NAME_APPLY_DISCOUNT_TO)
private ApplyDiscountTo applyDiscountTo;
public static final String SERIALIZED_NAME_CHARGE_FUNCTION = "chargeFunction";
@SerializedName(SERIALIZED_NAME_CHARGE_FUNCTION)
private ChargeFunction chargeFunction;
public static final String SERIALIZED_NAME_CHARGE_MODEL_CONFIGURATION = "chargeModelConfiguration";
@SerializedName(SERIALIZED_NAME_CHARGE_MODEL_CONFIGURATION)
private ChargeModelConfigurationForSubscription chargeModelConfiguration;
public static final String SERIALIZED_NAME_CHARGED_THROUGH_DATE = "chargedThroughDate";
@SerializedName(SERIALIZED_NAME_CHARGED_THROUGH_DATE)
private LocalDate chargedThroughDate;
public static final String SERIALIZED_NAME_COMMITMENT_TYPE = "commitmentType";
@SerializedName(SERIALIZED_NAME_COMMITMENT_TYPE)
private CommitmentType commitmentType;
public static final String SERIALIZED_NAME_PREPAID_COMMITTED_AMOUNT = "prepaidCommittedAmount";
@SerializedName(SERIALIZED_NAME_PREPAID_COMMITTED_AMOUNT)
private String prepaidCommittedAmount;
public static final String SERIALIZED_NAME_PRODUCT_CHARGE_DEFINITION_ID = "productChargeDefinitionId";
@SerializedName(SERIALIZED_NAME_PRODUCT_CHARGE_DEFINITION_ID)
private String productChargeDefinitionId;
public static final String SERIALIZED_NAME_IS_STACKED_DISCOUNT = "isStackedDiscount";
@SerializedName(SERIALIZED_NAME_IS_STACKED_DISCOUNT)
private Boolean isStackedDiscount;
public static final String SERIALIZED_NAME_REFLECT_DISCOUNT_IN_NET_AMOUNT = "reflectDiscountInNetAmount";
@SerializedName(SERIALIZED_NAME_REFLECT_DISCOUNT_IN_NET_AMOUNT)
private Boolean reflectDiscountInNetAmount;
public static final String SERIALIZED_NAME_CENTRALIZED_PRICE = "centralizedPrice";
@SerializedName(SERIALIZED_NAME_CENTRALIZED_PRICE)
private Boolean centralizedPrice;
public static final String SERIALIZED_NAME_NUMBER_OF_DELIVERIES = "numberOfDeliveries";
@SerializedName(SERIALIZED_NAME_NUMBER_OF_DELIVERIES)
private BigDecimal numberOfDeliveries;
/**
* **Note**: This field is only available if you have the [Prepaid with Drawdown](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown) feature enabled. To use this field, you must set the `X-Zuora-WSDL-Version` request header to 114 or higher. Otherwise, an error occurs. The way to calculate credit. See [Credit Option](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown/Create_prepayment_charge#Credit_Option) for more information.
*/
@JsonAdapter(CreditOptionEnum.Adapter.class)
public enum CreditOptionEnum {
TIMEBASED("TimeBased"),
CONSUMPTIONBASED("ConsumptionBased"),
FULLCREDITBACK("FullCreditBack");
private String value;
CreditOptionEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static CreditOptionEnum fromValue(String value) {
for (CreditOptionEnum b : CreditOptionEnum.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 CreditOptionEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public CreditOptionEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return CreditOptionEnum.fromValue(value);
}
}
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
String value = jsonElement.getAsString();
CreditOptionEnum.fromValue(value);
}
}
public static final String SERIALIZED_NAME_CREDIT_OPTION = "creditOption";
@SerializedName(SERIALIZED_NAME_CREDIT_OPTION)
private CreditOptionEnum creditOption;
public static final String SERIALIZED_NAME_CURRENCY = "currency";
@SerializedName(SERIALIZED_NAME_CURRENCY)
private String currency;
public static final String SERIALIZED_NAME_DELIVERY_SCHEDULE = "deliverySchedule";
@SerializedName(SERIALIZED_NAME_DELIVERY_SCHEDULE)
private DeliverySchedule deliverySchedule;
public static final String SERIALIZED_NAME_DESCRIPTION = "description";
@SerializedName(SERIALIZED_NAME_DESCRIPTION)
private String description;
public static final String SERIALIZED_NAME_DISCOUNT_AMOUNT = "discountAmount";
@SerializedName(SERIALIZED_NAME_DISCOUNT_AMOUNT)
private BigDecimal discountAmount;
public static final String SERIALIZED_NAME_DISCOUNT_APPLY_DETAILS = "discountApplyDetails";
@SerializedName(SERIALIZED_NAME_DISCOUNT_APPLY_DETAILS)
private List discountApplyDetails;
public static final String SERIALIZED_NAME_DISCOUNT_CLASS = "discountClass";
@SerializedName(SERIALIZED_NAME_DISCOUNT_CLASS)
private String discountClass;
public static final String SERIALIZED_NAME_DISCOUNT_LEVEL = "discountLevel";
@SerializedName(SERIALIZED_NAME_DISCOUNT_LEVEL)
private DiscountLevel discountLevel;
public static final String SERIALIZED_NAME_DISCOUNT_PERCENTAGE = "discountPercentage";
@SerializedName(SERIALIZED_NAME_DISCOUNT_PERCENTAGE)
private BigDecimal discountPercentage;
public static final String SERIALIZED_NAME_APPLY_TO_BILLING_PERIOD_PARTIALLY = "applyToBillingPeriodPartially";
@SerializedName(SERIALIZED_NAME_APPLY_TO_BILLING_PERIOD_PARTIALLY)
private Boolean applyToBillingPeriodPartially;
public static final String SERIALIZED_NAME_DMRC = "dmrc";
@SerializedName(SERIALIZED_NAME_DMRC)
private String dmrc;
public static final String SERIALIZED_NAME_DONE = "done";
@SerializedName(SERIALIZED_NAME_DONE)
private Boolean done;
public static final String SERIALIZED_NAME_DRAWDOWN_RATE = "drawdownRate";
@SerializedName(SERIALIZED_NAME_DRAWDOWN_RATE)
private String drawdownRate;
public static final String SERIALIZED_NAME_DRAWDOWN_UOM = "drawdownUom";
@SerializedName(SERIALIZED_NAME_DRAWDOWN_UOM)
private String drawdownUom;
public static final String SERIALIZED_NAME_DTCV = "dtcv";
@SerializedName(SERIALIZED_NAME_DTCV)
private String dtcv;
public static final String SERIALIZED_NAME_EFFECTIVE_END_DATE = "effectiveEndDate";
@SerializedName(SERIALIZED_NAME_EFFECTIVE_END_DATE)
private LocalDate effectiveEndDate;
public static final String SERIALIZED_NAME_EFFECTIVE_START_DATE = "effectiveStartDate";
@SerializedName(SERIALIZED_NAME_EFFECTIVE_START_DATE)
private LocalDate effectiveStartDate;
public static final String SERIALIZED_NAME_END_DATE_CONDITION = "endDateCondition";
@SerializedName(SERIALIZED_NAME_END_DATE_CONDITION)
private EndDateCondition endDateCondition;
public static final String SERIALIZED_NAME_ID = "id";
@SerializedName(SERIALIZED_NAME_ID)
private String id;
public static final String SERIALIZED_NAME_INCLUDED_UNITS = "includedUnits";
@SerializedName(SERIALIZED_NAME_INCLUDED_UNITS)
private BigDecimal includedUnits;
public static final String SERIALIZED_NAME_OVERAGE_PRICE = "overagePrice";
@SerializedName(SERIALIZED_NAME_OVERAGE_PRICE)
private BigDecimal overagePrice;
public static final String SERIALIZED_NAME_INPUT_ARGUMENT_ID = "inputArgumentId";
@SerializedName(SERIALIZED_NAME_INPUT_ARGUMENT_ID)
private String inputArgumentId;
public static final String SERIALIZED_NAME_IS_COMMITTED = "isCommitted";
@SerializedName(SERIALIZED_NAME_IS_COMMITTED)
private Boolean isCommitted;
public static final String SERIALIZED_NAME_IS_PREPAID = "isPrepaid";
@SerializedName(SERIALIZED_NAME_IS_PREPAID)
private Boolean isPrepaid;
public static final String SERIALIZED_NAME_IS_ROLLOVER = "isRollover";
@SerializedName(SERIALIZED_NAME_IS_ROLLOVER)
private Boolean isRollover;
public static final String SERIALIZED_NAME_MRR = "mrr";
@SerializedName(SERIALIZED_NAME_MRR)
private String mrr;
public static final String SERIALIZED_NAME_ORIGINAL_ORDER_DATE = "originalOrderDate";
@SerializedName(SERIALIZED_NAME_ORIGINAL_ORDER_DATE)
private LocalDate originalOrderDate;
/**
* Gets or Sets prepaidOperationType
*/
@JsonAdapter(PrepaidOperationTypeEnum.Adapter.class)
public enum PrepaidOperationTypeEnum {
TOPUP("topup"),
DRAWDOWN("drawdown");
private String value;
PrepaidOperationTypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static PrepaidOperationTypeEnum fromValue(String value) {
for (PrepaidOperationTypeEnum b : PrepaidOperationTypeEnum.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 PrepaidOperationTypeEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public PrepaidOperationTypeEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return PrepaidOperationTypeEnum.fromValue(value);
}
}
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
String value = jsonElement.getAsString();
PrepaidOperationTypeEnum.fromValue(value);
}
}
public static final String SERIALIZED_NAME_PREPAID_OPERATION_TYPE = "prepaidOperationType";
@SerializedName(SERIALIZED_NAME_PREPAID_OPERATION_TYPE)
private PrepaidOperationTypeEnum prepaidOperationType;
public static final String SERIALIZED_NAME_PREPAID_QUANTITY = "prepaidQuantity";
@SerializedName(SERIALIZED_NAME_PREPAID_QUANTITY)
private String prepaidQuantity;
public static final String SERIALIZED_NAME_PREPAID_TOTAL_QUANTITY = "prepaidTotalQuantity";
@SerializedName(SERIALIZED_NAME_PREPAID_TOTAL_QUANTITY)
private String prepaidTotalQuantity;
public static final String SERIALIZED_NAME_PREPAID_U_O_M = "prepaidUOM";
@SerializedName(SERIALIZED_NAME_PREPAID_U_O_M)
private String prepaidUOM;
public static final String SERIALIZED_NAME_QUANTITY = "quantity";
@SerializedName(SERIALIZED_NAME_QUANTITY)
private BigDecimal quantity;
public static final String SERIALIZED_NAME_PRICE = "price";
@SerializedName(SERIALIZED_NAME_PRICE)
private BigDecimal price;
public static final String SERIALIZED_NAME_ORIGINAL_LIST_PRICE = "originalListPrice";
@SerializedName(SERIALIZED_NAME_ORIGINAL_LIST_PRICE)
private BigDecimal originalListPrice;
public static final String SERIALIZED_NAME_PRICE_CHANGE_OPTION = "priceChangeOption";
@SerializedName(SERIALIZED_NAME_PRICE_CHANGE_OPTION)
private PriceChangeOption priceChangeOption = PriceChangeOption.NOCHANGE;
public static final String SERIALIZED_NAME_PRICE_INCREASE_PERCENTAGE = "priceIncreasePercentage";
@SerializedName(SERIALIZED_NAME_PRICE_INCREASE_PERCENTAGE)
private BigDecimal priceIncreasePercentage;
public static final String SERIALIZED_NAME_PRICING_SUMMARY = "pricingSummary";
@SerializedName(SERIALIZED_NAME_PRICING_SUMMARY)
private String pricingSummary;
public static final String SERIALIZED_NAME_PROCESSED_THROUGH_DATE = "processedThroughDate";
@SerializedName(SERIALIZED_NAME_PROCESSED_THROUGH_DATE)
private LocalDate processedThroughDate;
/**
* Gets or Sets rolloverApply
*/
@JsonAdapter(RolloverApplyEnum.Adapter.class)
public enum RolloverApplyEnum {
APPLYFIRST("ApplyFirst"),
APPLYLAST("ApplyLast");
private String value;
RolloverApplyEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static RolloverApplyEnum fromValue(String value) {
for (RolloverApplyEnum b : RolloverApplyEnum.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 RolloverApplyEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public RolloverApplyEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return RolloverApplyEnum.fromValue(value);
}
}
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
String value = jsonElement.getAsString();
RolloverApplyEnum.fromValue(value);
}
}
public static final String SERIALIZED_NAME_ROLLOVER_APPLY = "rolloverApply";
@SerializedName(SERIALIZED_NAME_ROLLOVER_APPLY)
private RolloverApplyEnum rolloverApply;
public static final String SERIALIZED_NAME_ROLLOVER_PERIOD_LENGTH = "rolloverPeriodLength";
@SerializedName(SERIALIZED_NAME_ROLLOVER_PERIOD_LENGTH)
private Integer rolloverPeriodLength;
public static final String SERIALIZED_NAME_ROLLOVER_PERIODS = "rolloverPeriods";
@SerializedName(SERIALIZED_NAME_ROLLOVER_PERIODS)
private Long rolloverPeriods;
public static final String SERIALIZED_NAME_PRORATION_OPTION = "prorationOption";
@SerializedName(SERIALIZED_NAME_PRORATION_OPTION)
private String prorationOption;
public static final String SERIALIZED_NAME_SEGMENT = "segment";
@SerializedName(SERIALIZED_NAME_SEGMENT)
private Long segment;
public static final String SERIALIZED_NAME_SPECIFIC_END_DATE = "specificEndDate";
@SerializedName(SERIALIZED_NAME_SPECIFIC_END_DATE)
private LocalDate specificEndDate;
public static final String SERIALIZED_NAME_SUBSCRIPTION_CHARGE_INTERVAL_PRICING = "subscriptionChargeIntervalPricing";
@SerializedName(SERIALIZED_NAME_SUBSCRIPTION_CHARGE_INTERVAL_PRICING)
private List subscriptionChargeIntervalPricing;
public static final String SERIALIZED_NAME_TCV = "tcv";
@SerializedName(SERIALIZED_NAME_TCV)
private String tcv;
public static final String SERIALIZED_NAME_TIERS = "tiers";
@SerializedName(SERIALIZED_NAME_TIERS)
private List tiers;
public static final String SERIALIZED_NAME_TRIGGER_DATE = "triggerDate";
@SerializedName(SERIALIZED_NAME_TRIGGER_DATE)
private LocalDate triggerDate;
public static final String SERIALIZED_NAME_TRIGGER_EVENT = "triggerEvent";
@SerializedName(SERIALIZED_NAME_TRIGGER_EVENT)
private TriggerEvent triggerEvent;
public static final String SERIALIZED_NAME_UPSELL_ORIGIN_CHARGE_NUMBER = "upsellOriginChargeNumber";
@SerializedName(SERIALIZED_NAME_UPSELL_ORIGIN_CHARGE_NUMBER)
private String upsellOriginChargeNumber;
public static final String SERIALIZED_NAME_UP_TO_PERIODS = "upToPeriods";
@SerializedName(SERIALIZED_NAME_UP_TO_PERIODS)
private Long upToPeriods;
public static final String SERIALIZED_NAME_UP_TO_PERIODS_TYPE = "upToPeriodsType";
@SerializedName(SERIALIZED_NAME_UP_TO_PERIODS_TYPE)
private UpToPeriodsType upToPeriodsType;
public static final String SERIALIZED_NAME_VALIDITY_PERIOD_TYPE = "validityPeriodType";
@SerializedName(SERIALIZED_NAME_VALIDITY_PERIOD_TYPE)
private ValidityPeriodType validityPeriodType;
public static final String SERIALIZED_NAME_PRICE_UPSELL_QUANTITY_STACKED = "priceUpsellQuantityStacked";
@SerializedName(SERIALIZED_NAME_PRICE_UPSELL_QUANTITY_STACKED)
private Boolean priceUpsellQuantityStacked;
/**
* The POB policy type, it is available when permission EnableAdditionalRevenueFields is on
*/
@JsonAdapter(PobPolicyEnum.Adapter.class)
public enum PobPolicyEnum {
PLACEHOLDER("Placeholder");
private String value;
PobPolicyEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static PobPolicyEnum fromValue(String value) {
for (PobPolicyEnum b : PobPolicyEnum.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 PobPolicyEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public PobPolicyEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return PobPolicyEnum.fromValue(value);
}
}
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
String value = jsonElement.getAsString();
PobPolicyEnum.fromValue(value);
}
}
public static final String SERIALIZED_NAME_POB_POLICY = "pobPolicy";
@SerializedName(SERIALIZED_NAME_POB_POLICY)
private PobPolicyEnum pobPolicy;
public static final String SERIALIZED_NAME_SALES_PRICE = "salesPrice";
@SerializedName(SERIALIZED_NAME_SALES_PRICE)
private BigDecimal salesPrice;
public GetSubscriptionRatePlanChargesWithAllSegments() {
}
public GetSubscriptionRatePlanChargesWithAllSegments billingDay(String billingDay) {
this.billingDay = billingDay;
return this;
}
/**
* Get billingDay
* @return billingDay
*/
@javax.annotation.Nullable
public String getBillingDay() {
return billingDay;
}
public void setBillingDay(String billingDay) {
this.billingDay = billingDay;
}
public GetSubscriptionRatePlanChargesWithAllSegments billingPeriod(BillingPeriod billingPeriod) {
this.billingPeriod = billingPeriod;
return this;
}
/**
* Get billingPeriod
* @return billingPeriod
*/
@javax.annotation.Nullable
public BillingPeriod getBillingPeriod() {
return billingPeriod;
}
public void setBillingPeriod(BillingPeriod billingPeriod) {
this.billingPeriod = billingPeriod;
}
public GetSubscriptionRatePlanChargesWithAllSegments billingPeriodAlignment(BillingPeriodAlignment billingPeriodAlignment) {
this.billingPeriodAlignment = billingPeriodAlignment;
return this;
}
/**
* Get billingPeriodAlignment
* @return billingPeriodAlignment
*/
@javax.annotation.Nullable
public BillingPeriodAlignment getBillingPeriodAlignment() {
return billingPeriodAlignment;
}
public void setBillingPeriodAlignment(BillingPeriodAlignment billingPeriodAlignment) {
this.billingPeriodAlignment = billingPeriodAlignment;
}
public GetSubscriptionRatePlanChargesWithAllSegments billingTiming(BillingTiming billingTiming) {
this.billingTiming = billingTiming;
return this;
}
/**
* Get billingTiming
* @return billingTiming
*/
@javax.annotation.Nullable
public BillingTiming getBillingTiming() {
return billingTiming;
}
public void setBillingTiming(BillingTiming billingTiming) {
this.billingTiming = billingTiming;
}
public GetSubscriptionRatePlanChargesWithAllSegments chargeSegments(List chargeSegments) {
this.chargeSegments = chargeSegments;
return this;
}
public GetSubscriptionRatePlanChargesWithAllSegments addChargeSegmentsItem(RatePlanChargeSegment chargeSegmentsItem) {
if (this.chargeSegments == null) {
this.chargeSegments = new ArrayList<>();
}
this.chargeSegments.add(chargeSegmentsItem);
return this;
}
/**
* Billing cycle day (BCD), which is when bill runs generate invoices for charges associated with the product rate plan charge or the account. Values: * `DefaultFromCustomer` * `SpecificDayofMonth(# of the month)` * `SubscriptionStartDay` * `ChargeTriggerDay` * `SpecificDayofWeek/dayofweek`: in which dayofweek is the day in the week you define your billing periods to start. In the response data, a day-of-the-month ordinal value (`first`-`31st`) appears in place of the hash sign above (\"#\"). If this value exceeds the number of days in a particular month, the last day of the month is used as the BCD.
* @return chargeSegments
*/
@javax.annotation.Nullable
public List getChargeSegments() {
return chargeSegments;
}
public void setChargeSegments(List chargeSegments) {
this.chargeSegments = chargeSegments;
}
public GetSubscriptionRatePlanChargesWithAllSegments excludeItemBillingFromRevenueAccounting(Boolean excludeItemBillingFromRevenueAccounting) {
this.excludeItemBillingFromRevenueAccounting = excludeItemBillingFromRevenueAccounting;
return this;
}
/**
* Get excludeItemBillingFromRevenueAccounting
* @return excludeItemBillingFromRevenueAccounting
*/
@javax.annotation.Nullable
public Boolean getExcludeItemBillingFromRevenueAccounting() {
return excludeItemBillingFromRevenueAccounting;
}
public void setExcludeItemBillingFromRevenueAccounting(Boolean excludeItemBillingFromRevenueAccounting) {
this.excludeItemBillingFromRevenueAccounting = excludeItemBillingFromRevenueAccounting;
}
public GetSubscriptionRatePlanChargesWithAllSegments excludeItemBookingFromRevenueAccounting(Boolean excludeItemBookingFromRevenueAccounting) {
this.excludeItemBookingFromRevenueAccounting = excludeItemBookingFromRevenueAccounting;
return this;
}
/**
* Get excludeItemBookingFromRevenueAccounting
* @return excludeItemBookingFromRevenueAccounting
*/
@javax.annotation.Nullable
public Boolean getExcludeItemBookingFromRevenueAccounting() {
return excludeItemBookingFromRevenueAccounting;
}
public void setExcludeItemBookingFromRevenueAccounting(Boolean excludeItemBookingFromRevenueAccounting) {
this.excludeItemBookingFromRevenueAccounting = excludeItemBookingFromRevenueAccounting;
}
public GetSubscriptionRatePlanChargesWithAllSegments invoiceScheduleId(String invoiceScheduleId) {
this.invoiceScheduleId = invoiceScheduleId;
return this;
}
/**
* Get invoiceScheduleId
* @return invoiceScheduleId
*/
@javax.annotation.Nullable
public String getInvoiceScheduleId() {
return invoiceScheduleId;
}
public void setInvoiceScheduleId(String invoiceScheduleId) {
this.invoiceScheduleId = invoiceScheduleId;
}
public GetSubscriptionRatePlanChargesWithAllSegments isAllocationEligible(Boolean isAllocationEligible) {
this.isAllocationEligible = isAllocationEligible;
return this;
}
/**
* Get isAllocationEligible
* @return isAllocationEligible
*/
@javax.annotation.Nullable
public Boolean getIsAllocationEligible() {
return isAllocationEligible;
}
public void setIsAllocationEligible(Boolean isAllocationEligible) {
this.isAllocationEligible = isAllocationEligible;
}
public GetSubscriptionRatePlanChargesWithAllSegments isUnbilled(Boolean isUnbilled) {
this.isUnbilled = isUnbilled;
return this;
}
/**
* Get isUnbilled
* @return isUnbilled
*/
@javax.annotation.Nullable
public Boolean getIsUnbilled() {
return isUnbilled;
}
public void setIsUnbilled(Boolean isUnbilled) {
this.isUnbilled = isUnbilled;
}
public GetSubscriptionRatePlanChargesWithAllSegments listPriceBase(ChargeListPriceBase listPriceBase) {
this.listPriceBase = listPriceBase;
return this;
}
/**
* Get listPriceBase
* @return listPriceBase
*/
@javax.annotation.Nullable
public ChargeListPriceBase getListPriceBase() {
return listPriceBase;
}
public void setListPriceBase(ChargeListPriceBase listPriceBase) {
this.listPriceBase = listPriceBase;
}
public GetSubscriptionRatePlanChargesWithAllSegments model(ChargeModel model) {
this.model = model;
return this;
}
/**
* Get model
* @return model
*/
@javax.annotation.Nullable
public ChargeModel getModel() {
return model;
}
public void setModel(ChargeModel model) {
this.model = model;
}
public GetSubscriptionRatePlanChargesWithAllSegments name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
*/
@javax.annotation.Nullable
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public GetSubscriptionRatePlanChargesWithAllSegments number(String number) {
this.number = number;
return this;
}
/**
* Get number
* @return number
*/
@javax.annotation.Nullable
public String getNumber() {
return number;
}
public void setNumber(String number) {
this.number = number;
}
public GetSubscriptionRatePlanChargesWithAllSegments numberOfPeriods(Long numberOfPeriods) {
this.numberOfPeriods = numberOfPeriods;
return this;
}
/**
* Get numberOfPeriods
* @return numberOfPeriods
*/
@javax.annotation.Nullable
public Long getNumberOfPeriods() {
return numberOfPeriods;
}
public void setNumberOfPeriods(Long numberOfPeriods) {
this.numberOfPeriods = numberOfPeriods;
}
public GetSubscriptionRatePlanChargesWithAllSegments originalChargeId(String originalChargeId) {
this.originalChargeId = originalChargeId;
return this;
}
/**
* Get originalChargeId
* @return originalChargeId
*/
@javax.annotation.Nullable
public String getOriginalChargeId() {
return originalChargeId;
}
public void setOriginalChargeId(String originalChargeId) {
this.originalChargeId = originalChargeId;
}
public GetSubscriptionRatePlanChargesWithAllSegments overageCalculationOption(OverageCalculationOption overageCalculationOption) {
this.overageCalculationOption = overageCalculationOption;
return this;
}
/**
* Get overageCalculationOption
* @return overageCalculationOption
*/
@javax.annotation.Nullable
public OverageCalculationOption getOverageCalculationOption() {
return overageCalculationOption;
}
public void setOverageCalculationOption(OverageCalculationOption overageCalculationOption) {
this.overageCalculationOption = overageCalculationOption;
}
public GetSubscriptionRatePlanChargesWithAllSegments overageUnusedUnitsCreditOption(OverageUnusedUnitsCreditOption overageUnusedUnitsCreditOption) {
this.overageUnusedUnitsCreditOption = overageUnusedUnitsCreditOption;
return this;
}
/**
* Get overageUnusedUnitsCreditOption
* @return overageUnusedUnitsCreditOption
*/
@javax.annotation.Nullable
public OverageUnusedUnitsCreditOption getOverageUnusedUnitsCreditOption() {
return overageUnusedUnitsCreditOption;
}
public void setOverageUnusedUnitsCreditOption(OverageUnusedUnitsCreditOption overageUnusedUnitsCreditOption) {
this.overageUnusedUnitsCreditOption = overageUnusedUnitsCreditOption;
}
public GetSubscriptionRatePlanChargesWithAllSegments productCategory(ProductCategory productCategory) {
this.productCategory = productCategory;
return this;
}
/**
* Get productCategory
* @return productCategory
*/
@javax.annotation.Nullable
public ProductCategory getProductCategory() {
return productCategory;
}
public void setProductCategory(ProductCategory productCategory) {
this.productCategory = productCategory;
}
public GetSubscriptionRatePlanChargesWithAllSegments productClass(String productClass) {
this.productClass = productClass;
return this;
}
/**
* Get productClass
* @return productClass
*/
@javax.annotation.Nullable
public String getProductClass() {
return productClass;
}
public void setProductClass(String productClass) {
this.productClass = productClass;
}
public GetSubscriptionRatePlanChargesWithAllSegments productFamily(String productFamily) {
this.productFamily = productFamily;
return this;
}
/**
* Get productFamily
* @return productFamily
*/
@javax.annotation.Nullable
public String getProductFamily() {
return productFamily;
}
public void setProductFamily(String productFamily) {
this.productFamily = productFamily;
}
public GetSubscriptionRatePlanChargesWithAllSegments productLine(String productLine) {
this.productLine = productLine;
return this;
}
/**
* Get productLine
* @return productLine
*/
@javax.annotation.Nullable
public String getProductLine() {
return productLine;
}
public void setProductLine(String productLine) {
this.productLine = productLine;
}
public GetSubscriptionRatePlanChargesWithAllSegments productRatePlanChargeId(String productRatePlanChargeId) {
this.productRatePlanChargeId = productRatePlanChargeId;
return this;
}
/**
* Get productRatePlanChargeId
* @return productRatePlanChargeId
*/
@javax.annotation.Nullable
public String getProductRatePlanChargeId() {
return productRatePlanChargeId;
}
public void setProductRatePlanChargeId(String productRatePlanChargeId) {
this.productRatePlanChargeId = productRatePlanChargeId;
}
public GetSubscriptionRatePlanChargesWithAllSegments productRatePlanChargeNumber(String productRatePlanChargeNumber) {
this.productRatePlanChargeNumber = productRatePlanChargeNumber;
return this;
}
/**
* Get productRatePlanChargeNumber
* @return productRatePlanChargeNumber
*/
@javax.annotation.Nullable
public String getProductRatePlanChargeNumber() {
return productRatePlanChargeNumber;
}
public void setProductRatePlanChargeNumber(String productRatePlanChargeNumber) {
this.productRatePlanChargeNumber = productRatePlanChargeNumber;
}
public GetSubscriptionRatePlanChargesWithAllSegments ratingGroup(RatingGroup ratingGroup) {
this.ratingGroup = ratingGroup;
return this;
}
/**
* Get ratingGroup
* @return ratingGroup
*/
@javax.annotation.Nullable
public RatingGroup getRatingGroup() {
return ratingGroup;
}
public void setRatingGroup(RatingGroup ratingGroup) {
this.ratingGroup = ratingGroup;
}
public GetSubscriptionRatePlanChargesWithAllSegments smoothingModel(SmoothingModel smoothingModel) {
this.smoothingModel = smoothingModel;
return this;
}
/**
* Get smoothingModel
* @return smoothingModel
*/
@javax.annotation.Nullable
public SmoothingModel getSmoothingModel() {
return smoothingModel;
}
public void setSmoothingModel(SmoothingModel smoothingModel) {
this.smoothingModel = smoothingModel;
}
public GetSubscriptionRatePlanChargesWithAllSegments specificBillingPeriod(Long specificBillingPeriod) {
this.specificBillingPeriod = specificBillingPeriod;
return this;
}
/**
* Get specificBillingPeriod
* @return specificBillingPeriod
*/
@javax.annotation.Nullable
public Long getSpecificBillingPeriod() {
return specificBillingPeriod;
}
public void setSpecificBillingPeriod(Long specificBillingPeriod) {
this.specificBillingPeriod = specificBillingPeriod;
}
public GetSubscriptionRatePlanChargesWithAllSegments specificListPriceBase(Integer specificListPriceBase) {
this.specificListPriceBase = specificListPriceBase;
return this;
}
/**
* Get specificListPriceBase
* minimum: 1
* maximum: 200
* @return specificListPriceBase
*/
@javax.annotation.Nullable
public Integer getSpecificListPriceBase() {
return specificListPriceBase;
}
public void setSpecificListPriceBase(Integer specificListPriceBase) {
this.specificListPriceBase = specificListPriceBase;
}
public GetSubscriptionRatePlanChargesWithAllSegments type(ChargeType type) {
this.type = type;
return this;
}
/**
* Get type
* @return type
*/
@javax.annotation.Nullable
public ChargeType getType() {
return type;
}
public void setType(ChargeType type) {
this.type = type;
}
public GetSubscriptionRatePlanChargesWithAllSegments unusedUnitsCreditRates(BigDecimal unusedUnitsCreditRates) {
this.unusedUnitsCreditRates = unusedUnitsCreditRates;
return this;
}
/**
* Get unusedUnitsCreditRates
* @return unusedUnitsCreditRates
*/
@javax.annotation.Nullable
public BigDecimal getUnusedUnitsCreditRates() {
return unusedUnitsCreditRates;
}
public void setUnusedUnitsCreditRates(BigDecimal unusedUnitsCreditRates) {
this.unusedUnitsCreditRates = unusedUnitsCreditRates;
}
public GetSubscriptionRatePlanChargesWithAllSegments uom(String uom) {
this.uom = uom;
return this;
}
/**
* Specifies the units to measure usage.
* @return uom
*/
@javax.annotation.Nullable
public String getUom() {
return uom;
}
public void setUom(String uom) {
this.uom = uom;
}
public GetSubscriptionRatePlanChargesWithAllSegments usageRecordRatingOption(UsageRecordRatingOption usageRecordRatingOption) {
this.usageRecordRatingOption = usageRecordRatingOption;
return this;
}
/**
* Get usageRecordRatingOption
* @return usageRecordRatingOption
*/
@javax.annotation.Nullable
public UsageRecordRatingOption getUsageRecordRatingOption() {
return usageRecordRatingOption;
}
public void setUsageRecordRatingOption(UsageRecordRatingOption usageRecordRatingOption) {
this.usageRecordRatingOption = usageRecordRatingOption;
}
public GetSubscriptionRatePlanChargesWithAllSegments version(Long version) {
this.version = version;
return this;
}
/**
* Get version
* @return version
*/
@javax.annotation.Nullable
public Long getVersion() {
return version;
}
public void setVersion(Long version) {
this.version = version;
}
public GetSubscriptionRatePlanChargesWithAllSegments amendedByOrderOn(LocalDate amendedByOrderOn) {
this.amendedByOrderOn = amendedByOrderOn;
return this;
}
/**
* The date when the rate plan charge is amended through an order or amendment. This field is to standardize the booking date information to increase audit ability and traceability of data between Zuora Billing and Zuora Revenue. It is mapped as the booking date for a sale order line in Zuora Revenue.
* @return amendedByOrderOn
*/
@javax.annotation.Nullable
public LocalDate getAmendedByOrderOn() {
return amendedByOrderOn;
}
public void setAmendedByOrderOn(LocalDate amendedByOrderOn) {
this.amendedByOrderOn = amendedByOrderOn;
}
public GetSubscriptionRatePlanChargesWithAllSegments applyDiscountTo(ApplyDiscountTo applyDiscountTo) {
this.applyDiscountTo = applyDiscountTo;
return this;
}
/**
* Get applyDiscountTo
* @return applyDiscountTo
*/
@javax.annotation.Nullable
public ApplyDiscountTo getApplyDiscountTo() {
return applyDiscountTo;
}
public void setApplyDiscountTo(ApplyDiscountTo applyDiscountTo) {
this.applyDiscountTo = applyDiscountTo;
}
public GetSubscriptionRatePlanChargesWithAllSegments chargeFunction(ChargeFunction chargeFunction) {
this.chargeFunction = chargeFunction;
return this;
}
/**
* Get chargeFunction
* @return chargeFunction
*/
@javax.annotation.Nullable
public ChargeFunction getChargeFunction() {
return chargeFunction;
}
public void setChargeFunction(ChargeFunction chargeFunction) {
this.chargeFunction = chargeFunction;
}
public GetSubscriptionRatePlanChargesWithAllSegments chargeModelConfiguration(ChargeModelConfigurationForSubscription chargeModelConfiguration) {
this.chargeModelConfiguration = chargeModelConfiguration;
return this;
}
/**
* Get chargeModelConfiguration
* @return chargeModelConfiguration
*/
@javax.annotation.Nullable
public ChargeModelConfigurationForSubscription getChargeModelConfiguration() {
return chargeModelConfiguration;
}
public void setChargeModelConfiguration(ChargeModelConfigurationForSubscription chargeModelConfiguration) {
this.chargeModelConfiguration = chargeModelConfiguration;
}
public GetSubscriptionRatePlanChargesWithAllSegments chargedThroughDate(LocalDate chargedThroughDate) {
this.chargedThroughDate = chargedThroughDate;
return this;
}
/**
* The date through which a customer has been billed for the charge.
* @return chargedThroughDate
*/
@javax.annotation.Nullable
public LocalDate getChargedThroughDate() {
return chargedThroughDate;
}
public void setChargedThroughDate(LocalDate chargedThroughDate) {
this.chargedThroughDate = chargedThroughDate;
}
public GetSubscriptionRatePlanChargesWithAllSegments commitmentType(CommitmentType commitmentType) {
this.commitmentType = commitmentType;
return this;
}
/**
* Get commitmentType
* @return commitmentType
*/
@javax.annotation.Nullable
public CommitmentType getCommitmentType() {
return commitmentType;
}
public void setCommitmentType(CommitmentType commitmentType) {
this.commitmentType = commitmentType;
}
public GetSubscriptionRatePlanChargesWithAllSegments prepaidCommittedAmount(String prepaidCommittedAmount) {
this.prepaidCommittedAmount = prepaidCommittedAmount;
return this;
}
/**
* Get prepaidCommittedAmount
* @return prepaidCommittedAmount
*/
@javax.annotation.Nullable
public String getPrepaidCommittedAmount() {
return prepaidCommittedAmount;
}
public void setPrepaidCommittedAmount(String prepaidCommittedAmount) {
this.prepaidCommittedAmount = prepaidCommittedAmount;
}
public GetSubscriptionRatePlanChargesWithAllSegments productChargeDefinitionId(String productChargeDefinitionId) {
this.productChargeDefinitionId = productChargeDefinitionId;
return this;
}
/**
* Get productChargeDefinitionId
* @return productChargeDefinitionId
*/
@javax.annotation.Nullable
public String getProductChargeDefinitionId() {
return productChargeDefinitionId;
}
public void setProductChargeDefinitionId(String productChargeDefinitionId) {
this.productChargeDefinitionId = productChargeDefinitionId;
}
public GetSubscriptionRatePlanChargesWithAllSegments isStackedDiscount(Boolean isStackedDiscount) {
this.isStackedDiscount = isStackedDiscount;
return this;
}
/**
* Get isStackedDiscount
* @return isStackedDiscount
*/
@javax.annotation.Nullable
public Boolean getIsStackedDiscount() {
return isStackedDiscount;
}
public void setIsStackedDiscount(Boolean isStackedDiscount) {
this.isStackedDiscount = isStackedDiscount;
}
public GetSubscriptionRatePlanChargesWithAllSegments reflectDiscountInNetAmount(Boolean reflectDiscountInNetAmount) {
this.reflectDiscountInNetAmount = reflectDiscountInNetAmount;
return this;
}
/**
* Get reflectDiscountInNetAmount
* @return reflectDiscountInNetAmount
*/
@javax.annotation.Nullable
public Boolean getReflectDiscountInNetAmount() {
return reflectDiscountInNetAmount;
}
public void setReflectDiscountInNetAmount(Boolean reflectDiscountInNetAmount) {
this.reflectDiscountInNetAmount = reflectDiscountInNetAmount;
}
public GetSubscriptionRatePlanChargesWithAllSegments centralizedPrice(Boolean centralizedPrice) {
this.centralizedPrice = centralizedPrice;
return this;
}
/**
* Get centralizedPrice
* @return centralizedPrice
*/
@javax.annotation.Nullable
public Boolean getCentralizedPrice() {
return centralizedPrice;
}
public void setCentralizedPrice(Boolean centralizedPrice) {
this.centralizedPrice = centralizedPrice;
}
public GetSubscriptionRatePlanChargesWithAllSegments numberOfDeliveries(BigDecimal numberOfDeliveries) {
this.numberOfDeliveries = numberOfDeliveries;
return this;
}
/**
* Get numberOfDeliveries
* @return numberOfDeliveries
*/
@javax.annotation.Nullable
public BigDecimal getNumberOfDeliveries() {
return numberOfDeliveries;
}
public void setNumberOfDeliveries(BigDecimal numberOfDeliveries) {
this.numberOfDeliveries = numberOfDeliveries;
}
public GetSubscriptionRatePlanChargesWithAllSegments creditOption(CreditOptionEnum creditOption) {
this.creditOption = creditOption;
return this;
}
/**
* **Note**: This field is only available if you have the [Prepaid with Drawdown](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown) feature enabled. To use this field, you must set the `X-Zuora-WSDL-Version` request header to 114 or higher. Otherwise, an error occurs. The way to calculate credit. See [Credit Option](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Prepaid_with_Drawdown/Create_prepayment_charge#Credit_Option) for more information.
* @return creditOption
*/
@javax.annotation.Nullable
public CreditOptionEnum getCreditOption() {
return creditOption;
}
public void setCreditOption(CreditOptionEnum creditOption) {
this.creditOption = creditOption;
}
public GetSubscriptionRatePlanChargesWithAllSegments currency(String currency) {
this.currency = currency;
return this;
}
/**
* Currency used by the account. For example, `USD` or `EUR`.
* @return currency
*/
@javax.annotation.Nullable
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public GetSubscriptionRatePlanChargesWithAllSegments deliverySchedule(DeliverySchedule deliverySchedule) {
this.deliverySchedule = deliverySchedule;
return this;
}
/**
* Get deliverySchedule
* @return deliverySchedule
*/
@javax.annotation.Nullable
public DeliverySchedule getDeliverySchedule() {
return deliverySchedule;
}
public void setDeliverySchedule(DeliverySchedule deliverySchedule) {
this.deliverySchedule = deliverySchedule;
}
public GetSubscriptionRatePlanChargesWithAllSegments description(String description) {
this.description = description;
return this;
}
/**
* Description of the rate plan charge.
* @return description
*/
@javax.annotation.Nullable
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public GetSubscriptionRatePlanChargesWithAllSegments discountAmount(BigDecimal discountAmount) {
this.discountAmount = discountAmount;
return this;
}
/**
* The amount of the discount.
* @return discountAmount
*/
@javax.annotation.Nullable
public BigDecimal getDiscountAmount() {
return discountAmount;
}
public void setDiscountAmount(BigDecimal discountAmount) {
this.discountAmount = discountAmount;
}
public GetSubscriptionRatePlanChargesWithAllSegments discountApplyDetails(List discountApplyDetails) {
this.discountApplyDetails = discountApplyDetails;
return this;
}
public GetSubscriptionRatePlanChargesWithAllSegments addDiscountApplyDetailsItem(DiscountApplyDetail discountApplyDetailsItem) {
if (this.discountApplyDetails == null) {
this.discountApplyDetails = new ArrayList<>();
}
this.discountApplyDetails.add(discountApplyDetailsItem);
return this;
}
/**
* Container for the application details about a discount rate plan charge. Only discount rate plan charges have values in this field.
* @return discountApplyDetails
*/
@javax.annotation.Nullable
public List getDiscountApplyDetails() {
return discountApplyDetails;
}
public void setDiscountApplyDetails(List discountApplyDetails) {
this.discountApplyDetails = discountApplyDetails;
}
public GetSubscriptionRatePlanChargesWithAllSegments discountClass(String discountClass) {
this.discountClass = discountClass;
return this;
}
/**
* The class that the discount belongs to. The discount class defines the order in which discount rate plan charges are applied. For more information, see [Manage Discount Classes](https://knowledgecenter.zuora.com/BC_Subscription_Management/Product_Catalog/B_Charge_Models/Manage_Discount_Classes).
* @return discountClass
*/
@javax.annotation.Nullable
public String getDiscountClass() {
return discountClass;
}
public void setDiscountClass(String discountClass) {
this.discountClass = discountClass;
}
public GetSubscriptionRatePlanChargesWithAllSegments discountLevel(DiscountLevel discountLevel) {
this.discountLevel = discountLevel;
return this;
}
/**
* Get discountLevel
* @return discountLevel
*/
@javax.annotation.Nullable
public DiscountLevel getDiscountLevel() {
return discountLevel;
}
public void setDiscountLevel(DiscountLevel discountLevel) {
this.discountLevel = discountLevel;
}
public GetSubscriptionRatePlanChargesWithAllSegments discountPercentage(BigDecimal discountPercentage) {
this.discountPercentage = discountPercentage;
return this;
}
/**
* The amount of the discount as a percentage.
* @return discountPercentage
*/
@javax.annotation.Nullable
public BigDecimal getDiscountPercentage() {
return discountPercentage;
}
public void setDiscountPercentage(BigDecimal discountPercentage) {
this.discountPercentage = discountPercentage;
}
public GetSubscriptionRatePlanChargesWithAllSegments applyToBillingPeriodPartially(Boolean applyToBillingPeriodPartially) {
this.applyToBillingPeriodPartially = applyToBillingPeriodPartially;
return this;
}
/**
* Allow the discount duration to be aligned with the billing period partially. **Note**: This field is only available if you have the Enhanced Discounts feature enabled.
* @return applyToBillingPeriodPartially
*/
@javax.annotation.Nullable
public Boolean getApplyToBillingPeriodPartially() {
return applyToBillingPeriodPartially;
}
public void setApplyToBillingPeriodPartially(Boolean applyToBillingPeriodPartially) {
this.applyToBillingPeriodPartially = applyToBillingPeriodPartially;
}
public GetSubscriptionRatePlanChargesWithAllSegments dmrc(String dmrc) {
this.dmrc = dmrc;
return this;
}
/**
* The change (delta) of monthly recurring charge exists when the change in monthly recurring revenue caused by an amendment or a new subscription.
* @return dmrc
*/
@javax.annotation.Nullable
public String getDmrc() {
return dmrc;
}
public void setDmrc(String dmrc) {
this.dmrc = dmrc;
}
public GetSubscriptionRatePlanChargesWithAllSegments done(Boolean done) {
this.done = done;
return this;
}
/**
* A value of `true` indicates that an invoice for a charge segment has been completed. A value of `false` indicates that an invoice has not been completed for the charge segment.
* @return done
*/
@javax.annotation.Nullable
public Boolean getDone() {
return done;
}
public void setDone(Boolean done) {
this.done = done;
}
public GetSubscriptionRatePlanChargesWithAllSegments drawdownRate(String drawdownRate) {
this.drawdownRate = drawdownRate;
return this;
}
/**
* Get drawdownRate
* @return drawdownRate
*/
@javax.annotation.Nullable
public String getDrawdownRate() {
return drawdownRate;
}
public void setDrawdownRate(String drawdownRate) {
this.drawdownRate = drawdownRate;
}
public GetSubscriptionRatePlanChargesWithAllSegments drawdownUom(String drawdownUom) {
this.drawdownUom = drawdownUom;
return this;
}
/**
* Specifies the units to measure usage.
* @return drawdownUom
*/
@javax.annotation.Nullable
public String getDrawdownUom() {
return drawdownUom;
}
public void setDrawdownUom(String drawdownUom) {
this.drawdownUom = drawdownUom;
}
public GetSubscriptionRatePlanChargesWithAllSegments dtcv(String dtcv) {
this.dtcv = dtcv;
return this;
}
/**
* After an amendment or an AutomatedPriceChange event, `dtcv` displays the change (delta) for the total contract value (TCV) amount for this charge, compared with its previous value with recurring charge types.
* @return dtcv
*/
@javax.annotation.Nullable
public String getDtcv() {
return dtcv;
}
public void setDtcv(String dtcv) {
this.dtcv = dtcv;
}
public GetSubscriptionRatePlanChargesWithAllSegments effectiveEndDate(LocalDate effectiveEndDate) {
this.effectiveEndDate = effectiveEndDate;
return this;
}
/**
* Get effectiveEndDate
* @return effectiveEndDate
*/
@javax.annotation.Nullable
public LocalDate getEffectiveEndDate() {
return effectiveEndDate;
}
public void setEffectiveEndDate(LocalDate effectiveEndDate) {
this.effectiveEndDate = effectiveEndDate;
}
public GetSubscriptionRatePlanChargesWithAllSegments effectiveStartDate(LocalDate effectiveStartDate) {
this.effectiveStartDate = effectiveStartDate;
return this;
}
/**
* Get effectiveStartDate
* @return effectiveStartDate
*/
@javax.annotation.Nullable
public LocalDate getEffectiveStartDate() {
return effectiveStartDate;
}
public void setEffectiveStartDate(LocalDate effectiveStartDate) {
this.effectiveStartDate = effectiveStartDate;
}
public GetSubscriptionRatePlanChargesWithAllSegments endDateCondition(EndDateCondition endDateCondition) {
this.endDateCondition = endDateCondition;
return this;
}
/**
* Get endDateCondition
* @return endDateCondition
*/
@javax.annotation.Nullable
public EndDateCondition getEndDateCondition() {
return endDateCondition;
}
public void setEndDateCondition(EndDateCondition endDateCondition) {
this.endDateCondition = endDateCondition;
}
public GetSubscriptionRatePlanChargesWithAllSegments id(String id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
*/
@javax.annotation.Nullable
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public GetSubscriptionRatePlanChargesWithAllSegments includedUnits(BigDecimal includedUnits) {
this.includedUnits = includedUnits;
return this;
}
/**
* Get includedUnits
* @return includedUnits
*/
@javax.annotation.Nullable
public BigDecimal getIncludedUnits() {
return includedUnits;
}
public void setIncludedUnits(BigDecimal includedUnits) {
this.includedUnits = includedUnits;
}
public GetSubscriptionRatePlanChargesWithAllSegments overagePrice(BigDecimal overagePrice) {
this.overagePrice = overagePrice;
return this;
}
/**
* Get overagePrice
* @return overagePrice
*/
@javax.annotation.Nullable
public BigDecimal getOveragePrice() {
return overagePrice;
}
public void setOveragePrice(BigDecimal overagePrice) {
this.overagePrice = overagePrice;
}
public GetSubscriptionRatePlanChargesWithAllSegments inputArgumentId(String inputArgumentId) {
this.inputArgumentId = inputArgumentId;
return this;
}
/**
* Get inputArgumentId
* @return inputArgumentId
*/
@javax.annotation.Nullable
public String getInputArgumentId() {
return inputArgumentId;
}
public void setInputArgumentId(String inputArgumentId) {
this.inputArgumentId = inputArgumentId;
}
public GetSubscriptionRatePlanChargesWithAllSegments isCommitted(Boolean isCommitted) {
this.isCommitted = isCommitted;
return this;
}
/**
* Get isCommitted
* @return isCommitted
*/
@javax.annotation.Nullable
public Boolean getIsCommitted() {
return isCommitted;
}
public void setIsCommitted(Boolean isCommitted) {
this.isCommitted = isCommitted;
}
public GetSubscriptionRatePlanChargesWithAllSegments isPrepaid(Boolean isPrepaid) {
this.isPrepaid = isPrepaid;
return this;
}
/**
* Get isPrepaid
* @return isPrepaid
*/
@javax.annotation.Nullable
public Boolean getIsPrepaid() {
return isPrepaid;
}
public void setIsPrepaid(Boolean isPrepaid) {
this.isPrepaid = isPrepaid;
}
public GetSubscriptionRatePlanChargesWithAllSegments isRollover(Boolean isRollover) {
this.isRollover = isRollover;
return this;
}
/**
* Get isRollover
* @return isRollover
*/
@javax.annotation.Nullable
public Boolean getIsRollover() {
return isRollover;
}
public void setIsRollover(Boolean isRollover) {
this.isRollover = isRollover;
}
public GetSubscriptionRatePlanChargesWithAllSegments mrr(String mrr) {
this.mrr = mrr;
return this;
}
/**
* Get mrr
* @return mrr
*/
@javax.annotation.Nullable
public String getMrr() {
return mrr;
}
public void setMrr(String mrr) {
this.mrr = mrr;
}
public GetSubscriptionRatePlanChargesWithAllSegments originalOrderDate(LocalDate originalOrderDate) {
this.originalOrderDate = originalOrderDate;
return this;
}
/**
* Get originalOrderDate
* @return originalOrderDate
*/
@javax.annotation.Nullable
public LocalDate getOriginalOrderDate() {
return originalOrderDate;
}
public void setOriginalOrderDate(LocalDate originalOrderDate) {
this.originalOrderDate = originalOrderDate;
}
public GetSubscriptionRatePlanChargesWithAllSegments prepaidOperationType(PrepaidOperationTypeEnum prepaidOperationType) {
this.prepaidOperationType = prepaidOperationType;
return this;
}
/**
* Get prepaidOperationType
* @return prepaidOperationType
*/
@javax.annotation.Nullable
public PrepaidOperationTypeEnum getPrepaidOperationType() {
return prepaidOperationType;
}
public void setPrepaidOperationType(PrepaidOperationTypeEnum prepaidOperationType) {
this.prepaidOperationType = prepaidOperationType;
}
public GetSubscriptionRatePlanChargesWithAllSegments prepaidQuantity(String prepaidQuantity) {
this.prepaidQuantity = prepaidQuantity;
return this;
}
/**
* Get prepaidQuantity
* @return prepaidQuantity
*/
@javax.annotation.Nullable
public String getPrepaidQuantity() {
return prepaidQuantity;
}
public void setPrepaidQuantity(String prepaidQuantity) {
this.prepaidQuantity = prepaidQuantity;
}
public GetSubscriptionRatePlanChargesWithAllSegments prepaidTotalQuantity(String prepaidTotalQuantity) {
this.prepaidTotalQuantity = prepaidTotalQuantity;
return this;
}
/**
* Get prepaidTotalQuantity
* @return prepaidTotalQuantity
*/
@javax.annotation.Nullable
public String getPrepaidTotalQuantity() {
return prepaidTotalQuantity;
}
public void setPrepaidTotalQuantity(String prepaidTotalQuantity) {
this.prepaidTotalQuantity = prepaidTotalQuantity;
}
public GetSubscriptionRatePlanChargesWithAllSegments prepaidUOM(String prepaidUOM) {
this.prepaidUOM = prepaidUOM;
return this;
}
/**
* Specifies the units to measure usage.
* @return prepaidUOM
*/
@javax.annotation.Nullable
public String getPrepaidUOM() {
return prepaidUOM;
}
public void setPrepaidUOM(String prepaidUOM) {
this.prepaidUOM = prepaidUOM;
}
public GetSubscriptionRatePlanChargesWithAllSegments quantity(BigDecimal quantity) {
this.quantity = quantity;
return this;
}
/**
* Get quantity
* @return quantity
*/
@javax.annotation.Nullable
public BigDecimal getQuantity() {
return quantity;
}
public void setQuantity(BigDecimal quantity) {
this.quantity = quantity;
}
public GetSubscriptionRatePlanChargesWithAllSegments price(BigDecimal price) {
this.price = price;
return this;
}
/**
* Get price
* @return price
*/
@javax.annotation.Nullable
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public GetSubscriptionRatePlanChargesWithAllSegments originalListPrice(BigDecimal originalListPrice) {
this.originalListPrice = originalListPrice;
return this;
}
/**
* Get originalListPrice
* @return originalListPrice
*/
@javax.annotation.Nullable
public BigDecimal getOriginalListPrice() {
return originalListPrice;
}
public void setOriginalListPrice(BigDecimal originalListPrice) {
this.originalListPrice = originalListPrice;
}
public GetSubscriptionRatePlanChargesWithAllSegments priceChangeOption(PriceChangeOption priceChangeOption) {
this.priceChangeOption = priceChangeOption;
return this;
}
/**
* Get priceChangeOption
* @return priceChangeOption
*/
@javax.annotation.Nullable
public PriceChangeOption getPriceChangeOption() {
return priceChangeOption;
}
public void setPriceChangeOption(PriceChangeOption priceChangeOption) {
this.priceChangeOption = priceChangeOption;
}
public GetSubscriptionRatePlanChargesWithAllSegments priceIncreasePercentage(BigDecimal priceIncreasePercentage) {
this.priceIncreasePercentage = priceIncreasePercentage;
return this;
}
/**
* Get priceIncreasePercentage
* @return priceIncreasePercentage
*/
@javax.annotation.Nullable
public BigDecimal getPriceIncreasePercentage() {
return priceIncreasePercentage;
}
public void setPriceIncreasePercentage(BigDecimal priceIncreasePercentage) {
this.priceIncreasePercentage = priceIncreasePercentage;
}
public GetSubscriptionRatePlanChargesWithAllSegments pricingSummary(String pricingSummary) {
this.pricingSummary = pricingSummary;
return this;
}
/**
* Get pricingSummary
* @return pricingSummary
*/
@javax.annotation.Nullable
public String getPricingSummary() {
return pricingSummary;
}
public void setPricingSummary(String pricingSummary) {
this.pricingSummary = pricingSummary;
}
public GetSubscriptionRatePlanChargesWithAllSegments processedThroughDate(LocalDate processedThroughDate) {
this.processedThroughDate = processedThroughDate;
return this;
}
/**
* Get processedThroughDate
* @return processedThroughDate
*/
@javax.annotation.Nullable
public LocalDate getProcessedThroughDate() {
return processedThroughDate;
}
public void setProcessedThroughDate(LocalDate processedThroughDate) {
this.processedThroughDate = processedThroughDate;
}
public GetSubscriptionRatePlanChargesWithAllSegments rolloverApply(RolloverApplyEnum rolloverApply) {
this.rolloverApply = rolloverApply;
return this;
}
/**
* Get rolloverApply
* @return rolloverApply
*/
@javax.annotation.Nullable
public RolloverApplyEnum getRolloverApply() {
return rolloverApply;
}
public void setRolloverApply(RolloverApplyEnum rolloverApply) {
this.rolloverApply = rolloverApply;
}
public GetSubscriptionRatePlanChargesWithAllSegments rolloverPeriodLength(Integer rolloverPeriodLength) {
this.rolloverPeriodLength = rolloverPeriodLength;
return this;
}
/**
* Get rolloverPeriodLength
* @return rolloverPeriodLength
*/
@javax.annotation.Nullable
public Integer getRolloverPeriodLength() {
return rolloverPeriodLength;
}
public void setRolloverPeriodLength(Integer rolloverPeriodLength) {
this.rolloverPeriodLength = rolloverPeriodLength;
}
public GetSubscriptionRatePlanChargesWithAllSegments rolloverPeriods(Long rolloverPeriods) {
this.rolloverPeriods = rolloverPeriods;
return this;
}
/**
* Get rolloverPeriods
* @return rolloverPeriods
*/
@javax.annotation.Nullable
public Long getRolloverPeriods() {
return rolloverPeriods;
}
public void setRolloverPeriods(Long rolloverPeriods) {
this.rolloverPeriods = rolloverPeriods;
}
public GetSubscriptionRatePlanChargesWithAllSegments prorationOption(String prorationOption) {
this.prorationOption = prorationOption;
return this;
}
/**
* Get prorationOption
* @return prorationOption
*/
@javax.annotation.Nullable
public String getProrationOption() {
return prorationOption;
}
public void setProrationOption(String prorationOption) {
this.prorationOption = prorationOption;
}
public GetSubscriptionRatePlanChargesWithAllSegments segment(Long segment) {
this.segment = segment;
return this;
}
/**
* Get segment
* @return segment
*/
@javax.annotation.Nullable
public Long getSegment() {
return segment;
}
public void setSegment(Long segment) {
this.segment = segment;
}
public GetSubscriptionRatePlanChargesWithAllSegments specificEndDate(LocalDate specificEndDate) {
this.specificEndDate = specificEndDate;
return this;
}
/**
* Get specificEndDate
* @return specificEndDate
*/
@javax.annotation.Nullable
public LocalDate getSpecificEndDate() {
return specificEndDate;
}
public void setSpecificEndDate(LocalDate specificEndDate) {
this.specificEndDate = specificEndDate;
}
public GetSubscriptionRatePlanChargesWithAllSegments subscriptionChargeIntervalPricing(List subscriptionChargeIntervalPricing) {
this.subscriptionChargeIntervalPricing = subscriptionChargeIntervalPricing;
return this;
}
public GetSubscriptionRatePlanChargesWithAllSegments addSubscriptionChargeIntervalPricingItem(IntervalPricing subscriptionChargeIntervalPricingItem) {
if (this.subscriptionChargeIntervalPricing == null) {
this.subscriptionChargeIntervalPricing = new ArrayList<>();
}
this.subscriptionChargeIntervalPricing.add(subscriptionChargeIntervalPricingItem);
return this;
}
/**
* Get subscriptionChargeIntervalPricing
* @return subscriptionChargeIntervalPricing
*/
@javax.annotation.Nullable
public List getSubscriptionChargeIntervalPricing() {
return subscriptionChargeIntervalPricing;
}
public void setSubscriptionChargeIntervalPricing(List subscriptionChargeIntervalPricing) {
this.subscriptionChargeIntervalPricing = subscriptionChargeIntervalPricing;
}
public GetSubscriptionRatePlanChargesWithAllSegments tcv(String tcv) {
this.tcv = tcv;
return this;
}
/**
* Get tcv
* @return tcv
*/
@javax.annotation.Nullable
public String getTcv() {
return tcv;
}
public void setTcv(String tcv) {
this.tcv = tcv;
}
public GetSubscriptionRatePlanChargesWithAllSegments tiers(List tiers) {
this.tiers = tiers;
return this;
}
public GetSubscriptionRatePlanChargesWithAllSegments addTiersItem(RatePlanChargeTier tiersItem) {
if (this.tiers == null) {
this.tiers = new ArrayList<>();
}
this.tiers.add(tiersItem);
return this;
}
/**
* Get tiers
* @return tiers
*/
@javax.annotation.Nullable
public List getTiers() {
return tiers;
}
public void setTiers(List tiers) {
this.tiers = tiers;
}
public GetSubscriptionRatePlanChargesWithAllSegments triggerDate(LocalDate triggerDate) {
this.triggerDate = triggerDate;
return this;
}
/**
* Get triggerDate
* @return triggerDate
*/
@javax.annotation.Nullable
public LocalDate getTriggerDate() {
return triggerDate;
}
public void setTriggerDate(LocalDate triggerDate) {
this.triggerDate = triggerDate;
}
public GetSubscriptionRatePlanChargesWithAllSegments triggerEvent(TriggerEvent triggerEvent) {
this.triggerEvent = triggerEvent;
return this;
}
/**
* Get triggerEvent
* @return triggerEvent
*/
@javax.annotation.Nullable
public TriggerEvent getTriggerEvent() {
return triggerEvent;
}
public void setTriggerEvent(TriggerEvent triggerEvent) {
this.triggerEvent = triggerEvent;
}
public GetSubscriptionRatePlanChargesWithAllSegments upsellOriginChargeNumber(String upsellOriginChargeNumber) {
this.upsellOriginChargeNumber = upsellOriginChargeNumber;
return this;
}
/**
* **Note**: The Quantity Upsell feature is in Limited Availability. If you wish to have access to the feature, submit a request at [Zuora Global Support](https://support.zuora.com). The identifier of the original upselling charge associated with the current charge.
* @return upsellOriginChargeNumber
*/
@javax.annotation.Nullable
public String getUpsellOriginChargeNumber() {
return upsellOriginChargeNumber;
}
public void setUpsellOriginChargeNumber(String upsellOriginChargeNumber) {
this.upsellOriginChargeNumber = upsellOriginChargeNumber;
}
public GetSubscriptionRatePlanChargesWithAllSegments upToPeriods(Long upToPeriods) {
this.upToPeriods = upToPeriods;
return this;
}
/**
* Get upToPeriods
* @return upToPeriods
*/
@javax.annotation.Nullable
public Long getUpToPeriods() {
return upToPeriods;
}
public void setUpToPeriods(Long upToPeriods) {
this.upToPeriods = upToPeriods;
}
public GetSubscriptionRatePlanChargesWithAllSegments upToPeriodsType(UpToPeriodsType upToPeriodsType) {
this.upToPeriodsType = upToPeriodsType;
return this;
}
/**
* Get upToPeriodsType
* @return upToPeriodsType
*/
@javax.annotation.Nullable
public UpToPeriodsType getUpToPeriodsType() {
return upToPeriodsType;
}
public void setUpToPeriodsType(UpToPeriodsType upToPeriodsType) {
this.upToPeriodsType = upToPeriodsType;
}
public GetSubscriptionRatePlanChargesWithAllSegments validityPeriodType(ValidityPeriodType validityPeriodType) {
this.validityPeriodType = validityPeriodType;
return this;
}
/**
* Get validityPeriodType
* @return validityPeriodType
*/
@javax.annotation.Nullable
public ValidityPeriodType getValidityPeriodType() {
return validityPeriodType;
}
public void setValidityPeriodType(ValidityPeriodType validityPeriodType) {
this.validityPeriodType = validityPeriodType;
}
public GetSubscriptionRatePlanChargesWithAllSegments priceUpsellQuantityStacked(Boolean priceUpsellQuantityStacked) {
this.priceUpsellQuantityStacked = priceUpsellQuantityStacked;
return this;
}
/**
* This field is availabe when PriceUpsellQuantityStacked permission enabled
* @return priceUpsellQuantityStacked
*/
@javax.annotation.Nullable
public Boolean getPriceUpsellQuantityStacked() {
return priceUpsellQuantityStacked;
}
public void setPriceUpsellQuantityStacked(Boolean priceUpsellQuantityStacked) {
this.priceUpsellQuantityStacked = priceUpsellQuantityStacked;
}
public GetSubscriptionRatePlanChargesWithAllSegments pobPolicy(PobPolicyEnum pobPolicy) {
this.pobPolicy = pobPolicy;
return this;
}
/**
* The POB policy type, it is available when permission EnableAdditionalRevenueFields is on
* @return pobPolicy
*/
@javax.annotation.Nullable
public PobPolicyEnum getPobPolicy() {
return pobPolicy;
}
public void setPobPolicy(PobPolicyEnum pobPolicy) {
this.pobPolicy = pobPolicy;
}
public GetSubscriptionRatePlanChargesWithAllSegments salesPrice(BigDecimal salesPrice) {
this.salesPrice = salesPrice;
return this;
}
/**
* Get salesPrice
* @return salesPrice
*/
@javax.annotation.Nullable
public BigDecimal getSalesPrice() {
return salesPrice;
}
public void setSalesPrice(BigDecimal salesPrice) {
this.salesPrice = salesPrice;
}
/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
* the 'additionalProperties' keyword in the OAS document.
*/
private Map additionalProperties;
/**
* Set the additional (undeclared) property with the specified name and value.
* If the property does not already exist, create it otherwise replace it.
*
* @param key name of the property
* @param value value of the property
* @return the GetSubscriptionRatePlanChargesWithAllSegments instance itself
*/
public GetSubscriptionRatePlanChargesWithAllSegments putAdditionalProperty(String key, Object value) {
if (this.additionalProperties == null) {
this.additionalProperties = new HashMap();
}
this.additionalProperties.put(key, value);
return this;
}
/**
* Return the additional (undeclared) property.
*
* @return a map of objects
*/
public Map getAdditionalProperties() {
return additionalProperties;
}
/**
* Return the additional (undeclared) property with the specified name.
*
* @param key name of the property
* @return an object
*/
public Object getAdditionalProperty(String key) {
if (this.additionalProperties == null) {
return null;
}
return this.additionalProperties.get(key);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetSubscriptionRatePlanChargesWithAllSegments getSubscriptionRatePlanChargesWithAllSegments = (GetSubscriptionRatePlanChargesWithAllSegments) o;
return Objects.equals(this.billingDay, getSubscriptionRatePlanChargesWithAllSegments.billingDay) &&
Objects.equals(this.billingPeriod, getSubscriptionRatePlanChargesWithAllSegments.billingPeriod) &&
Objects.equals(this.billingPeriodAlignment, getSubscriptionRatePlanChargesWithAllSegments.billingPeriodAlignment) &&
Objects.equals(this.billingTiming, getSubscriptionRatePlanChargesWithAllSegments.billingTiming) &&
Objects.equals(this.chargeSegments, getSubscriptionRatePlanChargesWithAllSegments.chargeSegments) &&
Objects.equals(this.excludeItemBillingFromRevenueAccounting, getSubscriptionRatePlanChargesWithAllSegments.excludeItemBillingFromRevenueAccounting) &&
Objects.equals(this.excludeItemBookingFromRevenueAccounting, getSubscriptionRatePlanChargesWithAllSegments.excludeItemBookingFromRevenueAccounting) &&
Objects.equals(this.invoiceScheduleId, getSubscriptionRatePlanChargesWithAllSegments.invoiceScheduleId) &&
Objects.equals(this.isAllocationEligible, getSubscriptionRatePlanChargesWithAllSegments.isAllocationEligible) &&
Objects.equals(this.isUnbilled, getSubscriptionRatePlanChargesWithAllSegments.isUnbilled) &&
Objects.equals(this.listPriceBase, getSubscriptionRatePlanChargesWithAllSegments.listPriceBase) &&
Objects.equals(this.model, getSubscriptionRatePlanChargesWithAllSegments.model) &&
Objects.equals(this.name, getSubscriptionRatePlanChargesWithAllSegments.name) &&
Objects.equals(this.number, getSubscriptionRatePlanChargesWithAllSegments.number) &&
Objects.equals(this.numberOfPeriods, getSubscriptionRatePlanChargesWithAllSegments.numberOfPeriods) &&
Objects.equals(this.originalChargeId, getSubscriptionRatePlanChargesWithAllSegments.originalChargeId) &&
Objects.equals(this.overageCalculationOption, getSubscriptionRatePlanChargesWithAllSegments.overageCalculationOption) &&
Objects.equals(this.overageUnusedUnitsCreditOption, getSubscriptionRatePlanChargesWithAllSegments.overageUnusedUnitsCreditOption) &&
Objects.equals(this.productCategory, getSubscriptionRatePlanChargesWithAllSegments.productCategory) &&
Objects.equals(this.productClass, getSubscriptionRatePlanChargesWithAllSegments.productClass) &&
Objects.equals(this.productFamily, getSubscriptionRatePlanChargesWithAllSegments.productFamily) &&
Objects.equals(this.productLine, getSubscriptionRatePlanChargesWithAllSegments.productLine) &&
Objects.equals(this.productRatePlanChargeId, getSubscriptionRatePlanChargesWithAllSegments.productRatePlanChargeId) &&
Objects.equals(this.productRatePlanChargeNumber, getSubscriptionRatePlanChargesWithAllSegments.productRatePlanChargeNumber) &&
Objects.equals(this.ratingGroup, getSubscriptionRatePlanChargesWithAllSegments.ratingGroup) &&
Objects.equals(this.smoothingModel, getSubscriptionRatePlanChargesWithAllSegments.smoothingModel) &&
Objects.equals(this.specificBillingPeriod, getSubscriptionRatePlanChargesWithAllSegments.specificBillingPeriod) &&
Objects.equals(this.specificListPriceBase, getSubscriptionRatePlanChargesWithAllSegments.specificListPriceBase) &&
Objects.equals(this.type, getSubscriptionRatePlanChargesWithAllSegments.type) &&
Objects.equals(this.unusedUnitsCreditRates, getSubscriptionRatePlanChargesWithAllSegments.unusedUnitsCreditRates) &&
Objects.equals(this.uom, getSubscriptionRatePlanChargesWithAllSegments.uom) &&
Objects.equals(this.usageRecordRatingOption, getSubscriptionRatePlanChargesWithAllSegments.usageRecordRatingOption) &&
Objects.equals(this.version, getSubscriptionRatePlanChargesWithAllSegments.version) &&
Objects.equals(this.amendedByOrderOn, getSubscriptionRatePlanChargesWithAllSegments.amendedByOrderOn) &&
Objects.equals(this.applyDiscountTo, getSubscriptionRatePlanChargesWithAllSegments.applyDiscountTo) &&
Objects.equals(this.chargeFunction, getSubscriptionRatePlanChargesWithAllSegments.chargeFunction) &&
Objects.equals(this.chargeModelConfiguration, getSubscriptionRatePlanChargesWithAllSegments.chargeModelConfiguration) &&
Objects.equals(this.chargedThroughDate, getSubscriptionRatePlanChargesWithAllSegments.chargedThroughDate) &&
Objects.equals(this.commitmentType, getSubscriptionRatePlanChargesWithAllSegments.commitmentType) &&
Objects.equals(this.prepaidCommittedAmount, getSubscriptionRatePlanChargesWithAllSegments.prepaidCommittedAmount) &&
Objects.equals(this.productChargeDefinitionId, getSubscriptionRatePlanChargesWithAllSegments.productChargeDefinitionId) &&
Objects.equals(this.isStackedDiscount, getSubscriptionRatePlanChargesWithAllSegments.isStackedDiscount) &&
Objects.equals(this.reflectDiscountInNetAmount, getSubscriptionRatePlanChargesWithAllSegments.reflectDiscountInNetAmount) &&
Objects.equals(this.centralizedPrice, getSubscriptionRatePlanChargesWithAllSegments.centralizedPrice) &&
Objects.equals(this.numberOfDeliveries, getSubscriptionRatePlanChargesWithAllSegments.numberOfDeliveries) &&
Objects.equals(this.creditOption, getSubscriptionRatePlanChargesWithAllSegments.creditOption) &&
Objects.equals(this.currency, getSubscriptionRatePlanChargesWithAllSegments.currency) &&
Objects.equals(this.deliverySchedule, getSubscriptionRatePlanChargesWithAllSegments.deliverySchedule) &&
Objects.equals(this.description, getSubscriptionRatePlanChargesWithAllSegments.description) &&
Objects.equals(this.discountAmount, getSubscriptionRatePlanChargesWithAllSegments.discountAmount) &&
Objects.equals(this.discountApplyDetails, getSubscriptionRatePlanChargesWithAllSegments.discountApplyDetails) &&
Objects.equals(this.discountClass, getSubscriptionRatePlanChargesWithAllSegments.discountClass) &&
Objects.equals(this.discountLevel, getSubscriptionRatePlanChargesWithAllSegments.discountLevel) &&
Objects.equals(this.discountPercentage, getSubscriptionRatePlanChargesWithAllSegments.discountPercentage) &&
Objects.equals(this.applyToBillingPeriodPartially, getSubscriptionRatePlanChargesWithAllSegments.applyToBillingPeriodPartially) &&
Objects.equals(this.dmrc, getSubscriptionRatePlanChargesWithAllSegments.dmrc) &&
Objects.equals(this.done, getSubscriptionRatePlanChargesWithAllSegments.done) &&
Objects.equals(this.drawdownRate, getSubscriptionRatePlanChargesWithAllSegments.drawdownRate) &&
Objects.equals(this.drawdownUom, getSubscriptionRatePlanChargesWithAllSegments.drawdownUom) &&
Objects.equals(this.dtcv, getSubscriptionRatePlanChargesWithAllSegments.dtcv) &&
Objects.equals(this.effectiveEndDate, getSubscriptionRatePlanChargesWithAllSegments.effectiveEndDate) &&
Objects.equals(this.effectiveStartDate, getSubscriptionRatePlanChargesWithAllSegments.effectiveStartDate) &&
Objects.equals(this.endDateCondition, getSubscriptionRatePlanChargesWithAllSegments.endDateCondition) &&
Objects.equals(this.id, getSubscriptionRatePlanChargesWithAllSegments.id) &&
Objects.equals(this.includedUnits, getSubscriptionRatePlanChargesWithAllSegments.includedUnits) &&
Objects.equals(this.overagePrice, getSubscriptionRatePlanChargesWithAllSegments.overagePrice) &&
Objects.equals(this.inputArgumentId, getSubscriptionRatePlanChargesWithAllSegments.inputArgumentId) &&
Objects.equals(this.isCommitted, getSubscriptionRatePlanChargesWithAllSegments.isCommitted) &&
Objects.equals(this.isPrepaid, getSubscriptionRatePlanChargesWithAllSegments.isPrepaid) &&
Objects.equals(this.isRollover, getSubscriptionRatePlanChargesWithAllSegments.isRollover) &&
Objects.equals(this.mrr, getSubscriptionRatePlanChargesWithAllSegments.mrr) &&
Objects.equals(this.originalOrderDate, getSubscriptionRatePlanChargesWithAllSegments.originalOrderDate) &&
Objects.equals(this.prepaidOperationType, getSubscriptionRatePlanChargesWithAllSegments.prepaidOperationType) &&
Objects.equals(this.prepaidQuantity, getSubscriptionRatePlanChargesWithAllSegments.prepaidQuantity) &&
Objects.equals(this.prepaidTotalQuantity, getSubscriptionRatePlanChargesWithAllSegments.prepaidTotalQuantity) &&
Objects.equals(this.prepaidUOM, getSubscriptionRatePlanChargesWithAllSegments.prepaidUOM) &&
Objects.equals(this.quantity, getSubscriptionRatePlanChargesWithAllSegments.quantity) &&
Objects.equals(this.price, getSubscriptionRatePlanChargesWithAllSegments.price) &&
Objects.equals(this.originalListPrice, getSubscriptionRatePlanChargesWithAllSegments.originalListPrice) &&
Objects.equals(this.priceChangeOption, getSubscriptionRatePlanChargesWithAllSegments.priceChangeOption) &&
Objects.equals(this.priceIncreasePercentage, getSubscriptionRatePlanChargesWithAllSegments.priceIncreasePercentage) &&
Objects.equals(this.pricingSummary, getSubscriptionRatePlanChargesWithAllSegments.pricingSummary) &&
Objects.equals(this.processedThroughDate, getSubscriptionRatePlanChargesWithAllSegments.processedThroughDate) &&
Objects.equals(this.rolloverApply, getSubscriptionRatePlanChargesWithAllSegments.rolloverApply) &&
Objects.equals(this.rolloverPeriodLength, getSubscriptionRatePlanChargesWithAllSegments.rolloverPeriodLength) &&
Objects.equals(this.rolloverPeriods, getSubscriptionRatePlanChargesWithAllSegments.rolloverPeriods) &&
Objects.equals(this.prorationOption, getSubscriptionRatePlanChargesWithAllSegments.prorationOption) &&
Objects.equals(this.segment, getSubscriptionRatePlanChargesWithAllSegments.segment) &&
Objects.equals(this.specificEndDate, getSubscriptionRatePlanChargesWithAllSegments.specificEndDate) &&
Objects.equals(this.subscriptionChargeIntervalPricing, getSubscriptionRatePlanChargesWithAllSegments.subscriptionChargeIntervalPricing) &&
Objects.equals(this.tcv, getSubscriptionRatePlanChargesWithAllSegments.tcv) &&
Objects.equals(this.tiers, getSubscriptionRatePlanChargesWithAllSegments.tiers) &&
Objects.equals(this.triggerDate, getSubscriptionRatePlanChargesWithAllSegments.triggerDate) &&
Objects.equals(this.triggerEvent, getSubscriptionRatePlanChargesWithAllSegments.triggerEvent) &&
Objects.equals(this.upsellOriginChargeNumber, getSubscriptionRatePlanChargesWithAllSegments.upsellOriginChargeNumber) &&
Objects.equals(this.upToPeriods, getSubscriptionRatePlanChargesWithAllSegments.upToPeriods) &&
Objects.equals(this.upToPeriodsType, getSubscriptionRatePlanChargesWithAllSegments.upToPeriodsType) &&
Objects.equals(this.validityPeriodType, getSubscriptionRatePlanChargesWithAllSegments.validityPeriodType) &&
Objects.equals(this.priceUpsellQuantityStacked, getSubscriptionRatePlanChargesWithAllSegments.priceUpsellQuantityStacked) &&
Objects.equals(this.pobPolicy, getSubscriptionRatePlanChargesWithAllSegments.pobPolicy) &&
Objects.equals(this.salesPrice, getSubscriptionRatePlanChargesWithAllSegments.salesPrice)&&
Objects.equals(this.additionalProperties, getSubscriptionRatePlanChargesWithAllSegments.additionalProperties);
}
@Override
public int hashCode() {
return Objects.hash(billingDay, billingPeriod, billingPeriodAlignment, billingTiming, chargeSegments, excludeItemBillingFromRevenueAccounting, excludeItemBookingFromRevenueAccounting, invoiceScheduleId, isAllocationEligible, isUnbilled, listPriceBase, model, name, number, numberOfPeriods, originalChargeId, overageCalculationOption, overageUnusedUnitsCreditOption, productCategory, productClass, productFamily, productLine, productRatePlanChargeId, productRatePlanChargeNumber, ratingGroup, smoothingModel, specificBillingPeriod, specificListPriceBase, type, unusedUnitsCreditRates, uom, usageRecordRatingOption, version, amendedByOrderOn, applyDiscountTo, chargeFunction, chargeModelConfiguration, chargedThroughDate, commitmentType, prepaidCommittedAmount, productChargeDefinitionId, isStackedDiscount, reflectDiscountInNetAmount, centralizedPrice, numberOfDeliveries, creditOption, currency, deliverySchedule, description, discountAmount, discountApplyDetails, discountClass, discountLevel, discountPercentage, applyToBillingPeriodPartially, dmrc, done, drawdownRate, drawdownUom, dtcv, effectiveEndDate, effectiveStartDate, endDateCondition, id, includedUnits, overagePrice, inputArgumentId, isCommitted, isPrepaid, isRollover, mrr, originalOrderDate, prepaidOperationType, prepaidQuantity, prepaidTotalQuantity, prepaidUOM, quantity, price, originalListPrice, priceChangeOption, priceIncreasePercentage, pricingSummary, processedThroughDate, rolloverApply, rolloverPeriodLength, rolloverPeriods, prorationOption, segment, specificEndDate, subscriptionChargeIntervalPricing, tcv, tiers, triggerDate, triggerEvent, upsellOriginChargeNumber, upToPeriods, upToPeriodsType, validityPeriodType, priceUpsellQuantityStacked, pobPolicy, salesPrice, additionalProperties);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GetSubscriptionRatePlanChargesWithAllSegments {\n");
sb.append(" billingDay: ").append(toIndentedString(billingDay)).append("\n");
sb.append(" billingPeriod: ").append(toIndentedString(billingPeriod)).append("\n");
sb.append(" billingPeriodAlignment: ").append(toIndentedString(billingPeriodAlignment)).append("\n");
sb.append(" billingTiming: ").append(toIndentedString(billingTiming)).append("\n");
sb.append(" chargeSegments: ").append(toIndentedString(chargeSegments)).append("\n");
sb.append(" excludeItemBillingFromRevenueAccounting: ").append(toIndentedString(excludeItemBillingFromRevenueAccounting)).append("\n");
sb.append(" excludeItemBookingFromRevenueAccounting: ").append(toIndentedString(excludeItemBookingFromRevenueAccounting)).append("\n");
sb.append(" invoiceScheduleId: ").append(toIndentedString(invoiceScheduleId)).append("\n");
sb.append(" isAllocationEligible: ").append(toIndentedString(isAllocationEligible)).append("\n");
sb.append(" isUnbilled: ").append(toIndentedString(isUnbilled)).append("\n");
sb.append(" listPriceBase: ").append(toIndentedString(listPriceBase)).append("\n");
sb.append(" model: ").append(toIndentedString(model)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" number: ").append(toIndentedString(number)).append("\n");
sb.append(" numberOfPeriods: ").append(toIndentedString(numberOfPeriods)).append("\n");
sb.append(" originalChargeId: ").append(toIndentedString(originalChargeId)).append("\n");
sb.append(" overageCalculationOption: ").append(toIndentedString(overageCalculationOption)).append("\n");
sb.append(" overageUnusedUnitsCreditOption: ").append(toIndentedString(overageUnusedUnitsCreditOption)).append("\n");
sb.append(" productCategory: ").append(toIndentedString(productCategory)).append("\n");
sb.append(" productClass: ").append(toIndentedString(productClass)).append("\n");
sb.append(" productFamily: ").append(toIndentedString(productFamily)).append("\n");
sb.append(" productLine: ").append(toIndentedString(productLine)).append("\n");
sb.append(" productRatePlanChargeId: ").append(toIndentedString(productRatePlanChargeId)).append("\n");
sb.append(" productRatePlanChargeNumber: ").append(toIndentedString(productRatePlanChargeNumber)).append("\n");
sb.append(" ratingGroup: ").append(toIndentedString(ratingGroup)).append("\n");
sb.append(" smoothingModel: ").append(toIndentedString(smoothingModel)).append("\n");
sb.append(" specificBillingPeriod: ").append(toIndentedString(specificBillingPeriod)).append("\n");
sb.append(" specificListPriceBase: ").append(toIndentedString(specificListPriceBase)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" unusedUnitsCreditRates: ").append(toIndentedString(unusedUnitsCreditRates)).append("\n");
sb.append(" uom: ").append(toIndentedString(uom)).append("\n");
sb.append(" usageRecordRatingOption: ").append(toIndentedString(usageRecordRatingOption)).append("\n");
sb.append(" version: ").append(toIndentedString(version)).append("\n");
sb.append(" amendedByOrderOn: ").append(toIndentedString(amendedByOrderOn)).append("\n");
sb.append(" applyDiscountTo: ").append(toIndentedString(applyDiscountTo)).append("\n");
sb.append(" chargeFunction: ").append(toIndentedString(chargeFunction)).append("\n");
sb.append(" chargeModelConfiguration: ").append(toIndentedString(chargeModelConfiguration)).append("\n");
sb.append(" chargedThroughDate: ").append(toIndentedString(chargedThroughDate)).append("\n");
sb.append(" commitmentType: ").append(toIndentedString(commitmentType)).append("\n");
sb.append(" prepaidCommittedAmount: ").append(toIndentedString(prepaidCommittedAmount)).append("\n");
sb.append(" productChargeDefinitionId: ").append(toIndentedString(productChargeDefinitionId)).append("\n");
sb.append(" isStackedDiscount: ").append(toIndentedString(isStackedDiscount)).append("\n");
sb.append(" reflectDiscountInNetAmount: ").append(toIndentedString(reflectDiscountInNetAmount)).append("\n");
sb.append(" centralizedPrice: ").append(toIndentedString(centralizedPrice)).append("\n");
sb.append(" numberOfDeliveries: ").append(toIndentedString(numberOfDeliveries)).append("\n");
sb.append(" creditOption: ").append(toIndentedString(creditOption)).append("\n");
sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
sb.append(" deliverySchedule: ").append(toIndentedString(deliverySchedule)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" discountAmount: ").append(toIndentedString(discountAmount)).append("\n");
sb.append(" discountApplyDetails: ").append(toIndentedString(discountApplyDetails)).append("\n");
sb.append(" discountClass: ").append(toIndentedString(discountClass)).append("\n");
sb.append(" discountLevel: ").append(toIndentedString(discountLevel)).append("\n");
sb.append(" discountPercentage: ").append(toIndentedString(discountPercentage)).append("\n");
sb.append(" applyToBillingPeriodPartially: ").append(toIndentedString(applyToBillingPeriodPartially)).append("\n");
sb.append(" dmrc: ").append(toIndentedString(dmrc)).append("\n");
sb.append(" done: ").append(toIndentedString(done)).append("\n");
sb.append(" drawdownRate: ").append(toIndentedString(drawdownRate)).append("\n");
sb.append(" drawdownUom: ").append(toIndentedString(drawdownUom)).append("\n");
sb.append(" dtcv: ").append(toIndentedString(dtcv)).append("\n");
sb.append(" effectiveEndDate: ").append(toIndentedString(effectiveEndDate)).append("\n");
sb.append(" effectiveStartDate: ").append(toIndentedString(effectiveStartDate)).append("\n");
sb.append(" endDateCondition: ").append(toIndentedString(endDateCondition)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" includedUnits: ").append(toIndentedString(includedUnits)).append("\n");
sb.append(" overagePrice: ").append(toIndentedString(overagePrice)).append("\n");
sb.append(" inputArgumentId: ").append(toIndentedString(inputArgumentId)).append("\n");
sb.append(" isCommitted: ").append(toIndentedString(isCommitted)).append("\n");
sb.append(" isPrepaid: ").append(toIndentedString(isPrepaid)).append("\n");
sb.append(" isRollover: ").append(toIndentedString(isRollover)).append("\n");
sb.append(" mrr: ").append(toIndentedString(mrr)).append("\n");
sb.append(" originalOrderDate: ").append(toIndentedString(originalOrderDate)).append("\n");
sb.append(" prepaidOperationType: ").append(toIndentedString(prepaidOperationType)).append("\n");
sb.append(" prepaidQuantity: ").append(toIndentedString(prepaidQuantity)).append("\n");
sb.append(" prepaidTotalQuantity: ").append(toIndentedString(prepaidTotalQuantity)).append("\n");
sb.append(" prepaidUOM: ").append(toIndentedString(prepaidUOM)).append("\n");
sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");
sb.append(" price: ").append(toIndentedString(price)).append("\n");
sb.append(" originalListPrice: ").append(toIndentedString(originalListPrice)).append("\n");
sb.append(" priceChangeOption: ").append(toIndentedString(priceChangeOption)).append("\n");
sb.append(" priceIncreasePercentage: ").append(toIndentedString(priceIncreasePercentage)).append("\n");
sb.append(" pricingSummary: ").append(toIndentedString(pricingSummary)).append("\n");
sb.append(" processedThroughDate: ").append(toIndentedString(processedThroughDate)).append("\n");
sb.append(" rolloverApply: ").append(toIndentedString(rolloverApply)).append("\n");
sb.append(" rolloverPeriodLength: ").append(toIndentedString(rolloverPeriodLength)).append("\n");
sb.append(" rolloverPeriods: ").append(toIndentedString(rolloverPeriods)).append("\n");
sb.append(" prorationOption: ").append(toIndentedString(prorationOption)).append("\n");
sb.append(" segment: ").append(toIndentedString(segment)).append("\n");
sb.append(" specificEndDate: ").append(toIndentedString(specificEndDate)).append("\n");
sb.append(" subscriptionChargeIntervalPricing: ").append(toIndentedString(subscriptionChargeIntervalPricing)).append("\n");
sb.append(" tcv: ").append(toIndentedString(tcv)).append("\n");
sb.append(" tiers: ").append(toIndentedString(tiers)).append("\n");
sb.append(" triggerDate: ").append(toIndentedString(triggerDate)).append("\n");
sb.append(" triggerEvent: ").append(toIndentedString(triggerEvent)).append("\n");
sb.append(" upsellOriginChargeNumber: ").append(toIndentedString(upsellOriginChargeNumber)).append("\n");
sb.append(" upToPeriods: ").append(toIndentedString(upToPeriods)).append("\n");
sb.append(" upToPeriodsType: ").append(toIndentedString(upToPeriodsType)).append("\n");
sb.append(" validityPeriodType: ").append(toIndentedString(validityPeriodType)).append("\n");
sb.append(" priceUpsellQuantityStacked: ").append(toIndentedString(priceUpsellQuantityStacked)).append("\n");
sb.append(" pobPolicy: ").append(toIndentedString(pobPolicy)).append("\n");
sb.append(" salesPrice: ").append(toIndentedString(salesPrice)).append("\n");
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
public static HashSet openapiFields;
public static HashSet openapiRequiredFields;
static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet();
openapiFields.add("billingDay");
openapiFields.add("billingPeriod");
openapiFields.add("billingPeriodAlignment");
openapiFields.add("billingTiming");
openapiFields.add("chargeSegments");
openapiFields.add("excludeItemBillingFromRevenueAccounting");
openapiFields.add("excludeItemBookingFromRevenueAccounting");
openapiFields.add("invoiceScheduleId");
openapiFields.add("isAllocationEligible");
openapiFields.add("isUnbilled");
openapiFields.add("listPriceBase");
openapiFields.add("model");
openapiFields.add("name");
openapiFields.add("number");
openapiFields.add("numberOfPeriods");
openapiFields.add("originalChargeId");
openapiFields.add("overageCalculationOption");
openapiFields.add("overageUnusedUnitsCreditOption");
openapiFields.add("productCategory");
openapiFields.add("productClass");
openapiFields.add("productFamily");
openapiFields.add("productLine");
openapiFields.add("productRatePlanChargeId");
openapiFields.add("productRatePlanChargeNumber");
openapiFields.add("ratingGroup");
openapiFields.add("smoothingModel");
openapiFields.add("specificBillingPeriod");
openapiFields.add("specificListPriceBase");
openapiFields.add("type");
openapiFields.add("unusedUnitsCreditRates");
openapiFields.add("uom");
openapiFields.add("usageRecordRatingOption");
openapiFields.add("version");
openapiFields.add("amendedByOrderOn");
openapiFields.add("applyDiscountTo");
openapiFields.add("chargeFunction");
openapiFields.add("chargeModelConfiguration");
openapiFields.add("chargedThroughDate");
openapiFields.add("commitmentType");
openapiFields.add("prepaidCommittedAmount");
openapiFields.add("productChargeDefinitionId");
openapiFields.add("isStackedDiscount");
openapiFields.add("reflectDiscountInNetAmount");
openapiFields.add("centralizedPrice");
openapiFields.add("numberOfDeliveries");
openapiFields.add("creditOption");
openapiFields.add("currency");
openapiFields.add("deliverySchedule");
openapiFields.add("description");
openapiFields.add("discountAmount");
openapiFields.add("discountApplyDetails");
openapiFields.add("discountClass");
openapiFields.add("discountLevel");
openapiFields.add("discountPercentage");
openapiFields.add("applyToBillingPeriodPartially");
openapiFields.add("dmrc");
openapiFields.add("done");
openapiFields.add("drawdownRate");
openapiFields.add("drawdownUom");
openapiFields.add("dtcv");
openapiFields.add("effectiveEndDate");
openapiFields.add("effectiveStartDate");
openapiFields.add("endDateCondition");
openapiFields.add("id");
openapiFields.add("includedUnits");
openapiFields.add("overagePrice");
openapiFields.add("inputArgumentId");
openapiFields.add("isCommitted");
openapiFields.add("isPrepaid");
openapiFields.add("isRollover");
openapiFields.add("mrr");
openapiFields.add("originalOrderDate");
openapiFields.add("prepaidOperationType");
openapiFields.add("prepaidQuantity");
openapiFields.add("prepaidTotalQuantity");
openapiFields.add("prepaidUOM");
openapiFields.add("quantity");
openapiFields.add("price");
openapiFields.add("originalListPrice");
openapiFields.add("priceChangeOption");
openapiFields.add("priceIncreasePercentage");
openapiFields.add("pricingSummary");
openapiFields.add("processedThroughDate");
openapiFields.add("rolloverApply");
openapiFields.add("rolloverPeriodLength");
openapiFields.add("rolloverPeriods");
openapiFields.add("prorationOption");
openapiFields.add("segment");
openapiFields.add("specificEndDate");
openapiFields.add("subscriptionChargeIntervalPricing");
openapiFields.add("tcv");
openapiFields.add("tiers");
openapiFields.add("triggerDate");
openapiFields.add("triggerEvent");
openapiFields.add("upsellOriginChargeNumber");
openapiFields.add("upToPeriods");
openapiFields.add("upToPeriodsType");
openapiFields.add("validityPeriodType");
openapiFields.add("priceUpsellQuantityStacked");
openapiFields.add("pobPolicy");
openapiFields.add("salesPrice");
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
}
/**
* Validates the JSON Element and throws an exception if issues found
*
* @param jsonElement JSON Element
* @throws IOException if the JSON Element is invalid with respect to GetSubscriptionRatePlanChargesWithAllSegments
*/
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
if (jsonElement == null) {
if (!GetSubscriptionRatePlanChargesWithAllSegments.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in GetSubscriptionRatePlanChargesWithAllSegments is not found in the empty JSON string", GetSubscriptionRatePlanChargesWithAllSegments.openapiRequiredFields.toString()));
}
}
JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("billingDay") != null && !jsonObj.get("billingDay").isJsonNull()) && !jsonObj.get("billingDay").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `billingDay` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billingDay").toString()));
}
// validate the optional field `billingPeriod`
if (jsonObj.get("billingPeriod") != null && !jsonObj.get("billingPeriod").isJsonNull()) {
BillingPeriod.validateJsonElement(jsonObj.get("billingPeriod"));
}
// validate the optional field `billingPeriodAlignment`
if (jsonObj.get("billingPeriodAlignment") != null && !jsonObj.get("billingPeriodAlignment").isJsonNull()) {
BillingPeriodAlignment.validateJsonElement(jsonObj.get("billingPeriodAlignment"));
}
// validate the optional field `billingTiming`
if (jsonObj.get("billingTiming") != null && !jsonObj.get("billingTiming").isJsonNull()) {
BillingTiming.validateJsonElement(jsonObj.get("billingTiming"));
}
if (jsonObj.get("chargeSegments") != null && !jsonObj.get("chargeSegments").isJsonNull()) {
JsonArray jsonArraychargeSegments = jsonObj.getAsJsonArray("chargeSegments");
if (jsonArraychargeSegments != null) {
// ensure the json data is an array
if (!jsonObj.get("chargeSegments").isJsonArray()) {
throw new IllegalArgumentException(String.format("Expected the field `chargeSegments` to be an array in the JSON string but got `%s`", jsonObj.get("chargeSegments").toString()));
}
// validate the optional field `chargeSegments` (array)
for (int i = 0; i < jsonArraychargeSegments.size(); i++) {
RatePlanChargeSegment.validateJsonElement(jsonArraychargeSegments.get(i));
};
}
}
if ((jsonObj.get("invoiceScheduleId") != null && !jsonObj.get("invoiceScheduleId").isJsonNull()) && !jsonObj.get("invoiceScheduleId").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `invoiceScheduleId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoiceScheduleId").toString()));
}
// validate the optional field `listPriceBase`
if (jsonObj.get("listPriceBase") != null && !jsonObj.get("listPriceBase").isJsonNull()) {
ChargeListPriceBase.validateJsonElement(jsonObj.get("listPriceBase"));
}
// validate the optional field `model`
if (jsonObj.get("model") != null && !jsonObj.get("model").isJsonNull()) {
ChargeModel.validateJsonElement(jsonObj.get("model"));
}
if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
}
if ((jsonObj.get("number") != null && !jsonObj.get("number").isJsonNull()) && !jsonObj.get("number").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `number` to be a primitive type in the JSON string but got `%s`", jsonObj.get("number").toString()));
}
if ((jsonObj.get("originalChargeId") != null && !jsonObj.get("originalChargeId").isJsonNull()) && !jsonObj.get("originalChargeId").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `originalChargeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("originalChargeId").toString()));
}
// validate the optional field `overageCalculationOption`
if (jsonObj.get("overageCalculationOption") != null && !jsonObj.get("overageCalculationOption").isJsonNull()) {
OverageCalculationOption.validateJsonElement(jsonObj.get("overageCalculationOption"));
}
// validate the optional field `overageUnusedUnitsCreditOption`
if (jsonObj.get("overageUnusedUnitsCreditOption") != null && !jsonObj.get("overageUnusedUnitsCreditOption").isJsonNull()) {
OverageUnusedUnitsCreditOption.validateJsonElement(jsonObj.get("overageUnusedUnitsCreditOption"));
}
// validate the optional field `productCategory`
if (jsonObj.get("productCategory") != null && !jsonObj.get("productCategory").isJsonNull()) {
ProductCategory.validateJsonElement(jsonObj.get("productCategory"));
}
if ((jsonObj.get("productClass") != null && !jsonObj.get("productClass").isJsonNull()) && !jsonObj.get("productClass").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `productClass` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productClass").toString()));
}
if ((jsonObj.get("productFamily") != null && !jsonObj.get("productFamily").isJsonNull()) && !jsonObj.get("productFamily").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `productFamily` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productFamily").toString()));
}
if ((jsonObj.get("productLine") != null && !jsonObj.get("productLine").isJsonNull()) && !jsonObj.get("productLine").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `productLine` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productLine").toString()));
}
if ((jsonObj.get("productRatePlanChargeId") != null && !jsonObj.get("productRatePlanChargeId").isJsonNull()) && !jsonObj.get("productRatePlanChargeId").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `productRatePlanChargeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productRatePlanChargeId").toString()));
}
if ((jsonObj.get("productRatePlanChargeNumber") != null && !jsonObj.get("productRatePlanChargeNumber").isJsonNull()) && !jsonObj.get("productRatePlanChargeNumber").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `productRatePlanChargeNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productRatePlanChargeNumber").toString()));
}
// validate the optional field `ratingGroup`
if (jsonObj.get("ratingGroup") != null && !jsonObj.get("ratingGroup").isJsonNull()) {
RatingGroup.validateJsonElement(jsonObj.get("ratingGroup"));
}
// validate the optional field `smoothingModel`
if (jsonObj.get("smoothingModel") != null && !jsonObj.get("smoothingModel").isJsonNull()) {
SmoothingModel.validateJsonElement(jsonObj.get("smoothingModel"));
}
// validate the optional field `type`
if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) {
ChargeType.validateJsonElement(jsonObj.get("type"));
}
if ((jsonObj.get("uom") != null && !jsonObj.get("uom").isJsonNull()) && !jsonObj.get("uom").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `uom` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uom").toString()));
}
// validate the optional field `usageRecordRatingOption`
if (jsonObj.get("usageRecordRatingOption") != null && !jsonObj.get("usageRecordRatingOption").isJsonNull()) {
UsageRecordRatingOption.validateJsonElement(jsonObj.get("usageRecordRatingOption"));
}
// validate the optional field `applyDiscountTo`
if (jsonObj.get("applyDiscountTo") != null && !jsonObj.get("applyDiscountTo").isJsonNull()) {
ApplyDiscountTo.validateJsonElement(jsonObj.get("applyDiscountTo"));
}
// validate the optional field `chargeFunction`
if (jsonObj.get("chargeFunction") != null && !jsonObj.get("chargeFunction").isJsonNull()) {
ChargeFunction.validateJsonElement(jsonObj.get("chargeFunction"));
}
// validate the optional field `chargeModelConfiguration`
if (jsonObj.get("chargeModelConfiguration") != null && !jsonObj.get("chargeModelConfiguration").isJsonNull()) {
ChargeModelConfigurationForSubscription.validateJsonElement(jsonObj.get("chargeModelConfiguration"));
}
// validate the optional field `commitmentType`
if (jsonObj.get("commitmentType") != null && !jsonObj.get("commitmentType").isJsonNull()) {
CommitmentType.validateJsonElement(jsonObj.get("commitmentType"));
}
if ((jsonObj.get("prepaidCommittedAmount") != null && !jsonObj.get("prepaidCommittedAmount").isJsonNull()) && !jsonObj.get("prepaidCommittedAmount").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `prepaidCommittedAmount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prepaidCommittedAmount").toString()));
}
if ((jsonObj.get("productChargeDefinitionId") != null && !jsonObj.get("productChargeDefinitionId").isJsonNull()) && !jsonObj.get("productChargeDefinitionId").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `productChargeDefinitionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productChargeDefinitionId").toString()));
}
if ((jsonObj.get("creditOption") != null && !jsonObj.get("creditOption").isJsonNull()) && !jsonObj.get("creditOption").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `creditOption` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creditOption").toString()));
}
// validate the optional field `creditOption`
if (jsonObj.get("creditOption") != null && !jsonObj.get("creditOption").isJsonNull()) {
CreditOptionEnum.validateJsonElement(jsonObj.get("creditOption"));
}
if ((jsonObj.get("currency") != null && !jsonObj.get("currency").isJsonNull()) && !jsonObj.get("currency").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `currency` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currency").toString()));
}
// validate the optional field `deliverySchedule`
if (jsonObj.get("deliverySchedule") != null && !jsonObj.get("deliverySchedule").isJsonNull()) {
DeliverySchedule.validateJsonElement(jsonObj.get("deliverySchedule"));
}
if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString()));
}
if (jsonObj.get("discountApplyDetails") != null && !jsonObj.get("discountApplyDetails").isJsonNull()) {
JsonArray jsonArraydiscountApplyDetails = jsonObj.getAsJsonArray("discountApplyDetails");
if (jsonArraydiscountApplyDetails != null) {
// ensure the json data is an array
if (!jsonObj.get("discountApplyDetails").isJsonArray()) {
throw new IllegalArgumentException(String.format("Expected the field `discountApplyDetails` to be an array in the JSON string but got `%s`", jsonObj.get("discountApplyDetails").toString()));
}
// validate the optional field `discountApplyDetails` (array)
for (int i = 0; i < jsonArraydiscountApplyDetails.size(); i++) {
DiscountApplyDetail.validateJsonElement(jsonArraydiscountApplyDetails.get(i));
};
}
}
if ((jsonObj.get("discountClass") != null && !jsonObj.get("discountClass").isJsonNull()) && !jsonObj.get("discountClass").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `discountClass` to be a primitive type in the JSON string but got `%s`", jsonObj.get("discountClass").toString()));
}
// validate the optional field `discountLevel`
if (jsonObj.get("discountLevel") != null && !jsonObj.get("discountLevel").isJsonNull()) {
DiscountLevel.validateJsonElement(jsonObj.get("discountLevel"));
}
if ((jsonObj.get("dmrc") != null && !jsonObj.get("dmrc").isJsonNull()) && !jsonObj.get("dmrc").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `dmrc` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dmrc").toString()));
}
if ((jsonObj.get("drawdownRate") != null && !jsonObj.get("drawdownRate").isJsonNull()) && !jsonObj.get("drawdownRate").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `drawdownRate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("drawdownRate").toString()));
}
if ((jsonObj.get("drawdownUom") != null && !jsonObj.get("drawdownUom").isJsonNull()) && !jsonObj.get("drawdownUom").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `drawdownUom` to be a primitive type in the JSON string but got `%s`", jsonObj.get("drawdownUom").toString()));
}
if ((jsonObj.get("dtcv") != null && !jsonObj.get("dtcv").isJsonNull()) && !jsonObj.get("dtcv").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `dtcv` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dtcv").toString()));
}
// validate the optional field `endDateCondition`
if (jsonObj.get("endDateCondition") != null && !jsonObj.get("endDateCondition").isJsonNull()) {
EndDateCondition.validateJsonElement(jsonObj.get("endDateCondition"));
}
if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString()));
}
if ((jsonObj.get("inputArgumentId") != null && !jsonObj.get("inputArgumentId").isJsonNull()) && !jsonObj.get("inputArgumentId").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `inputArgumentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("inputArgumentId").toString()));
}
if ((jsonObj.get("mrr") != null && !jsonObj.get("mrr").isJsonNull()) && !jsonObj.get("mrr").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `mrr` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mrr").toString()));
}
if ((jsonObj.get("prepaidOperationType") != null && !jsonObj.get("prepaidOperationType").isJsonNull()) && !jsonObj.get("prepaidOperationType").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `prepaidOperationType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prepaidOperationType").toString()));
}
// validate the optional field `prepaidOperationType`
if (jsonObj.get("prepaidOperationType") != null && !jsonObj.get("prepaidOperationType").isJsonNull()) {
PrepaidOperationTypeEnum.validateJsonElement(jsonObj.get("prepaidOperationType"));
}
if ((jsonObj.get("prepaidQuantity") != null && !jsonObj.get("prepaidQuantity").isJsonNull()) && !jsonObj.get("prepaidQuantity").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `prepaidQuantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prepaidQuantity").toString()));
}
if ((jsonObj.get("prepaidTotalQuantity") != null && !jsonObj.get("prepaidTotalQuantity").isJsonNull()) && !jsonObj.get("prepaidTotalQuantity").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `prepaidTotalQuantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prepaidTotalQuantity").toString()));
}
if ((jsonObj.get("prepaidUOM") != null && !jsonObj.get("prepaidUOM").isJsonNull()) && !jsonObj.get("prepaidUOM").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `prepaidUOM` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prepaidUOM").toString()));
}
// validate the optional field `priceChangeOption`
if (jsonObj.get("priceChangeOption") != null && !jsonObj.get("priceChangeOption").isJsonNull()) {
PriceChangeOption.validateJsonElement(jsonObj.get("priceChangeOption"));
}
if ((jsonObj.get("pricingSummary") != null && !jsonObj.get("pricingSummary").isJsonNull()) && !jsonObj.get("pricingSummary").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `pricingSummary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pricingSummary").toString()));
}
if ((jsonObj.get("rolloverApply") != null && !jsonObj.get("rolloverApply").isJsonNull()) && !jsonObj.get("rolloverApply").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `rolloverApply` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rolloverApply").toString()));
}
// validate the optional field `rolloverApply`
if (jsonObj.get("rolloverApply") != null && !jsonObj.get("rolloverApply").isJsonNull()) {
RolloverApplyEnum.validateJsonElement(jsonObj.get("rolloverApply"));
}
if ((jsonObj.get("prorationOption") != null && !jsonObj.get("prorationOption").isJsonNull()) && !jsonObj.get("prorationOption").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `prorationOption` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prorationOption").toString()));
}
if (jsonObj.get("subscriptionChargeIntervalPricing") != null && !jsonObj.get("subscriptionChargeIntervalPricing").isJsonNull()) {
JsonArray jsonArraysubscriptionChargeIntervalPricing = jsonObj.getAsJsonArray("subscriptionChargeIntervalPricing");
if (jsonArraysubscriptionChargeIntervalPricing != null) {
// ensure the json data is an array
if (!jsonObj.get("subscriptionChargeIntervalPricing").isJsonArray()) {
throw new IllegalArgumentException(String.format("Expected the field `subscriptionChargeIntervalPricing` to be an array in the JSON string but got `%s`", jsonObj.get("subscriptionChargeIntervalPricing").toString()));
}
// validate the optional field `subscriptionChargeIntervalPricing` (array)
for (int i = 0; i < jsonArraysubscriptionChargeIntervalPricing.size(); i++) {
IntervalPricing.validateJsonElement(jsonArraysubscriptionChargeIntervalPricing.get(i));
};
}
}
if ((jsonObj.get("tcv") != null && !jsonObj.get("tcv").isJsonNull()) && !jsonObj.get("tcv").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `tcv` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tcv").toString()));
}
if (jsonObj.get("tiers") != null && !jsonObj.get("tiers").isJsonNull()) {
JsonArray jsonArraytiers = jsonObj.getAsJsonArray("tiers");
if (jsonArraytiers != null) {
// ensure the json data is an array
if (!jsonObj.get("tiers").isJsonArray()) {
throw new IllegalArgumentException(String.format("Expected the field `tiers` to be an array in the JSON string but got `%s`", jsonObj.get("tiers").toString()));
}
// validate the optional field `tiers` (array)
for (int i = 0; i < jsonArraytiers.size(); i++) {
RatePlanChargeTier.validateJsonElement(jsonArraytiers.get(i));
};
}
}
// validate the optional field `triggerEvent`
if (jsonObj.get("triggerEvent") != null && !jsonObj.get("triggerEvent").isJsonNull()) {
TriggerEvent.validateJsonElement(jsonObj.get("triggerEvent"));
}
if ((jsonObj.get("upsellOriginChargeNumber") != null && !jsonObj.get("upsellOriginChargeNumber").isJsonNull()) && !jsonObj.get("upsellOriginChargeNumber").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `upsellOriginChargeNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("upsellOriginChargeNumber").toString()));
}
// validate the optional field `upToPeriodsType`
if (jsonObj.get("upToPeriodsType") != null && !jsonObj.get("upToPeriodsType").isJsonNull()) {
UpToPeriodsType.validateJsonElement(jsonObj.get("upToPeriodsType"));
}
// validate the optional field `validityPeriodType`
if (jsonObj.get("validityPeriodType") != null && !jsonObj.get("validityPeriodType").isJsonNull()) {
ValidityPeriodType.validateJsonElement(jsonObj.get("validityPeriodType"));
}
if ((jsonObj.get("pobPolicy") != null && !jsonObj.get("pobPolicy").isJsonNull()) && !jsonObj.get("pobPolicy").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `pobPolicy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pobPolicy").toString()));
}
// validate the optional field `pobPolicy`
if (jsonObj.get("pobPolicy") != null && !jsonObj.get("pobPolicy").isJsonNull()) {
PobPolicyEnum.validateJsonElement(jsonObj.get("pobPolicy"));
}
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
@SuppressWarnings("unchecked")
@Override
public TypeAdapter create(Gson gson, TypeToken type) {
if (!GetSubscriptionRatePlanChargesWithAllSegments.class.isAssignableFrom(type.getRawType())) {
return null; // this class only serializes 'GetSubscriptionRatePlanChargesWithAllSegments' and its subtypes
}
final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
final TypeAdapter thisAdapter
= gson.getDelegateAdapter(this, TypeToken.get(GetSubscriptionRatePlanChargesWithAllSegments.class));
return (TypeAdapter) new TypeAdapter() {
@Override
public void write(JsonWriter out, GetSubscriptionRatePlanChargesWithAllSegments value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
obj.remove("additionalProperties");
// support null values
out.beginObject();
Iterator iterator = obj.entrySet().iterator();
while(iterator.hasNext()) {
Map.Entry e = (Map.Entry) iterator.next();
out.name((String)e.getKey());
elementAdapter.write(out, e.getValue());
}
// end
// serialize additional properties
if (value.getAdditionalProperties() != null) {
// support null values
boolean oldSerializeNulls = out.getSerializeNulls();
out.setSerializeNulls(true); //force serialize
// end
for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
if (entry.getValue() instanceof String)
obj.addProperty(entry.getKey(), (String) entry.getValue());
else if (entry.getValue() instanceof Number)
obj.addProperty(entry.getKey(), (Number) entry.getValue());
else if (entry.getValue() instanceof Boolean)
obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
else if (entry.getValue() instanceof Character)
obj.addProperty(entry.getKey(), (Character) entry.getValue());
else if (entry.getValue() == null)
obj.add(entry.getKey(), null);
else {
JsonElement jsonElement = gson.toJsonTree(entry.getValue());
if (jsonElement.isJsonArray()) {
obj.add(entry.getKey(), jsonElement.getAsJsonArray());
} else {
obj.add(entry.getKey(), jsonElement.getAsJsonObject());
}
}
out.name((String)entry.getKey());
elementAdapter.write(out, obj.get(entry.getKey()));
}
out.setSerializeNulls(oldSerializeNulls); //restore
}
out.endObject();
}
@Override
public GetSubscriptionRatePlanChargesWithAllSegments read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
JsonObject jsonObj = jsonElement.getAsJsonObject();
// store additional fields in the deserialized instance
GetSubscriptionRatePlanChargesWithAllSegments instance = thisAdapter.fromJsonTree(jsonObj);
for (Map.Entry entry : jsonObj.entrySet()) {
if (!openapiFields.contains(entry.getKey())) {
if (entry.getValue().isJsonPrimitive()) { // primitive type
if (entry.getValue().getAsJsonPrimitive().isString())
instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
else if (entry.getValue().getAsJsonPrimitive().isNumber())
instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
else if (entry.getValue().getAsJsonPrimitive().isBoolean())
instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
else
throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
} else if (entry.getValue().isJsonArray()) {
instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
} else { // JSON object
instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
}
}
}
return instance;
}
}.nullSafe();
}
}
/**
* Create an instance of GetSubscriptionRatePlanChargesWithAllSegments given an JSON string
*
* @param jsonString JSON string
* @return An instance of GetSubscriptionRatePlanChargesWithAllSegments
* @throws IOException if the JSON string is invalid with respect to GetSubscriptionRatePlanChargesWithAllSegments
*/
public static GetSubscriptionRatePlanChargesWithAllSegments fromJson(String jsonString) throws IOException {
return JSON.getGson().fromJson(jsonString, GetSubscriptionRatePlanChargesWithAllSegments.class);
}
/**
* Convert an instance of GetSubscriptionRatePlanChargesWithAllSegments to an JSON string
*
* @return JSON string
*/
public String toJson() {
return JSON.getGson().toJson(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy