Class ModifySubscriptionOp
- All Implemented Interfaces:
MessageOperation,XMLMarshallable
subscription master data to the SAP CC system.
The system compares the new subscription against the old one (stored in the database).
During the modification, root subscription, all sub-subscriptions and included charge activations are compared thanks to:
- Their reference, which is an object unique identifier (OID) generated by the system
- Their code
Example
If the same counter is part of both subscriptions, then it will be modified according to its value from new subscription. If a counter is only part of new subscription then it will be created. Finally, if a counter is part of the old subscription but not present in the new one then it will be removed.
When a subscription (or a charge activation) contains some counters, inconsistencies may occur since counters are also modified through the charging process ("lost update" problem).
A safe way to modify a subscription without modifying its counters (partially or completely) is to use
the ignoreCounters. This parameter has 3 different values:
ANY_COUNTERS(default): Any counters from the new subscription are ignored. This is the default and current behavior described above.UNSPECIFIED_COUNTERS: Only unspecified counters in the new subscription are ignored. This allows modifying some without touching the others.ALL_COUNTERS: All counters from the new subscription are ignored. Counter modifications are not possible in that case.
Note
Counter removal is only possible with the option ignoreCounters set to ANY_COUNTERS.
Limitations
This operation is not compliant with the rerating services.
This operation may conflict with the prerating services (deprecated since version 1.0). This may lead to inconsistency if the modification
is done in the past since the post-rating could have a result that differs from the one of the related prerating.
To prevent from that, the user is warned when he/she tries to modify a subscription containing unresolved preratings.
But if you consider the modification as safe regarding prerating, you can force it (see ignorePrerating).
- Removal of a shareable counter
- Modification of a shareable parameter in the past (means before the date of the last prerating)
- Modification of a shareable translation table instance in the past
- Modification of a shareable tier table instance in the past
- Set in the past of one of the following dates: Cancellation date, suspension date, and expiration date
- Removal of a counter
- Modification of a parameter in the past (means before the date of the last prerating)
- Modification of a translation table instance in the past
- Modification of a tier table instance in the past
- Set in the past of one of the following dates: Cancellation date and expiration date
- Modification of the debtor or the creditor
- Removal of a dependent charge activation involved in the rating process (through rating dependencies)
- Removal of a master charge activation involved in the rating process (through sharing dependencies)
- Addition of a dependent charge activation involved in the rating process with an effective date set in the past
- Addition of a master charge activation involved in the rating process with an effective date set in the past
Note
When you using the create or modify operations, only the directly held subscription context is taken into account.
The SAP CC system ignores the data set in the context chronology.
Operation Result
ModifySubscriptionResult Operation Failure Exceptions
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="modifySubscription">
<xs:complexType>
<xs:sequence>
<xs:element ref="subscription" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="modificationDate" type="xs:dateTime"/>
<xs:attribute name="ignorePreRating" type="xs:boolean" default="false"/>
<xs:attribute name="ignorePendingSession" type="xs:boolean" default="false"/>
<xs:attribute name="ignoreCounters" type="IgnoreCountersType" default="any"/>
</xs:complexType>
</xs:element>
<xs:simpleType name="IgnoreCountersType">
<xs:restriction base="xs:string">
<xs:enumeration value="any"/>
<xs:enumeration value="unspecified"/>
<xs:enumeration value="all"/>
</xs:restriction>
</xs:simpleType>
Operation Availability
You can send this operation request in HCI messages to the following final target types of instances in the connected SAP CC system:
| Edition | Final Target Instances | |||||
| rater | updater | guider | bulkLoader | taxer | dispatcher | |
| charge | No | Yes | No | No | No | No |
Audit Domain
This operation is audited by the system as part of the audit domain: CUSTOMER. Consult the IT administrator.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final Stringstatic final int -
Constructor Summary
Constructors -
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.intGets the ignoreCounters attributeGets the modification dategetName()Returns the XML name of the operation: "modifySubscription"Gets the new subscription definitionbooleanGets the ignorePendingSession attributebooleanGets the ignorePreRating attributevoidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidsetIgnoreCounters(int ignoreCounters) Sets the ignoreCounters attributevoidsetIgnorePendingSession(boolean ignorePendingSession) Sets the ignorePendingSession attributevoidsetIgnorePreRating(boolean ignorePreRating) Sets the ignorePreRating attributevoidsetModificationDate(Date modificationDate) Sets the modification datevoidSets the new subscription definition
-
Field Details
-
OPERATION_NAME
- See Also:
-
ANY_COUNTERS
public static final int ANY_COUNTERS- See Also:
-
UNSPECIFIED_COUNTERS
public static final int UNSPECIFIED_COUNTERS- See Also:
-
ALL_COUNTERS
public static final int ALL_COUNTERS- See Also:
-
-
Constructor Details
-
ModifySubscriptionOp
public ModifySubscriptionOp()Builds an empty operation
-
-
Method Details
-
getModificationDate
Gets the modification date- Returns:
- The date of the modification
-
setModificationDate
Sets the modification date- Parameters:
modificationDate- The modification date
-
getName
Returns the XML name of the operation: "modifySubscription"- Specified by:
getNamein interfaceMessageOperation- Returns:
- "modifySubscription"
-
getSubscription
Gets the new subscription definition- Returns:
- The new subscription definition
-
setSubscription
Sets the new subscription definition- Parameters:
s- The new subscription definition
-
isIgnorePreRating
public boolean isIgnorePreRating()Gets the ignorePreRating attribute- Returns:
- The ignorePreRating value
-
setIgnorePreRating
public void setIgnorePreRating(boolean ignorePreRating) Sets the ignorePreRating attribute- Parameters:
ignorePreRating-
-
isIgnorePendingSession
public boolean isIgnorePendingSession()Gets the ignorePendingSession attribute- Returns:
- The ignorePendingSession value
-
setIgnorePendingSession
public void setIgnorePendingSession(boolean ignorePendingSession) Sets the ignorePendingSession attribute- Parameters:
ignorePendingSession-
-
getIgnoreCounters
public int getIgnoreCounters()Gets the ignoreCounters attribute- Returns:
- The ignoreCounters value
-
setIgnoreCounters
public void setIgnoreCounters(int ignoreCounters) Sets the ignoreCounters attribute- Parameters:
ignoreCounters-
-
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
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Specified by:
addCharacterDatain interfaceXMLMarshallable- Parameters:
cData- The character data to be added
-
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
-