Package com.highdeal.pnr.hci
Class PreRateResult
java.lang.Object
com.highdeal.pnr.hci.PreRateResult
- All Implemented Interfaces:
OperationResult,XMLMarshallable
The result of a
A
PreRateOp operation.
A
PreRateResult contains an amount which is the
amount of the master usage transaction (may be null in case
of "free" rate).
The master usage transaction
is the one computed by the charge linked to the access. A dependent
transaction computation is based on the master transaction. To get
the master transaction, the resultType of the
PreRateOp parameter must be set to
masterTransaction. The allTransaction value
enables to get all the usage transactions (master and dependent).XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="preRateResult">
<xs:complexType>
<xs:sequence>
<xs:element ref="transac" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="amount" type="xs:string"/>
<xs:attribute name="transactionSetID" type="xs:long"/>
</xs:complexType>
</xs:element>
-
Constructor Summary
ConstructorsConstructorDescriptionBuilds an empty PreRateResult.PreRateResult(Money amount, Vector<Transaction> transactions) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.Returns the amount of the master transaction (may benullin case of "free" rate).Gets the code or the reference (if no code exists) that identifies the operand of the operation request; If the operation is not auditable, the operand reference isnull.Gets the list of usage transactions computed by the rating engine (may be empty).Gets the transaction set owner ID.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidSets the amount of the master transaction.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidsetTransactionSetID(Long transactionSetID) Sets the transaction set owner ID.
-
Constructor Details
-
PreRateResult
public PreRateResult()Builds an empty PreRateResult. -
PreRateResult
- Parameters:
amount- the total amount of the pre-rating.transactions- thetransactionscomputed by the rating process.
-
-
Method Details
-
getOperandReference
Description copied from interface:OperationResultGets the code or the reference (if no code exists) that identifies the operand of the operation request; If the operation is not auditable, the operand reference isnull.- Specified by:
getOperandReferencein interfaceOperationResult- Returns:
- The operand reference of the operation result
-
getAmount
Returns the amount of the master transaction (may benullin case of "free" rate).- Returns:
- the amount of the master transaction.
-
setAmount
Sets the amount of the master transaction.- Parameters:
amount- the amount of the master transaction
-
getTransactionSetID
Gets the transaction set owner ID.- Returns:
- the transaction set ID.
-
setTransactionSetID
Sets the transaction set owner ID.- Parameters:
transactionSetID- the transaction set owner ID.
-
getTransactions
Gets the list of usage transactions computed by the rating engine (may be empty).- Returns:
- the
transactionlist.
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Specified by:
setAttributesin interfaceXMLMarshallable- Parameters:
atts- TheXML attributesof the current element
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Specified by:
addChildin interfaceXMLMarshallable- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Specified by:
addCharacterDatain interfaceXMLMarshallable- Parameters:
cData- The character data to be added
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Specified by:
marshalin interfaceXMLMarshallable- Parameters:
output- TheXML outputto marshal the object into
-