get_pricing.py
Use the get_pricing.py script to compile a pricing plan into a version that can be loaded into the engine.
The compiled version can be a standalone pricing XML file or a ZIP file that has:
- The pricing XML file.
- All catalog items used to compile the XML file.
- Pricing file header information.
- The mtx_config.xml file used during compilation.
The compiled file is saved to the local directory where the get_pricing.py script is run.
Syntax
/opt/mtx/bin/get_pricing.py [-h] filename URL username password domain [date]
Options
- -h, --help
- Displays help information at the command line.
- filename
- The name of the compiled pricing file. This name must include the appropriate file extension, .xml or .zip.
- URL
- The HTTP web address for the pricing compiler on the My MATRIXX host server.
- username
- The My MATRIXX login name of the user whose workspace is used to compile the pricing plan.
- password
- The My MATRIXX password for the username specified.
- domain
- The name of the pricing domain in the user's workspace that has the pricing configuration file to compile.
- date
- An optional parameter that enables you to specify
the number of old pricing revisions to compile into the configuration file.
This parameter overrides the configuration setting in My MATRIXX for compiling revisions. The value is an ISO date in the format
yyyy-mm-ddThh:mm:ss
that specifies what date from which to produce a pricing file. All revisions that became inactive before this date are filtered out. A pricing revision is active until its next revision starts.
Examples
Compile a standalone XML pricing
file:
/opt/mtx/bin/get_pricing.py mtx_pricing_Sample_guest.xml http://localhost:8082/matrixx/data/admin/compile guest guest Sample
Compile a development version of the pricing ZIP
file:
/opt/mtx/bin/get_pricing.py mtx_pricing_Sample_guest.zip http://localhost:8082/matrixx/data/admin/compilejar guest guest Sample
Compile a production version of the pricing ZIP
file:
/opt/mtx/bin/get_pricing.py mtx_pricing_Sample_admin.zip http://localhost:8082/matrixx/data/admin/productionjar admin admin Sample