Skip to main content

State Changing Methods

Zuora

State Changing Methods

The remove() and revert() methods are used to change the current state of a plan. Behavior differs depending on the current amendment type.

Updating most values on a plan, charge, or tier can trigger an Update Event that can also change the state of a plan.

All successful calls will enable the isChanged flag.

In the table "On Save" means that the QPlanWriter.save() is called. See QPlanWriter Class for more information.

Original Amendment Type Action Effect On Save
NewProduct (Saved) remove() voidAction flagged. Delete NewProduct Amendment.
revert() voidAction flagged. Delete NewProduct Amendment.
update event No type change.

Update NewProduct Amendment.

NewProduct (Unsaved) No change. N/A Create NewProduct Amendment.
remove() voidAction flagged. No change.
revert() voidAction flagged. No change.
update event No type change. Create NewProduct Amendment.
OriginalProduct remove()

Amendment Type changed to RemoveProduct.

All Charges and QuoteProductFeatures originally found under the QPlan are cleared.

Create RemoveProduct Amendment.
revert() Invalid Operation Exception thrown. N/A
update event

Amendment Type changed to UpdateProduct.

Cloned original state stored in originalPlan field.

Create UpdateProduct Amendment.
UpdateProduct (Saved) remove()

Amendment Type changed to RemoveProduct.

voidAction is disabled.

All Charges and QuoteProductFeatures originally found under the QPlan are cleared.

Update UpdateProduct Amendment to RemoveProduct.

Delete saved QuoteRatePlanCharges that were created when UpdateProduct was created.

revert()

Plan data reverted to match originalPlan.

AmendmentType changed to OriginalProduct.

voidAction flagged.

Delete UpdateProduct Amendment.
update event

No type change.

voidAction is disabled.

Update UpdateProduct Amendment.
UpdateProduct (Unsaved) No change. N/A Create UpdateProduct Amendment.
remove()

Amendment Type changed to RemoveProduct.

All Charges and QuoteProductFeatures originally found under the QPlan are cleared.

Create RemoveProduct Amendment.
revert()

Plan data reverted to match originalPlan.

AmendmentType changed to OriginalProduct.

No change.
update event

No type change.

voidAction is disabled.

Update UpdateProduct Amendment.
RemoveProduct (Saved) remove() Invalid Operation Exception thrown. N/A
revert()

Plan data reverted to match originalPlan.

AmendmentType changed to OriginalProduct.

voidAction flagged.

Delete RemoveProduct Amendment.
update event Invalid Operation Exception thrown. N/A
RemoveProduct (Unsaved) No change. N/A Create RemoveProduct Amendment.
remove() Invalid Operation Exception thrown. N/A
revert() Amendment Type updated to OriginalProduct. No change.
update event Invalid Operation Exception thrown. N/A