com.ibm.commerce.subscription.commands

Interface SubscriptionCancelOrderCmd

  • All Superinterfaces:
    com.ibm.websphere.command.CacheableCommand, com.ibm.commerce.command.CacheableECCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, ECCommand, java.io.Serializable, com.ibm.websphere.command.TargetableCommand, TaskCommand
    All Known Implementing Classes:
    SubscriptionCancelOrderCmdImpl


    public interface SubscriptionCancelOrderCmd
    extends TaskCommand
    This class implements the methods to cancel the parent order of a recurring order and the parent order item in case of subscription. In case of subscriptions, it additionally handles refunds as subscriptions provide upfront payment. This class takes into account the amount paid and the number of shipments received by the shopper before the cancellation, to calculate the refund amount. Before cancelling the parent order or the parent order item, it checks to see if any child orders were created for the recurring order or subscription. It sends a cancel request to the order only if no child orders have been created.
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        The copy right field.
        See Also:
        Constant Field Values
      • defaultCommandClassName

        static final java.lang.String defaultCommandClassName
        The default implementation for the interface.
        See Also:
        Constant Field Values
    • Method Detail

      • setSubscriptionIdentifier

        void setSubscriptionIdentifier(java.lang.String subscriptionIdentifier)
        Sets the ID of the subscription whose parent order or parent order item is to be canceled.
        Parameters:
        subscriptionIdentifier - The subscription ID.
      • processSubscriptionParentOrderItemCancel

        void processSubscriptionParentOrderItemCancel(java.lang.String orderId,
                                                      java.lang.String orderItemId,
                                                      java.lang.String subscriptionId,
                                                      Subscription phySubscription)
                                               throws OrderException
        This method processes the cancellation of the parent order item of a subscription
        Parameters:
        orderId - The ID of the order to be canceled
        orderItemId - The ID of the order item to be canceled
        subscriptionId - The ID of the subscription being canceled
        phySubscription - The subscription physical data object
        Throws:
        OrderException
      • processRecurringOrderParentOrderCancel

        void processRecurringOrderParentOrderCancel(java.lang.String orderId,
                                                    java.lang.String subscriptionId,
                                                    Subscription phySubscription)
                                             throws OrderException
        This method processes the cancellation of the parent order of a recurring order
        Parameters:
        orderId - The ID of the order to be canceled
        subscriptionId - The ID of the subscription being canceled
        phySubscription - The subscription physical data object
        Throws:
        OrderException