Package com.highdeal.pnr.tif
Class Transaction
java.lang.Object
com.highdeal.pnr.tif.Transaction
- All Implemented Interfaces:
XMLMarshallable
This
Java class represents a rated transaction computed by the SAP CC system during the dynamic
pricing of a customer service use (service usage by an end customer, periodic fees, or one-off fees).
A rated transaction includes:
- Base Amount: Price dynamically computed by the SAP CC system by processing a price plan configured in a charge of the charge plan (or offer) assigned to the provider contract (or subscription) associated to this rated transaction
- Identifier of the related provider contract or subscription (see
subscriptionCode) - Identifier of the related charge plan or commercial offer (see
offerCode) - Identifier of the charge that includes the price plan use to compute this rated transaction
- Dispatch Code 1, Dispatch Code 2, and Dispatch Code 3
- Origin (usage, recurring, one-shot, or account event)
- Date
- Label
- Relationship Type (client or partner)
- Operation Type (debit or credit)
- Reservation UID
- Session ID
- Multiple
transaction details - Some
notificationsassigned to this rated transaction
Transaction Details
Refer to transaction details for more information.
Transaction details can be filtered if the transaction is generated by a stateful operation and for a provider contract.
The transaction detail filtering is configured through the
Response Item from the Charge Plan.
Additional Information
Consult the SAP CC Application Help from more information about the charging process.
- See Also:
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="transac" type="TransactionType"/>
<xs:complexType name="TransactionType">
<xs:sequence>
<xs:element name="detail" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="type" type="xs:string"/>
<xs:attribute name="value" type="xs:anySimpleType"/>
</xs:complexType>
</xs:element>
<xs:element ref="notification" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="amount" type="xs:string"/>
<xs:attribute name="offerCode" type="xs:string"/>
<xs:attribute name="chargePlanId" type="xs:string"/>
<xs:attribute name="subscriptionCode" type="xs:string"/>
<xs:attribute name="chargingContractId" type="xs:string"/>
<xs:attribute name="chargeCode" type="xs:string"/>
<xs:attribute name="dispatchCode1" type="xs:string"/>
<xs:attribute name="dispatchCode2" type="xs:string"/>
<xs:attribute name="dispatchCode3" type="xs:string"/>
<xs:attribute name="origin" type="TransactionOrigin"/>
<xs:attribute name="date" type="xs:dateTime"/>
<xs:attribute name="label" type="xs:string"/>
<xs:attribute name="relationshipType" type="TransacRelationShipTypeType" default="client"/>
<xs:attribute name="operationType" type="TransacOperationTypeType" default="debit"/>
<xs:attribute name="reservationUID" type="xs:long"/>
<xs:attribute name="sessionID" type="xs:string"/>
</xs:complexType>
<xs:simpleType name="TransactionOrigin">
<xs:restriction base="xs:string">
<xs:enumeration value="usage"/>
<xs:enumeration value="recurring"/>
<xs:enumeration value="oneshot"/>
<xs:enumeration value="accountEvent"/>
</xs:restriction>
</xs:simpleType><xs:simpleType name="TransacRelationShipTypeType">
<xs:restriction base="xs:string">
<xs:enumeration value="client"/>
<xs:enumeration value="partner"/>
</xs:restriction>
</xs:simpleType><xs:simpleType name="TransacOperationTypeType">
<xs:restriction base="xs:string">
<xs:enumeration value="debit"/>
<xs:enumeration value="credit"/>
</xs:restriction>
</xs:simpleType>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intConstant value of the origin field indicating an account event refill transactionstatic final intConstant value for a client type business relationshipstatic final intConstant value for a credit operationstatic final intConstant value for a debit operationstatic final intConstant value of the origin field indicating a one-shot transactionstatic final intConstant value for a partner type business relationshipstatic final intConstant value of the origin field indicating a recurring transactionstatic final intConstant value of the origin field indicating a usage transaction -
Constructor Summary
ConstructorsConstructorDescriptionBuilds an empty transactionTransaction(Money amount, String offerCode, String subscriptionCode, String chargeCode, String dispatchCode1, String dispatchCode2, String dispatchCode3, int origin, DetailRecord detailRecord, Date date, String label) Builds a full transaction with neitherreservationUIDnorsessionIDTransaction(Money amount, String offerCode, String subscriptionCode, String chargeCode, String dispatchCode1, String dispatchCode2, String dispatchCode3, int origin, DetailRecord detailRecord, Date date, String label, Long reservationUID, String sessionID) Builds a full transactionTransaction(Money amount, String offerCode, String subscriptionCode, String chargeCode, String dispatchCode1, String dispatchCode2, String dispatchCode3, int origin, DetailRecord detailRecord, Date date, String label, Long reservationUID, String sessionID, String internalSessionID, Vector<Notification> notifications) Transaction(TransactionTemplateModel template) Builds an empty transaction with atemplatewhich will determine how to filter the transaction -
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.final TransactionDuplicates the transactionfinal TransactionDuplicate the transaction without the detail record.Gets the amount of the transaction generated by the SAP CC systemReturns the identification code of the chargeGets the identifier of the charge plan activated in the relating provider contract (in case of charging services based on provider contracts)Gets the identifier of the charging contract associated to this rated transaction (see provider contract)getDate()Gets the dateGets the detail record included in the transactionGets the dispatch code number 1Gets the dispatch code number 2Gets the dispatch code number 3Gets the session internal id related to this transaction when it has been computed by session-based rating operations.getLabel()Returns the labelGets the master transaction for this transactionGets the list of triggered notificationsGets the identification code of the relatedcommercial offerif the transaction results from charging services based onsubscriptions.intGets the operation type of the transactionintintGets the relationship type of the transactionGets the reservation ID related to this transaction when it has been computed by aPreRateOporPostRateOp.Gets the session identifier related to this transaction when it has been computed by session-based charging operations.Gets the identification code of thesubscription associated to this rated transactiongetTransaction(boolean isFilterTransaction) Gets the transaction according to the value of the option: isFilterTransactionGets the transaction template which determines the filteringbooleanisFree()Checks if transaction is free, i.e.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidmarshal(XMLOutputter output, String tagName) voidSets the amountvoidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidsetChargeCode(String code) Sets the charge codevoidsetChargePlanId(String chargePlanId) Sets the identifier of the charge planvoidsetChargingContractId(String chargingContractId) Sets the identifier of the charging contract (charging view of a provider contract)voidSets the datevoidsetDetailRecord(DetailRecord record) Sets the detail recordvoidsetDispatchCode1(String code) Sets the dispatch code number 1voidsetDispatchCode2(String code) Sets the dispatch code number 2voidsetDispatchCode3(String code) Sets the dispatch code number 3voidsetInternalSessionID(String internalSessionID) Sets the session internal id related to this transaction when it has been computed by session-based rating operations.voidSets the labelvoidsetMasterTransaction(Transaction masterTransaction) Sets the master transaction for this transactionvoidsetNotifications(Vector<Notification> notifications) Sets the list of triggered notificationsvoidsetOfferCode(String code) Sets the identification code of the offervoidsetOperationType(int type) Sets the operation type for the transactionvoidsetOrigin(int origin) Sets the originvoidsetRelationshipType(int relationshipType) Sets the relationship type of the transactionvoidsetReservationUID(Long reservationUID) Sets the reservation ID related to this transaction when it has been computed by aPreRateOporPostRateOpoperation request.voidsetSessionID(String sessionID) Sets the session ID related to this transaction when it has been computed by session-based charging operations.voidsetSubscriptionCode(String code) Sets the subscription codetoString()
-
Field Details
-
USAGE
public static final int USAGEConstant value of the origin field indicating a usage transaction- See Also:
-
RECURRING
public static final int RECURRINGConstant value of the origin field indicating a recurring transaction- See Also:
-
ONESHOT
public static final int ONESHOTConstant value of the origin field indicating a one-shot transaction- See Also:
-
ACCOUNT_EVENT
public static final int ACCOUNT_EVENTConstant value of the origin field indicating an account event refill transaction- See Also:
-
CLIENT_RELATIONSHIP
public static final int CLIENT_RELATIONSHIPConstant value for a client type business relationship- See Also:
-
PARTNER_RELATIONSHIP
public static final int PARTNER_RELATIONSHIPConstant value for a partner type business relationship- See Also:
-
DEBIT_OPERATION
public static final int DEBIT_OPERATIONConstant value for a debit operation- See Also:
-
CREDIT_OPERATION
public static final int CREDIT_OPERATIONConstant value for a credit operation- See Also:
-
-
Constructor Details
-
Transaction
public Transaction()Builds an empty transaction -
Transaction
Builds an empty transaction with atemplatewhich will determine how to filter the transaction- Parameters:
template- The manner to filter transaction
-
Transaction
public Transaction(Money amount, String offerCode, String subscriptionCode, String chargeCode, String dispatchCode1, String dispatchCode2, String dispatchCode3, int origin, DetailRecord detailRecord, Date date, String label) Builds a full transaction with neitherreservationUIDnorsessionID- Parameters:
amount-offerCode-subscriptionCode-chargeCode-dispatchCode1-dispatchCode2-dispatchCode3-origin-detailRecord-date-label-
-
Transaction
public Transaction(Money amount, String offerCode, String subscriptionCode, String chargeCode, String dispatchCode1, String dispatchCode2, String dispatchCode3, int origin, DetailRecord detailRecord, Date date, String label, Long reservationUID, String sessionID) Builds a full transaction- Parameters:
amount-offerCode-subscriptionCode-chargeCode-dispatchCode1-dispatchCode2-dispatchCode3-origin-detailRecord-date-label-reservationUID-sessionID-
-
Transaction
public Transaction(Money amount, String offerCode, String subscriptionCode, String chargeCode, String dispatchCode1, String dispatchCode2, String dispatchCode3, int origin, DetailRecord detailRecord, Date date, String label, Long reservationUID, String sessionID, String internalSessionID, Vector<Notification> notifications)
-
-
Method Details
-
getTransaction
Gets the transaction according to the value of the option: isFilterTransaction- Parameters:
isFilterTransaction-trueif the returned transaction must be filtered, false otherwise- Returns:
- The transaction filtered or not
-
duplicate
Duplicates the transaction- Returns:
- The duplicated transaction
-
duplicateWithoutDetailRecord
Duplicate the transaction without the detail record.- Returns:
- the duplicated transaction
-
getAmount
Gets the amount of the transaction generated by the SAP CC system- Returns:
- The amount
-
setAmount
Sets the amount- Parameters:
amount- The amount to set
-
isFree
public boolean isFree()Checks if transaction is free, i.e. if the amount isnull.- Returns:
trueif the transaction is free,falseotherwise
-
getOfferCode
Gets the identification code of the relatedcommercial offerif the transaction results from charging services based onsubscriptions.- Returns:
- The offer code
-
setOfferCode
Sets the identification code of the offer- Parameters:
code- The transaction offer code
-
getChargePlanId
Gets the identifier of the charge plan activated in the relating provider contract (in case of charging services based on provider contracts)- Returns:
- The identifier of the charge plan
-
setChargePlanId
Sets the identifier of the charge plan- Parameters:
chargePlanId- The identifier of the charge plan
-
getSubscriptionCode
Gets the identification code of thesubscription associated to this rated transaction- Returns:
- The subscription identification code
-
setSubscriptionCode
Sets the subscription code- Parameters:
code- The subscription code
-
getChargingContractId
Gets the identifier of the charging contract associated to this rated transaction (see provider contract)- Returns:
- The identifier of the charging contract
-
setChargingContractId
Sets the identifier of the charging contract (charging view of a provider contract)- Parameters:
chargingContractId- The identifier of the charging contract
-
getChargeCode
Returns the identification code of the charge- Returns:
- The charge code
-
setChargeCode
Sets the charge code- Parameters:
code- The charge code
-
getDispatchCode1
Gets the dispatch code number 1- Returns:
- The first dispatch code
-
setDispatchCode1
Sets the dispatch code number 1- Parameters:
code- The dispatch code 1
-
getDispatchCode2
Gets the dispatch code number 2- Returns:
- The second dispatch code
-
setDispatchCode2
Sets the dispatch code number 2- Parameters:
code- The dispatch code 2
-
getDispatchCode3
Gets the dispatch code number 3- Returns:
- The third dispatch code
-
setDispatchCode3
Sets the dispatch code number 3- Parameters:
code- The dispatch code 3
-
getOrigin
public int getOrigin()Gets the origin event of the transaction; It may contain one of the following types:usage(service consumtpion),recurring(periodic fees), orone-shot(one-offf fees).- Returns:
- The origin of the transaction
-
setOrigin
public void setOrigin(int origin) Sets the origin- Parameters:
origin- The transaction origin
-
getDetailRecord
Gets the detail record included in the transaction- Returns:
- The
detail record
-
setDetailRecord
Sets the detail record- Parameters:
record- The transaction detail record
-
getDate
Gets the date- Returns:
- The date
-
setDate
Sets the date- Parameters:
date- The transaction date
-
getLabel
Returns the label- Returns:
- The label
-
setLabel
Sets the label- Parameters:
label- The transaction label
-
getTransactionTemplate
Gets the transaction template which determines the filtering- Returns:
- template The manner to filter transaction
-
getRelationshipType
public int getRelationshipType()Gets the relationship type of the transaction- Returns:
- The value of relationship type
- See Also:
-
setRelationshipType
public void setRelationshipType(int relationshipType) Sets the relationship type of the transaction- Parameters:
relationshipType- The value to assign to the relationship type- See Also:
-
getOperationType
public int getOperationType()Gets the operation type of the transaction- Returns:
- The value of operation type
- See Also:
-
setOperationType
public void setOperationType(int type) Sets the operation type for the transaction- Parameters:
type- The value to assign to operation type- See Also:
-
getReservationUID
Gets the reservation ID related to this transaction when it has been computed by aPreRateOporPostRateOp.- Returns:
- The reservation ID related to this transaction
-
setReservationUID
Sets the reservation ID related to this transaction when it has been computed by aPreRateOporPostRateOpoperation request.- Parameters:
reservationUID- The reservation ID related to this transaction
-
getSessionID
Gets the session identifier related to this transaction when it has been computed by session-based charging operations.- Returns:
- The session ID related to this transaction
-
setSessionID
Sets the session ID related to this transaction when it has been computed by session-based charging operations.- Parameters:
sessionID- The session ID related to this transaction
-
getInternalSessionID
Gets the session internal id related to this transaction when it has been computed by session-based rating operations.- Returns:
- the session internal id related to this transaction
-
setInternalSessionID
Sets the session internal id related to this transaction when it has been computed by session-based rating operations.- Parameters:
internalSessionID- the session internal id related to this transaction
-
getNotifications
Gets the list of triggered notifications- Returns:
- The list of
notificationstriggered and included in this resulting transaction by the SAP CC system
-
setNotifications
Sets the list of triggered notifications- Parameters:
notifications- The list of triggerednotifications
-
getMasterTransaction
Gets the master transaction for this transaction- Returns:
- The master transaction of this transaction if it is a dependent transaction,
nullotherwise
-
setMasterTransaction
Sets the master transaction for this transaction- Parameters:
masterTransaction- The master transaction of this transaction
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Specified by:
addCharacterDatain interfaceXMLMarshallable- Parameters:
cData- The character data to be added
-
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
-
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
-
marshal
-
toString
-