Package com.highdeal.pnr.hci
Class ChargeConditionModel
java.lang.Object
com.highdeal.pnr.hci.ChargeConditionModel
- All Implemented Interfaces:
XMLMarshallable
A
ChargeConditionModel represents the information to build a new charge condition.Warning
The dependentRole attribute must be valued if the charge condition refers a dependent charge.
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="chargeCondition">
<xs:complexType>
<xs:sequence>
<xs:element ref="counterDescription" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="counter" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="parameterSet" minOccurs="0" maxOccurs="1"/>
<xs:element name="parameterSetChronology" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element ref="chronology" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element ref="translationInstanceSet" minOccurs="0" maxOccurs="1"/>
<xs:element name="translationInstanceSetChronology" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element ref="chronology" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element ref="tierTableInstanceSet" minOccurs="0" maxOccurs="1"/>
<xs:element name="tierTableInstanceSetChronology" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element ref="chronology" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element ref="transactionTemplate" minOccurs="0" maxOccurs="1"/>
<xs:element ref="chargedItemMapping" minOccurs="0" maxOccurs="1"/>
<xs:element ref="taxParameterSet" minOccurs="0" maxOccurs="unbounded"/> <!-- Tax settings for this charge condition -->
</xs:sequence>
<xs:attribute name="subCode" type="xs:string" use="required"/>
<xs:attribute name="reference" type="xs:string"/>
<xs:attribute name="description" type="xs:string"/>
<xs:attribute name="currency" type="xs:string" use="optional"/>
<xs:attribute name="multiCurrencies" type="xs:boolean" default="false"/>
<xs:attribute name="effectiveDate" type="xs:dateTime"/>
<xs:attribute name="expirationDate" type="xs:dateTime"/>
<xs:attribute name="lastActivationDate" type="xs:dateTime"/>
<xs:attribute name="manualActivable" type="xs:boolean" default="false"/>
<xs:attribute name="dependentRole" type="DependentRoleType" use="optional"/> <!-- Required if the charge condition refers a dependent charge -->
<xs:attribute name="dependentOfferLevel" type="xs:boolean" default="false"/>
<xs:attribute name="parentCode" type="xs:string"/>
<xs:attribute name="parentRef" type="xs:string"/>
<xs:attribute name="relationshipType" type="RelationShipTypeType" default="client"/>
<xs:attribute name="operationType" type="ChargeConditionOperationTypeType" default="debit"/>
<xs:attribute name="adjustmentMode" type="AdjustmentModeType" default="none"/>
<xs:attribute name="usePreviousDiscountedAmount" type="xs:boolean" use="optional" default="false"/> <!-- Used only if the attribute dependentRole corresponds a discount -->
</xs:complexType>
</xs:element><xs:simpleType name="RelationShipTypeType">
<xs:restriction base="xs:string">
<xs:enumeration value="client"/>
<xs:enumeration value="partner"/>
</xs:restriction>
</xs:simpleType><xs:simpleType name="ChargeConditionOperationTypeType">
<xs:restriction base="xs:string">
<xs:enumeration value="debit"/>
<xs:enumeration value="credit"/>
</xs:restriction>
</xs:simpleType><xs:simpleType name="AdjustmentModeType">
<xs:restriction base="xs:string">
<xs:enumeration value="none"/>
<xs:enumeration value="merging"/>
<xs:enumeration value="splitting"/>
</xs:restriction>
</xs:simpleType><xs:simpleType name="DependentRoleType">
<xs:restriction base="xs:string">
<xs:enumeration value="partnerCommission"/>
<xs:enumeration value="commission"/>
<xs:enumeration value="sponsorship"/>
<xs:enumeration value="discount"/>
<xs:enumeration value="other"/>
</xs:restriction>
</xs:simpleType>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intConstant value for a client type business relationship.static final intConstant value for a credit operation.static final intConstant value for a debit operation.static final intConstant value for a merging adjustment.static final intConstant value for a none adjustment.static final intConstant value for a partner type business relationship.static final intConstant value for a splitting adjustment. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String name, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.voidintGets the adjustment mode of the charge conditionReturns the charged item mapping of this charge conditionReturns the list ofcounterDescriptionsReturns the list ofCounterModelReturns the currency code of this charge conditionReturns the role of this charge condition if it is a dependent (Note: this attribute must be valued if it is a dependent)Returns the description of this charge conditionReturns the effective date of this charge conditionReturns the expiration date of this charge conditionReturns the last activation date of this charge conditiongetOffer()Returns the offer of this charge conditionReturns the offer condition of this charge conditionGets the list of counters that are shared by the offer in offer conditionGets the list of parameters that are shared by the offer in offer condition It firstly looks in the edition context and if null, looks in the context chronology at the specified date.Gets the list of tier table instances that are shared by the offer in offer condition; It firstly looks in the edition context and if null, looks in the context chronology at the specified date.Gets the list of translation instances that are shared by the offer in offer condition; It firstly looks in the edition context and if null, looks in the context chronology at the specified date.intGets the operation type of the charge conditionReturns the parameter set model of the charge conditionReturns the parameter set chronology of this charge conditionReturns the parent code of this charge conditionReturns the parent reference of this charge conditionReturns the reference of this charge conditionintGets the relationship type of the charge condition.Returns the subcode of this charge conditionReturns the tier table instance set model of the charge conditionReturns the tier table instance set chronology of this charge conditionReturns the transaction template of this charge conditionReturns the translation instance set model of the charge conditionReturns the translation instance set chronology of this charge conditionbooleanReturnstrueif the charge activation is manually created for this charge condition, elsefalse; This is an informative attribute.booleanReturns whether the charge condition is multi-currenciesbooleanGets the level of the dependent chargebooleanGets the base amount to charge the dependent discountvoidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidsetAdjustmentMode(int mode) Sets the adjustment mode of the charge conditionvoidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidSets the charged item mapping of the charge conditionvoidsetCurrencyCode(String currencyCode) Sets the currency code of this charge conditionvoidsetDependentRole(String dependentRole) Sets the role for this charge condition if it is a dependent (Note: this attribute must be valued if it is a dependent)voidsetDescription(String description) Sets the description of this charge conditionvoidsetEffectiveDate(Date effectiveDate) Sets the effective date of this charge conditionvoidsetExpirationDate(Date expirationDate) Sets the expiration date of this charge conditionvoidsetLastActivationDate(Date lastActivationDate) Sets the last activation date of this charge conditionvoidsetManualActivable(boolean manualActivable) Sets the activation mode for this charge conditionvoidsetMultiCurrencies(boolean multiCurrencies) Sets whether this charge condition is multi-currenciesvoidsetOffer(OfferModel offer) Sets the offer of this charge conditionvoidsetOfferCondition(OfferConditionModel offerCondition) Sets the offer condition of this charge conditionvoidsetOfferLevelDependent(boolean offerLevel) Sets the level of the dependent chargevoidsetOperationType(int type) Sets the operation type of the charge conditionvoidSets the parameter set model of the charge conditionvoidSets the parent code of this charge conditionvoidsetParentRef(String ref) Sets the parent reference of this charge conditionvoidsetReference(String reference) Sets the reference of this charge conditionvoidsetRelationshipType(int type) Sets the relationship type of the charge conditionvoidsetSubCode(String code) Sets the code for this charge conditionvoidsetTaxParameterSet(TaxParameterSetModel taxParameterSet) voidSets the tier table instance set model of the charge conditionvoidSets the transaction template model of the charge conditionvoidSets the translation instance set model of the charge conditionvoidsetUsePreviousDiscountedAmount(boolean usePreviousDiscountedAmount) Sets the base amount on which the discount will be applied
-
Field Details
-
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:
-
NONE_ADJUSTMENT
public static final int NONE_ADJUSTMENTConstant value for a none adjustment.- See Also:
-
MERGING_ADJUSTMENT
public static final int MERGING_ADJUSTMENTConstant value for a merging adjustment.- See Also:
-
SPLITTING_ADJUSTMENT
public static final int SPLITTING_ADJUSTMENTConstant value for a splitting adjustment.- See Also:
-
-
Constructor Details
-
ChargeConditionModel
public ChargeConditionModel()Constructs an empty charge condition model
-
-
Method Details
-
getSubCode
Returns the subcode of this charge condition- Returns:
- This charge condition subcode
- See Also:
-
setSubCode
Sets the code for this charge condition- Parameters:
code- The subscription code- See Also:
-
getReference
Returns the reference of this charge condition- Returns:
- This charge condition reference
- See Also:
-
setReference
Sets the reference of this charge condition- Parameters:
reference- The reference of this charge condition- See Also:
-
getDescription
Returns the description of this charge condition- Returns:
- This charge condition description
- See Also:
-
setDescription
Sets the description of this charge condition- Parameters:
description- The description of this charge condition- See Also:
-
getCurrencyCode
Returns the currency code of this charge condition- Returns:
- The currency code of this charge condition, or
nullif it does not define a currency code - See Also:
-
setCurrencyCode
Sets the currency code of this charge condition- Parameters:
currencyCode- The currency code of this charge condition, ornullif it does not define a currency code- See Also:
-
isMultiCurrencies
public boolean isMultiCurrencies()Returns whether the charge condition is multi-currencies- Returns:
trueif the charge condition is multi-currencies,falseotherwise
-
setMultiCurrencies
public void setMultiCurrencies(boolean multiCurrencies) Sets whether this charge condition is multi-currencies- Parameters:
multiCurrencies-trueif the charge condition is multi-currencies,falseotherwise
-
getEffectiveDate
Returns the effective date of this charge condition- Returns:
- This charge condition effective date
- See Also:
-
setEffectiveDate
Sets the effective date of this charge condition- Parameters:
effectiveDate- The effective date of this charge condition- See Also:
-
getExpirationDate
Returns the expiration date of this charge condition- Returns:
- This charge condition expiration date
- See Also:
-
setExpirationDate
Sets the expiration date of this charge condition- Parameters:
expirationDate- The expiration date of this charge condition- See Also:
-
getLastActivationDate
Returns the last activation date of this charge condition- Returns:
- This charge condition last activation date
- See Also:
-
setLastActivationDate
Sets the last activation date of this charge condition- Parameters:
lastActivationDate- The last activation date of this charge condition- See Also:
-
getCounterDescriptions
Returns the list ofcounterDescriptions- Returns:
- The list of the associated counterDescriptions
-
getCounters
Returns the list ofCounterModel- Returns:
- The list of the associated counters
-
isManualActivable
public boolean isManualActivable()Returnstrueif the charge activation is manually created for this charge condition, elsefalse; This is an informative attribute. This constraint is not verified by the server at the subscription creation.- Returns:
trueif the charge activation is manually created for this charge condition.- See Also:
-
setManualActivable
public void setManualActivable(boolean manualActivable) Sets the activation mode for this charge condition- Parameters:
manualActivable- the activation mode of this charge condition- See Also:
-
getDependentRole
Returns the role of this charge condition if it is a dependent (Note: this attribute must be valued if it is a dependent)- Returns:
- This charge condition dependent role
- See Also:
-
setDependentRole
Sets the role for this charge condition if it is a dependent (Note: this attribute must be valued if it is a dependent)- Parameters:
dependentRole- The role for this charge condition if it is a dependent- See Also:
-
isUsePreviousDiscountedAmount
public boolean isUsePreviousDiscountedAmount()Gets the base amount to charge the dependent discount- Returns:
- true if the discount is applied on the previous discounted amount,
falseif it is applied on the master amount.
-
setUsePreviousDiscountedAmount
public void setUsePreviousDiscountedAmount(boolean usePreviousDiscountedAmount) Sets the base amount on which the discount will be applied- Parameters:
usePreviousDiscountedAmount- The base amount
-
isOfferLevelDependent
public boolean isOfferLevelDependent()Gets the level of the dependent charge- Returns:
- The level of the dependent charge
-
setOfferLevelDependent
public void setOfferLevelDependent(boolean offerLevel) Sets the level of the dependent charge- Parameters:
offerLevel- The level of the dependent charge
-
getParentRef
Returns the parent reference of this charge condition- Returns:
- The parent reference of this charge condition
- See Also:
-
setParentRef
Sets the parent reference of this charge condition- Parameters:
ref- The parent reference of this charge condition
-
getParentCode
Returns the parent code of this charge condition- Returns:
- The parent code of this charge condition
-
setParentCode
Sets the parent code of this charge condition- Parameters:
c- The parent code of this charge condition
-
getOffer
Returns the offer of this charge condition- Returns:
- The offer model of this charge condition
-
setOffer
Sets the offer of this charge condition- Parameters:
offer- The offer of this charge condition
-
getOfferCondition
Returns the offer condition of this charge condition- Returns:
- The offer condition of this charge condition
-
setOfferCondition
Sets the offer condition of this charge condition- Parameters:
offerCondition- The offer condition of this charge condition
-
getParameterSet
Returns the parameter set model of the charge condition- Returns:
- The parameter set model of the charge condition
-
setParameterSet
Sets the parameter set model of the charge condition- Parameters:
p- The parameter set model of the charge condition
-
getTranslationInstanceSet
Returns the translation instance set model of the charge condition- Returns:
- The translation instance set model of the charge condition
-
setTranslationInstanceSet
Sets the translation instance set model of the charge condition- Parameters:
t- The translation instance set model of the charge condition
-
getTierTableInstanceSet
Returns the tier table instance set model of the charge condition- Returns:
- The tier table instance set model of the charge condition
-
setTierTableInstanceSet
Sets the tier table instance set model of the charge condition- Parameters:
t- The tier table instance set model of the charge condition
-
getParameterSetChronology
Returns the parameter set chronology of this charge condition- Returns:
- All the charge condition parameter sets
-
getTranslationInstanceSetChronology
Returns the translation instance set chronology of this charge condition- Returns:
- All the charge condition translation instance sets
-
getTierTableInstanceSetChronology
Returns the tier table instance set chronology of this charge condition- Returns:
- All the charge condition tier table instance sets
-
getTransactionTemplate
Returns the transaction template of this charge condition- Returns:
- The transaction template of this charge condition
-
setTransactionTemplate
Sets the transaction template model of the charge condition- Parameters:
tt- The transaction template model of the charge condition
-
getChargedItemMapping
Returns the charged item mapping of this charge condition- Returns:
- The charged item mapping of this charged condition
-
setChargedItemMapping
Sets the charged item mapping of the charge condition- Parameters:
citmm- The charged item mapping of the charge condition
-
getRelationshipType
public int getRelationshipType()Gets the relationship type of the charge condition.- Returns:
- The value of relationship type
- See Also:
-
setRelationshipType
public void setRelationshipType(int type) Sets the relationship type of the charge condition- Parameters:
type- The value to assign to relationship type- See Also:
-
getOperationType
public int getOperationType()Gets the operation type of the charge condition- Returns:
- Thhe value of the operation type
- See Also:
-
setOperationType
public void setOperationType(int type) Sets the operation type of the charge condition- Parameters:
type- The value to assign to the operation type- See Also:
-
getAdjustmentMode
public int getAdjustmentMode()Gets the adjustment mode of the charge condition- Returns:
- value of adjustment mode.
- See Also:
-
setAdjustmentMode
public void setAdjustmentMode(int mode) Sets the adjustment mode of the charge condition- Parameters:
mode- The value to assign to adjustment mode- See Also:
-
getOfferContextCounters
Gets the list of counters that are shared by the offer in offer condition- Returns:
- The list of offer
counters
-
getOfferContextParameters
Gets the list of parameters that are shared by the offer in offer condition It firstly looks in the edition context and if null, looks in the context chronology at the specified date.- Parameters:
date- The date to look in the chronology- Returns:
- the list of offer
parameters
-
getOfferContextTranslationInstances
Gets the list of translation instances that are shared by the offer in offer condition; It firstly looks in the edition context and if null, looks in the context chronology at the specified date.- Parameters:
date- The date to look in the chronology- Returns:
- The list of offer
instances
-
getOfferContextTierTableInstances
Gets the list of tier table instances that are shared by the offer in offer condition; It firstly looks in the edition context and if null, looks in the context chronology at the specified date.- Parameters:
date- The date to look in the chronology- Returns:
- The list of offer
instances
-
getTaxParameterSets
-
getTaxParameterSet
-
clearTaxParameterSet
public void clearTaxParameterSet() -
setTaxParameterSet
-
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:
name- 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
-