zCharge to QCharge
This document provides information on accessing various methods using QCharge, including details on method return types and access instructions.
The following table provides information about how to access different methods using QCharge:
| Method | Return Type | Description | How to access using QCharge |
|---|---|---|---|
| BILL_CYCLE_DAY | String | The day of the month customer is billed for the charge. | charge.get('zqu__BillCycleDay__c') |
| BILL_CYCLE_TYPE | String | The billing day for the charge. You can override the value inherited from the Product Rate Plan Charge, but only when creating a new subscription or a New Product amendment. The following values are supported: DefaultFromCustomerSpecificDayofMonth:SubscriptionStartDayChargeTriggerDaySpecificDayofWeekThe SpecificDayofWeek value is available in the version 7.43 or later. If you set this field toSpecificDayofMonth , you must specify which day of the month as the billing day for the charge in the BILL_CYCLE_DAY field. If you set this field to SpecificDayofWeek, you must specify which day of the week as the billing day for the charge in the WEEKLY_BILL_CYCLE_DAY field. | charge.get('zqu__BillCycleType__c') |
| CHARGE_TYPE | String | The type of the charge as defined in the product catalog. | charge.get('zqu__ChargeType__c') |
| chargeObject | SObject | Stores the QuoteCharge and QuoteRatePlanCharge field values. | charge.getRecord() |
| chargeOverrideReferenceId | String | The quote rate plan charge id of the initially added charge that is being updated by the current charge. (Read-only.) | charge.get('zqu__ChargeOverrideReferenceId__c') |
| chargeTiersObjects | List<QuoteCharge_Tier__c> | A list of the custom tiers or default product catalog tiers based on the value of the hasCustomTiers property:
This property is available as of Zuora Quotes 6.0. Use the populateCustomChargeTiers method to populate custom tiers. | List<zqu.QTier> tiers = charge.getTiers(); |
| customfieldNameValueMap | MAP | A map of the custom field name to the label | Not available |
| DISCOUNT | String | Discount | charge.get('zqu__Discount__c') |
| DISCOUNT_LEVEL | String | For the Discount type charge, the level at which the discount should apply to. | charge.get('zqu__Discount_Level__c') |
| EFFECTIVE_PRICE | String | Effective price of the charge | charge.get('zqu__EffectivePrice__c') |
| END_DATE_CONDITION | String | Defines when the charge ends after the charge trigger date. | charge.get('zqu__enddatecondition__c') |
| fieldsChangedInRulesEngine | List < String > | Defines all of the charge fields modified by the Rules Engine. | Not available |
| hasCustomTiers | Boolean | A flag that you can get or set. Indicates if the current charge has custom tiers. Values:
This property is available as of Zuora Quotes 6.0. | areTiersUpdated() |
| Id | Id | If the charge is saved, it has a Salesforce record ID. Otherwise null. Read-only. | charge.get('Id') |
| INCLUDED_UNITS | String | Included units in the charge | charge.get('zqu__IncludedUnits__c') |
| isDiscountEditable | Boolean | Specifies whether the DISCOUNT is editable. The condition is based on the combination of CHARGE_TYPE and MODEL. Read-only. | Not available |
| isDiscountLevelEditable | Boolean | Specifies whether DISCOUNT_LEVEL is editable. The condition is based on the combination of CHARGE_TYPE and MODEL. Read-only. | Not available |
| isEffectivePriceEditable | Boolean | Specifies whether the EFFECTIVE_PRICE is editable. The condition is based on the combination of CHARGE_TYPE and MODEL. | Not available |
| isEndDateConditionEditable | Boolean | Specifies whether END_DATE_CONDITION is editable. The condition is based on the combination of CHARGE_TYPE and MODEL. | Not available |
| isIncludedUnitsEditable | Boolean | Specifies whether the INCLUDED_UNITS is editable. The condition is based on the combination of CHARGE_TYPE and MODEL.d MODEL properties combination. | Not available |
| isListPriceBaseEditable | Boolean | Specifies whether the LIST_PRICE_BASE is editable. The condition is based on the combination of CHARGE_TYPE and MODEL. | Not available |
| isListPriceEditable | Boolean | Specifies whether LIST_PRICE is editable. | Not available |
| isPeriodEditable | Boolean | Specifies whether PERIOD is editable. | Not available |
| isQuantityEditable | Boolean | The condition is based on the combination of CHARGE_TYPE and MODEL. Specifies whether the QUANTITY is editable. | Not available |
| isSpecificBillingPeriodEditable | Boolean | The condition is based on the combination of CHARGE_TYPE and MODEL. Specifies whether SPECIFIC_BILLING_PERIOD is editable. | Not available |
| isSpecificEndDateEditable | Boolean | The condition is based on the combination of CHARGE_TYPE, PERIOD, and MODEL. Specifies whether SPECIFIC_BILLING_PERIOD is editable. | Not available |
| isTotalEditable | Boolean | The condition is based on the combination of CHARGE_TYPE, END_DATE_CONDITION, and MODEL. Specifies whether the TOTAL is editable. The condition is based on the combination of CHARGE_TYPE and MODEL. | Not available |
| isUpToPeriodsEditable | Boolean | Specifies whether UPTO_PERIODS is editable. The condition is based on the combination of CHARGE_TYPE, END_DATE_CONDITION, and MODEL. | Not available |
| isUpToPeriodsTypeEditable | Boolean | Specifies whether UPTO_PERIODS_TYPE is editable. The condition is based on the combination of CHARGE_TYPE, END_DATE_CONDITION, and MODEL. | Not available |
| LIST_PRICE | String | The list price of the charge as defined in the product catalog. | charge.get('zqu__ListPrice__c') |
| LIST_PRICE_BASE | String | The term a recurring list price charge is based on. | charge.get('zqu__ListPriceBase__c') |
| LIST_TOTAL | String | The total list price of the charge as defined in the product catalog. | charge.get('zqu__ListTotal__c') |
| MODEL | String | The charge model as defined in the product catalog. | charge.get('zqu__Model__c') |
| NAME | String | The charge name as defined in the product catalog. | charge.get('Name') |
| PERIOD | String | The recurring period of the charge as defined in the product catalog. | charge.get('zqu__Period__c') |
| PRODUCT_RATE_PLAN_CHARGE_SFDC_ID | String | Used for binding records of Quote Rate Plan Charges to the Product Rate Plan Charge object in the product catalog. | charge.get('zqu__ProductRatePlanCharge__c') |
| PRODUCT_RATE_PLAN_CHARGE_ZUORA_ID | String | Used for binding records of Quote Rate Plan Charges to the Zuora Product Rate Plan Charge. | charge.get('zqu__ProductRatePlanChargeZuoraId__c') |
| QUANTITY | String | Quantity of the charge | charge.get('zqu__Quantity__c') |
| SPECIFIC_BILLING_PERIOD | String | Customizes the number of months or weeks for the billing period of the charge. | charge.get('zqu__SpecificBillingPeriod__c') |
| SPECIFIC_END_DATE | String | The specific date on which the charge ends. | charge.get('zqu__SpecificEndDate__c') |
| SUBSCRIPTION_RATE_PLAN_CHARGE_ID | String | Used for binding records of Quote Rate Plan Charge to the Zuora Subscription Rate Plan Charge. | charge.get('zqu__QuoteRatePlanChargeZuoraId__c') |
| TOTAL | String | Total | Not available |
| UNIT_OF_MEASURE | String | The unit of measure used for this charge as defined in the product catalog. | charge.get('zqu__UOM__c') |
| UPTO_PERIODS | String | Specifies the length of the period during which the charge is active. | charge.get('zqu__Upto_How_Many_Periods__c') |
| UPTO_PERIODS_TYPE | String | The period type used to define when the charge ends. | charge.get('zqu__Upto_How_Many_Periods_Type__c') |
| WEEKLY_BILL_CYCLE_DAY | String | The day of the week as the bill cycle day for the charge. This field is supported in the version 7.43 or later of Zuora Quotes. The following values are accepted:
| charge.get('zqu__WeeklyBillCycleDay__c') |
The zCharge class includes the following global methods.
Method | Return Type | Description | How to access using QCharge |
|---|---|---|---|
| getQuoteRatePlanChargeZuoraId | String | Gets the quote rate plan charge Zuora ID | charge.get('zqu__QuoteRatePlanChargeZuoraId__c') |
| overrideListPrice | Void | Changes the LIST_PRICE to the specified newValue. This method does not perform recalculations on other other values on zCharge. See the zQuoteUtil Class methods for recalculating charges based on pricing fields. Supported Versions: 7.0+ | put(String fieldName, Object value) |
| populateCustomChargeTiers(List<QuoteCharge_Tier__c> tiers) | Void | Populates the custom tiers for required for calculations. This method is available as of Zuora Quotes 6.0. | setTiers(List<QTier> qTiers) |