Class PricingPlanRevisionBuilder
Object
PricingPlanRevisionBuilder
Creates a Pricing Plan Revision (PPR) in an existing Pricing Plan. Obtain it with
api.createPricingPlanRevision().
The builder creates the revision in DRAFT status. It sets no activeFrom or activeTo
dates. The publish or schedule step assigns them later.
Example:
def ppr = api.createPricingPlanRevision(ppTypedId)
.withName("my-revision")
.withLabel("My Revision")
.withDescription("Created via Groovy API")
.build()
- Since:
- 17.0
-
Constructor Summary
ConstructorsConstructorDescriptionPricingPlanRevisionBuilder(PersistedObjectService objService, String ppTypedId) -
Method Summary
Modifier and TypeMethodDescriptionPricingPlanRevisionbuild()Creates and persists the PricingPlanRevision with the configured properties.withDescription(String description) Sets the description of the revision.Sets the display label of the revision.Sets the unique name (business key) of the revision.
-
Constructor Details
-
PricingPlanRevisionBuilder
-
-
Method Details
-
withName
Sets the unique name (business key) of the revision.- Parameters:
name- unique name- Returns:
- this builder
-
withLabel
Sets the display label of the revision.- Parameters:
label- display label- Returns:
- this builder
-
withDescription
Sets the description of the revision.- Parameters:
description- description text- Returns:
- this builder
-
build
public PricingPlanRevision build()Creates and persists the PricingPlanRevision with the configured properties.- Returns:
- the persisted PPR entity (converted to a safe map by the sandbox)
- Throws:
IllegalArgumentException- if name was not setIllegalStateException- if the revision fails validation
-