Introducing the Chargebee CLI

What is the use of mandatoryAddonsToRemove()?

Addon-item prices are purchased with plan-item prices. Attach an addon to a plan at the item level. When you create or update a subscription, Chargebee selects the addon prices from the selected plan-item price.

Use mandatoryAddonsToRemove() when an addon is mandatory on the plan item and you want to keep it off one subscription. Pass the mandatory addon item ID in mandatoryAddonsToRemove (Product Catalog 2.0). You do not need replaceAddonList for this targeted exclusion.

replaceAddonList(true) / replaceItemsList(val)

Pass replaceAddonList as true when you want to replace the full addon list on the subscription, not only skip one mandatory addon.

See Attached items.