Class ModifySubscriptionOp

java.lang.Object
com.highdeal.pnr.hci.ModifySubscriptionOp
All Implemented Interfaces:
MessageOperation, XMLMarshallable

public class ModifySubscriptionOp extends Object implements MessageOperation
This operation allows to modify an existing subscription by providing a complete changed 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
If at least the reference or the code, matches between old and new version of the object, the old version is modified. If none of them matches, the old version of the object is removed and is replaced by its new version.

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).

Subscription modifications that are not safe are:
  • 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
Charge activation modifications that are not safe are:
  • 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
The modifications of the subscription structure that are not safe are:
  • 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:

EditionFinal Target Instances
raterupdaterguiderbulkLoadertaxerdispatcher
chargeNoYesNoNoNoNo

Audit Domain

This operation is audited by the system as part of the audit domain: CUSTOMER. Consult the IT administrator.

  • Field Details

  • Constructor Details

    • ModifySubscriptionOp

      public ModifySubscriptionOp()
      Builds an empty operation
  • Method Details

    • getModificationDate

      public Date getModificationDate()
      Gets the modification date
      Returns:
      The date of the modification
    • setModificationDate

      public void setModificationDate(Date modificationDate)
      Sets the modification date
      Parameters:
      modificationDate - The modification date
    • getName

      public String getName()
      Returns the XML name of the operation: "modifySubscription"
      Specified by:
      getName in interface MessageOperation
      Returns:
      "modifySubscription"
    • getSubscription

      public SubscriptionModel getSubscription()
      Gets the new subscription definition
      Returns:
      The new subscription definition
    • setSubscription

      public void setSubscription(SubscriptionModel s)
      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

      public void setAttributes(XMLAttributes atts)
      Description copied from interface: XMLMarshallable
      Sets the attributes of the XML representation of the element being processed.
      Specified by:
      setAttributes in interface XMLMarshallable
      Parameters:
      atts - The XML attributes of the current element
    • addCharacterData

      public void addCharacterData(String cData)
      Description copied from interface: XMLMarshallable
      Adds character data to the content element.
      Specified by:
      addCharacterData in interface XMLMarshallable
      Parameters:
      cData - The character data to be added
    • addChild

      public void addChild(String tagName, XMLMarshallable child)
      Description copied from interface: XMLMarshallable
      Adds a child to the object, the child representing the marshallable object which must be added to the element.
      Specified by:
      addChild in interface XMLMarshallable
      Parameters:
      tagName - The name of tag for the child
      child - The child to be added
    • marshal

      public void marshal(XMLOutputter output)
      Description copied from interface: XMLMarshallable
      Gives an XML representation of this object, including its children.
      Specified by:
      marshal in interface XMLMarshallable
      Parameters:
      output - The XML output to marshal the object into