|
SAP Convergent Charging
Java and XML APIs (Core) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.highdeal.pnr.tif.ChargedTransaction
public class ChargedTransaction
This class represents a charged transaction that is a data record generated by the SAP CC system during the charging operation to a prepaid account
or to an external account (postpaid account) in a subscriber account.
Note
The SAP CC system can generate different types of transactional data. Refer to the SAP CC Library (Application Help) for more information.
TaxStatus,
SubscriberAccountModelThe XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="chargedTransaction">
<xs:complexType>
<xs:sequence>
<xs:element ref="taxDetail" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="detail" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="serviceProvider" type="xs:string"/>
<xs:attribute name="subscriberAccountCode" type="xs:string"/>
<xs:attribute name="subscriberAccountReference" type="xs:string"/>
<xs:attribute name="accountCode" type="xs:string"/>
<xs:attribute name="accountType">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="prepaid"/>
<xs:enumeration value="external"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="operationType">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="credit"/>
<xs:enumeration value="debit"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="baseAmount" type="xs:string"/>
<xs:attribute name="amount" type="xs:string"/>
<xs:attribute name="date" type="xs:dateTime"/>
<xs:attribute name="creditorId" type="xs:string"/>
<xs:attribute name="debtorId" type="xs:string"/>
<xs:attribute name="taxAmount" type="xs:string"/>
<xs:attribute name="totalAmount" type="xs:string"/>
<xs:attribute name="taxCode" type="xs:string" use="required"/>
<xs:attribute name="taxStatus" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="tsNoTax"/>
<xs:enumeration value="tsForInfo"/>
<xs:enumeration value="tsApplied"/>
<xs:enumeration value="tsTaxExempted"/>
<xs:enumeration value="tsTaxMissedForInfo"/>
<xs:enumeration value="tsTaxMissedForApply"/>
<xs:enumeration value="tsUnknown"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
| Nested Class Summary | |
|---|---|
static class |
ChargedTransaction.AccountType
Builds an account type. |
| Field Summary | |
|---|---|
static OperationType |
CREDIT_OPERATION
CREDIT_OPERATION |
static OperationType |
DEBIT_OPERATION
DEBIT_OPERATION |
static ChargedTransaction.AccountType |
EXTERNAL_ACCOUNT
EXTERNAL_ACCOUNT |
static ChargedTransaction.AccountType |
PREPAID_ACCOUNT
PREPAID_ACCOUNT |
| Constructor Summary | |
|---|---|
ChargedTransaction()
FOR INTERNAL USE ONLY - Builds an empty charged transaction. |
|
ChargedTransaction(com.highdeal.pnr.domain.IAccountAccessor suacModel,
OperationType opType,
java.lang.String accountCode,
ChargedTransaction.AccountType accountType,
java.util.Date date,
Money amount,
boolean isForced)
Initializes a charged transaction. |
|
| Method Summary | |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element. |
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the object, the child representing
the marshallable object which must be added to the element. |
java.lang.String |
getAccountCode()
Returns the code of the charged account. |
ChargedTransaction.AccountType |
getAccountType()
Returns the type of the charged account. |
Money |
getAmount()
Returns the amount of the charging. |
Money |
getBaseAmount()
Returns the base amount of the charging. |
ChargedItem |
getChargedItem()
Returns the charged item associated to this charged transaction. |
java.lang.String |
getCreditorId()
Returns the creditor identifier of the charged account. |
java.util.Date |
getDate()
Returns the date of the charge. |
java.lang.String |
getDebtorId()
Returns the debtor identifier of the charged account. |
DetailRecord |
getDetailRecord()
Returns the detail records of this charged transaction. |
OperationType |
getOperationType()
Returns the type of the operation of the this charged transaction: debit or credit. |
java.lang.String |
getServiceProvider()
Returns the service provider of the subscriber account related of the charge. |
java.lang.String |
getSubscriberAccountCode()
Returns the code of the subscriber account related to the charge. |
java.lang.String |
getSubscriberAccountReference()
Returns the internal reference of the subscriber account related to the charge. |
Money |
getTaxAmount()
Returns the tax amount of the charging. |
java.lang.String |
getTaxCode()
Returns the tax code of the charging. |
java.util.List<TaxDetailModel> |
getTaxDetails()
Returns a list of TaxDetailModel. |
TaxStatus |
getTaxStatus()
Returns the tax status of the charging. |
Money |
getTotalAmount()
Returns the total amount of the charging. |
boolean |
hasTaxDetails()
Indicates whether the taxed amount has details. |
boolean |
isExternalAccount()
Indicates whether the account type is External. |
boolean |
isForced()
Returns if the charge was forced or not. |
boolean |
isPrepaidAccount()
Indicates whether the account type is Prepaid. |
boolean |
isValid()
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children. |
void |
negateAmount()
Negates the amount of this charged transaction. |
void |
setAmount(Money amount)
Sets the amount of the charging. |
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being processed. |
void |
setBaseAmount(Money baseAamount)
Sets the base amount of the charging. |
void |
setChargedItem(ChargedItem chargedItem)
Sets the charged item associated to this charged transaction. |
void |
setTaxAmount(Money taxAmount)
Sets the tax amount of the charging. |
void |
setTaxCode(java.lang.String taxCode)
Sets the tax code of the charging. |
void |
setTaxStatus(TaxStatus taxStatus)
Sets the tax status of the charging. |
void |
setTotalAmount(Money totalAmount)
Sets the total amount of the charging. |
java.lang.String |
toString()
Returns a string representation of the charged transaction. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final ChargedTransaction.AccountType PREPAID_ACCOUNT
public static final ChargedTransaction.AccountType EXTERNAL_ACCOUNT
public static final OperationType CREDIT_OPERATION
public static final OperationType DEBIT_OPERATION
| Constructor Detail |
|---|
public ChargedTransaction()
public ChargedTransaction(com.highdeal.pnr.domain.IAccountAccessor suacModel,
OperationType opType,
java.lang.String accountCode,
ChargedTransaction.AccountType accountType,
java.util.Date date,
Money amount,
boolean isForced)
suacModel - The subscriber account that contains the charged accountopType - The operation type: DEBIT_OPERATION or CREDIT_OPERATIONaccountCode - The identification code of the charged accountaccountType - The type of the charged account: PREPAID_ACCOUNT if the charged account is a prepaid account
or EXTERNAL_ACCOUNT if the charged account is an external accountdate - Date when the charging operation has been doneamount - The amount of the chargeisForced - Flag that must be set to true to force charging on account, even if balance is empty.
java.lang.IllegalArgumentException - if one argument is empty (null or empty string).| Method Detail |
|---|
public final OperationType getOperationType()
DEBIT_OPERATION or CREDIT_OPERATIONpublic final java.lang.String getAccountCode()
java.lang.IllegalStateException - if the account code is null (invalid xml initialization)public final ChargedTransaction.AccountType getAccountType()
PREPAID_ACCOUNT if the charged account is a prepaid account
or EXTERNAL_ACCOUNT if the charged account is an external account
java.lang.IllegalStateException - if the account type is null (invalid xml initialization)public final Money getBaseAmount()
public void setBaseAmount(Money baseAamount)
baseAamount - A base amountpublic final Money getAmount()
java.lang.IllegalStateException - if the amount is null (invalid xml initialization)public void setAmount(Money amount)
amount - An amountpublic final Money getTaxAmount()
public void setTaxAmount(Money taxAmount)
taxAmount - A tax amountpublic final Money getTotalAmount()
public void setTotalAmount(Money totalAmount)
totalAmount - A total amountpublic final java.lang.String getTaxCode()
public void setTaxCode(java.lang.String taxCode)
taxCode - A tax codepublic final TaxStatus getTaxStatus()
public void setTaxStatus(TaxStatus taxStatus)
taxStatus - A tax statuspublic final void negateAmount()
public final java.util.Date getDate()
java.lang.IllegalStateException - if the date is null (invalid xml initialization)public final java.lang.String getServiceProvider()
java.lang.IllegalStateException - if the service providr is null (invalid xml initialization)public final java.lang.String getSubscriberAccountCode()
java.lang.IllegalStateException - if the subscriber account code is null (invalid xml initialization)public final java.lang.String getSubscriberAccountReference()
java.lang.IllegalStateException - if the subscriber account internal reference is null (invalid xml initialization)public boolean isForced()
true if the charge was forced, false otherwise.public java.lang.String getDebtorId()
public java.lang.String getCreditorId()
public DetailRecord getDetailRecord()
public java.util.List<TaxDetailModel> getTaxDetails()
TaxDetailModel.
TaxDetailModelpublic boolean hasTaxDetails()
true if the taxed amount has a list of
TaxDetail, else false.public ChargedItem getChargedItem()
public void setChargedItem(ChargedItem chargedItem)
chargedItem - The charged item associated to this charged transactionpublic final boolean isPrepaidAccount()
true if the account type is Prepaid, false otherwise.public final boolean isExternalAccount()
true if the account type is External, false otherwise.public final void setAttributes(XMLAttributes atts)
XMLMarshallable
setAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addCharacterData(java.lang.String cData)
XMLMarshallable
addCharacterData in interface XMLMarshallablecData - The character data to be added
public final void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.
addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic final void marshal(XMLOutputter output)
XMLMarshallable
marshal in interface XMLMarshallableoutput - The XML output to marshal the object intopublic final boolean isValid()
public java.lang.String toString()
toString in class java.lang.Object
|
Document Published: October 2015 (SAP CC 4.0 SP10 and Later) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||