public class ChargeConditionModel extends Object implements XMLMarshallable
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.
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>
| Modifier and Type | Field and Description |
|---|---|
static int |
CLIENT_RELATIONSHIP
Constant value for a client type business relationship.
|
static int |
CREDIT_OPERATION
Constant value for a credit operation.
|
static int |
DEBIT_OPERATION
Constant value for a debit operation.
|
static int |
MERGING_ADJUSTMENT
Constant value for a merging adjustment.
|
static int |
NONE_ADJUSTMENT
Constant value for a none adjustment.
|
static int |
PARTNER_RELATIONSHIP
Constant value for a partner type business relationship.
|
static int |
SPLITTING_ADJUSTMENT
Constant value for a splitting adjustment.
|
| Constructor and Description |
|---|
ChargeConditionModel()
Constructs an empty charge condition model
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(String cData)
Adds character data to the content element.
|
void |
addChild(String name,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
void |
clearTaxParameterSet() |
int |
getAdjustmentMode()
Gets the adjustment mode of the charge condition
|
ChargedItemMappingModel |
getChargedItemMapping()
Returns the charged item mapping of this charge condition
|
Vector<CounterDescriptionModel> |
getCounterDescriptions()
Returns the list of
counterDescriptions |
Vector<CounterModel> |
getCounters()
Returns the list of
CounterModel |
String |
getCurrencyCode()
Returns the currency code of this charge condition
|
String |
getDependentRole()
Returns the role of this charge condition if it is a dependent
(Note: this attribute must be valued if it is a dependent)
|
String |
getDescription()
Returns the description of this charge condition
|
Date |
getEffectiveDate()
Returns the effective date of this charge condition
|
Date |
getExpirationDate()
Returns the expiration date of this charge condition
|
Date |
getLastActivationDate()
Returns the last activation date of this charge condition
|
OfferModel |
getOffer()
Returns the offer of this charge condition
|
OfferConditionModel |
getOfferCondition()
Returns the offer condition of this charge condition
|
Vector<CounterDescriptionModel> |
getOfferContextCounters()
Gets the list of counters that are shared by the offer in offer condition
|
Vector<ParameterModel> |
getOfferContextParameters(Date date)
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.
|
Vector<TierTableInstanceModel> |
getOfferContextTierTableInstances(Date 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.
|
Vector<TranslationInstanceModel> |
getOfferContextTranslationInstances(Date 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.
|
int |
getOperationType()
Gets the operation type of the charge condition
|
ParameterSetModel |
getParameterSet()
Returns the parameter set model of the charge condition
|
ChronologyModel |
getParameterSetChronology()
Returns the parameter set chronology of this charge condition
|
String |
getParentCode()
Returns the parent code of this charge condition
|
String |
getParentRef()
Returns the parent reference of this charge condition
|
String |
getReference()
Returns the reference of this charge condition
|
int |
getRelationshipType()
Gets the relationship type of the charge condition.
|
String |
getSubCode()
Returns the subcode of this charge condition
|
TaxParameterSetModel |
getTaxParameterSet(TaxParameterSet.TaxModule module) |
Map<TaxParameterSet.TaxModule,TaxParameterSetModel> |
getTaxParameterSets() |
TierTableInstanceSetModel |
getTierTableInstanceSet()
Returns the tier table instance set model of the charge condition
|
ChronologyModel |
getTierTableInstanceSetChronology()
Returns the tier table instance set chronology of this charge condition
|
TransactionTemplateModel |
getTransactionTemplate()
Returns the transaction template of this charge condition
|
TranslationInstanceSetModel |
getTranslationInstanceSet()
Returns the translation instance set model of the charge condition
|
ChronologyModel |
getTranslationInstanceSetChronology()
Returns the translation instance set chronology of this charge condition
|
boolean |
isManualActivable()
Returns
true if the charge activation is manually created for this charge condition,
else false; This is an informative attribute. |
boolean |
isMultiCurrencies()
Returns whether the charge condition is multi-currencies
|
boolean |
isOfferLevelDependent()
Gets the level of the dependent charge
|
boolean |
isUsePreviousDiscountedAmount()
Gets the base amount to charge the dependent discount
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
setAdjustmentMode(int mode)
Sets the adjustment mode of the charge condition
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setChargedItemMapping(ChargedItemMappingModel citmm)
Sets the charged item mapping of the charge condition
|
void |
setCurrencyCode(String currencyCode)
Sets the currency code of this charge condition
|
void |
setDependentRole(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)
|
void |
setDescription(String description)
Sets the description of this charge condition
|
void |
setEffectiveDate(Date effectiveDate)
Sets the effective date of this charge condition
|
void |
setExpirationDate(Date expirationDate)
Sets the expiration date of this charge condition
|
void |
setLastActivationDate(Date lastActivationDate)
Sets the last activation date of this charge condition
|
void |
setManualActivable(boolean manualActivable)
Sets the activation mode for this charge condition
|
void |
setMultiCurrencies(boolean multiCurrencies)
Sets whether this charge condition is multi-currencies
|
void |
setOffer(OfferModel offer)
Sets the offer of this charge condition
|
void |
setOfferCondition(OfferConditionModel offerCondition)
Sets the offer condition of this charge condition
|
void |
setOfferLevelDependent(boolean offerLevel)
Sets the level of the dependent charge
|
void |
setOperationType(int type)
Sets the operation type of the charge condition
|
void |
setParameterSet(ParameterSetModel p)
Sets the parameter set model of the charge condition
|
void |
setParentCode(String c)
Sets the parent code of this charge condition
|
void |
setParentRef(String ref)
Sets the parent reference of this charge condition
|
void |
setReference(String reference)
Sets the reference of this charge condition
|
void |
setRelationshipType(int type)
Sets the relationship type of the charge condition
|
void |
setSubCode(String code)
Sets the code for this charge condition
|
void |
setTaxParameterSet(TaxParameterSetModel taxParameterSet) |
void |
setTierTableInstanceSet(TierTableInstanceSetModel t)
Sets the tier table instance set model of the charge condition
|
void |
setTransactionTemplate(TransactionTemplateModel tt)
Sets the transaction template model of the charge condition
|
void |
setTranslationInstanceSet(TranslationInstanceSetModel t)
Sets the translation instance set model of the charge condition
|
void |
setUsePreviousDiscountedAmount(boolean usePreviousDiscountedAmount)
Sets the base amount on which the discount will be applied
|
public static final int CLIENT_RELATIONSHIP
public static final int PARTNER_RELATIONSHIP
public static final int DEBIT_OPERATION
public static final int CREDIT_OPERATION
public static final int NONE_ADJUSTMENT
public static final int MERGING_ADJUSTMENT
public static final int SPLITTING_ADJUSTMENT
public ChargeConditionModel()
public String getSubCode()
setSubCode(String)public void setSubCode(String code)
code - The subscription codegetSubCode()public String getReference()
setReference(String)public void setReference(String reference)
reference - The reference of this charge conditiongetReference()public String getDescription()
setDescription(String)public void setDescription(String description)
description - The description of this charge conditiongetDescription()public String getCurrencyCode()
null if it does not define a currency codesetCurrencyCode(String)public void setCurrencyCode(String currencyCode)
currencyCode - The currency code of this charge condition, or null if it does not define a currency codegetCurrencyCode()public boolean isMultiCurrencies()
true if the charge condition is multi-currencies, false otherwisepublic void setMultiCurrencies(boolean multiCurrencies)
multiCurrencies - true if the charge condition is multi-currencies, false otherwisepublic Date getEffectiveDate()
setEffectiveDate(Date)public void setEffectiveDate(Date effectiveDate)
effectiveDate - The effective date of this charge conditiongetEffectiveDate()public Date getExpirationDate()
setExpirationDate(Date)public void setExpirationDate(Date expirationDate)
expirationDate - The expiration date of this charge conditiongetExpirationDate()public Date getLastActivationDate()
setLastActivationDate(Date)public void setLastActivationDate(Date lastActivationDate)
lastActivationDate - The last activation date of this charge conditiongetLastActivationDate()public Vector<CounterDescriptionModel> getCounterDescriptions()
counterDescriptionspublic Vector<CounterModel> getCounters()
CounterModelpublic boolean isManualActivable()
true if the charge activation is manually created for this charge condition,
else false; This is an informative attribute.
This constraint is not verified by the server at the subscription creation.true if the charge activation is manually created for this charge condition.setManualActivable(boolean)public void setManualActivable(boolean manualActivable)
manualActivable - the activation mode of this charge conditionisManualActivable()public String getDependentRole()
setDependentRole(String)public void setDependentRole(String dependentRole)
dependentRole - The role for this charge condition if it is a dependentgetDependentRole()public boolean isUsePreviousDiscountedAmount()
false if it
is applied on the master amount.public void setUsePreviousDiscountedAmount(boolean usePreviousDiscountedAmount)
usePreviousDiscountedAmount - The base amountpublic boolean isOfferLevelDependent()
public void setOfferLevelDependent(boolean offerLevel)
offerLevel - The level of the dependent chargepublic String getParentRef()
setParentRef(String)public void setParentRef(String ref)
ref - The parent reference of this charge conditionpublic String getParentCode()
public void setParentCode(String c)
c - The parent code of this charge conditionpublic OfferModel getOffer()
public void setOffer(OfferModel offer)
offer - The offer of this charge conditionpublic OfferConditionModel getOfferCondition()
public void setOfferCondition(OfferConditionModel offerCondition)
offerCondition - The offer condition of this charge conditionpublic ParameterSetModel getParameterSet()
public void setParameterSet(ParameterSetModel p)
p - The parameter set model of the charge conditionpublic TranslationInstanceSetModel getTranslationInstanceSet()
public void setTranslationInstanceSet(TranslationInstanceSetModel t)
t - The translation instance set model of the charge conditionpublic TierTableInstanceSetModel getTierTableInstanceSet()
public void setTierTableInstanceSet(TierTableInstanceSetModel t)
t - The tier table instance set model of the charge conditionpublic ChronologyModel getParameterSetChronology()
public ChronologyModel getTranslationInstanceSetChronology()
public ChronologyModel getTierTableInstanceSetChronology()
public TransactionTemplateModel getTransactionTemplate()
public void setTransactionTemplate(TransactionTemplateModel tt)
tt - The transaction template model of the charge conditionpublic ChargedItemMappingModel getChargedItemMapping()
public void setChargedItemMapping(ChargedItemMappingModel citmm)
citmm - The charged item mapping of the charge conditionpublic int getRelationshipType()
CLIENT_RELATIONSHIP,
PARTNER_RELATIONSHIPpublic void setRelationshipType(int type)
type - The value to assign to relationship typeCLIENT_RELATIONSHIP,
PARTNER_RELATIONSHIPpublic int getOperationType()
DEBIT_OPERATION,
CREDIT_OPERATIONpublic void setOperationType(int type)
type - The value to assign to the operation typeDEBIT_OPERATION,
CREDIT_OPERATIONpublic int getAdjustmentMode()
NONE_ADJUSTMENT,
MERGING_ADJUSTMENT,
SPLITTING_ADJUSTMENTpublic void setAdjustmentMode(int mode)
mode - The value to assign to adjustment modeNONE_ADJUSTMENT,
MERGING_ADJUSTMENT,
SPLITTING_ADJUSTMENTpublic Vector<CounterDescriptionModel> getOfferContextCounters()
counterspublic Vector<ParameterModel> getOfferContextParameters(Date date)
date - The date to look in the chronologyparameterspublic Vector<TranslationInstanceModel> getOfferContextTranslationInstances(Date date)
date - The date to look in the chronologyinstancespublic Vector<TierTableInstanceModel> getOfferContextTierTableInstances(Date date)
date - The date to look in the chronologyinstancespublic Map<TaxParameterSet.TaxModule,TaxParameterSetModel> getTaxParameterSets()
public TaxParameterSetModel getTaxParameterSet(TaxParameterSet.TaxModule module)
public void clearTaxParameterSet()
public void setTaxParameterSet(TaxParameterSetModel taxParameterSet)
public void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addChild(String name, XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallablename - The name of tag for the childchild - The child to be addedpublic void addCharacterData(String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object into