Package net.pricefx.common.apibuilder.pricingplan
package net.pricefx.common.apibuilder.pricingplan
Builders that create Pricing Plan objects from a logic.
Entry points: api.createPricingPlanRevision() and
api.createPricingPlanScenario().
- Create a revision in an existing Pricing Plan. The revision starts in
DRAFTstatus, without active dates. - Create a scenario in a
DRAFTrevision. The scenario type comes from the types that the Pricing Plan Type of the parent Pricing Plan allows.
build() saves the object and returns it as a map. It throws an IllegalArgumentException
when no name is set.
Both calls modify data, so they work only in the contexts listed under Object modifications in
PublicGroovyAPI. In any other context they return
null.
Example: create a revision, then a scenario in it.
def ppr = api.createPricingPlanRevision(ppTypedId)
.withName("my-revision")
.withLabel("My Revision")
.build()
def pps = api.createPricingPlanScenario(ppr.typedId)
.withName("my-scenario")
.withLabel("My Scenario")
.withScenarioType(ppstTypedId)
.build()
Reference
PricingPlanRevisionBuildercreates a Pricing Plan Revision.PricingPlanScenarioBuildercreates a Pricing Plan Scenario.
- Since:
- 17.0
-
ClassesClassDescriptionCreates a Pricing Plan Revision (PPR) in an existing Pricing Plan.Creates a Pricing Plan Scenario (PPS) in an existing Pricing Plan Revision.