com.ibm.commerce.tools.optools.order.commands

Interface CSROrderPrepareCmd

  • All Superinterfaces:
    AccCommand, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, ControllerCommand, ECCommand, Protectable, java.io.Serializable, com.ibm.websphere.command.TargetableCommand, ToolsControllerCommand
    All Known Implementing Classes:
    CSROrderPrepareCmdImpl


    public interface CSROrderPrepareCmd
    extends ToolsControllerCommand
    Calls OrderPrepareCmd to prepare orders on behalf of customer. This command can prepare at most two orders.

    Behavior

    • Checks to see if the orders have any items. Only order with items will be prepared.
    • Calls OrderCalculateCmd with forUser parameter set to customerId to calculate any rule-based discount.
    • Calls OrderPrepareCmd with forUser parameter set to customerId to prepare customer's orders
    • It will only prepare the order if the order has order items.

    Parameters

    XML
    An input xml_string that contains the details of the orders which will be prepared.
     Example xml_string:
            <?xml version="1.0" encoding "UTF-8">
                    <order>
                            <customerId>20000 </customerId>
                            <firstOrder>
                                    <id>10001</id>
                            </firstOrder>
                            <secondOrder>
                                    <id>10002</id>
                            </secondOrder>
                    </order>
            </xml>
     
    URL
    The URL to be called when the command completes successfully.

    Response Parameter:

    orderId
    Return the order Id of the order item(s) added to.

    Exception Conditions

    Throws all exceptions that are thrown by OrderCalculateCmd and OrderPrepareCmd.

    Error View:

    • CSROrderPrepareErrorView
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
      • defaultCommandClassName

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

      • getCustomerId

        java.lang.String getCustomerId()
        Gets the customer ID. The customer ID is also appended to success redirect URL.
        Returns:
        The customer ID.
      • getFirstOrderId

        java.lang.String getFirstOrderId()
        Gets the first order ID. The first order ID is also appended to success redirect URL.
        Returns:
        The first order ID.
      • getSecondOrderId

        java.lang.String getSecondOrderId()
        Gets the second order ID. The second order ID is also appended to success redirect URL.
        Returns:
        The second order ID.