Price Component REST Bindings

The price component REST bindings create new price components, return information about existing price components, and update existing price components. Price components are always based on usage.

The information available to the price component REST bindings includes:
  • application (usage, and so forth)
  • description
  • quantity_selector
  • service_id
  • type (charge, discount, grant)
  • Parameters (a list of parameters assigned to this price component with their default values)
Note: The PUT operation supports all attributes in the GET response.

Examples

POST /objects/Price/basic shows how to create a new price component.
Table 1. POST /objects/Price/basic
URL
POST http://localhost:8080/matrixx/data/objects/Price/basic
Input
<?xml version="1.0" encoding="UTF-8"?>
<Price name="Sample Preferred Zone - Charges">
    <EffectiveDate>2013-10-22T00:00:00</EffectiveDate>
    <MatrixList>
        <Matrix id="ID"/>
    </MatrixList>
</Price>
Note: Replace ID with the Matrix id.
Response
<CreateResponse>
    <type>Price</type>
    <DomainId>1</DomainId>
    <Result>0</Result>
    <ResultText>Success</ResultText>
    <ObjectId>2402</ObjectId>
    <Revision>0</Revision>
</CreateResponse>  
GET /objects/Price/basic/{id} shows how to retrieve a price component from the in-memory pricing database.
Table 2. GET /objects/Price/basic/{id}
URL
GET http://localhost:8080/matrixx/data/objects/Price/basic/2402
Response
<?xml version="1.0" encoding="UTF-8"?>
<Price application='usage' description='' name='C-24Data' quantity_selector='in_data' service_id='2' type='charge'>
    <EffectiveDate>2000-01-01T00:00:00</EffectiveDate>
    <MatrixList>
        <Matrix id='207' />
    </MatrixList>
    <Parameters>
        <parameter default_value='42' id='17' />
        <parameter default_value='86' id='18' />
    </Parameters>
</Price> 
PUT /objects/Price/basic/{id} shows how to update an existing price component.
Table 3. PUT /objects/Price/basic/{id}
URL
PUT http://localhost:8080/matrixx/data/objects/Price/basic/2402
Input
<?xml version="1.0" encoding="UTF-8"?>
<Price name="Sample Preferred Zone - Charges">
</Price> 
Response
<UpdateResponse>
    <type>Price</type>
    <DomainId>1</DomainId>
    <Result>0</Result>
    <ResultText>Success</ResultText>
    <ObjectId>2402</ObjectId>
    <Revision>1</Revision>
</UpdateResponse>