/
RAT Groovy API

RAT Groovy API

Rebate Templates use a Groovy logic to construct Rebate Agreements with a builder-like API. (The same pattern as for charts, headers etc.). You "chain" your requirements for a Rebate Agreement and then call the build method at the end. The logic is defined in the Configuration section.

The most used methods and objects are:

  • ROOT – ID for the root line item, the Rebate Agreement itself.

  • ratBuilder – Groovy binding which is available in the template context.

    • fromParams(params) – Creates a new Rebate Agreement with parameters; the available parameters are: label, startDate, endDate.

    • addOrUpdateInput(lineId, params) – Adds/updates the input.

    • addLineItemWithId(lineId, type) – Adds a new line item to the Rebate Agreement, specified with the string type – rebate type unique name.

    • build() – Build function which has to be called after all the requested modifications.

Related content

Rebate Template Logics
Rebate Template Logics
More like this
RAT Basic Example
Read with this
RAT Groovy API
RAT Groovy API
More like this
Rebate Templates
Read with this
Rebate Template Logics
Rebate Template Logics
More like this
Rebate Template Simple Working Example
Rebate Template Simple Working Example
Read with this

Found an issue in documentation? Write to us.

 
Pricefx version 14.0