com.ibm.commerce.rest.order.handler

Class CartHandler

  • All Implemented Interfaces:
    DocumentedResourceHandler, IResourceHandler


    @Path(value="store/{storeId}/cart")
     @Encoded
    public class CartHandler
    extends AbstractConfigBasedClassicHandler
    This class provides RESTful services to add, update, delete, and get items in the shopping cart and checkout. It provides services to get usable shipping and payment information by calling the Order noun to perform the services.
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
      • RESOURCE_NAME

        public static final java.lang.String RESOURCE_NAME
        Resource name for cart.
        See Also:
        Constant Field Values
      • CART_MAPPING_KEY

        public static final java.lang.String CART_MAPPING_KEY
        The Constant CART_MAPPING_KEY.
        See Also:
        Constant Field Values
      • CART_CHANGE_MAPPING_KEY

        public static final java.lang.String CART_CHANGE_MAPPING_KEY
        The Constant CART_MAPPING_KEY.
        See Also:
        Constant Field Values
      • USABLE_SHIPPING_INFO_MAPPING_KEY

        public static final java.lang.String USABLE_SHIPPING_INFO_MAPPING_KEY
        Mapping key for usable shipping info.
        See Also:
        Constant Field Values
      • USABLE_PAYMENT_INFO_MAPPING_KEY

        public static final java.lang.String USABLE_PAYMENT_INFO_MAPPING_KEY
        Mapping key for usable payment info.
        See Also:
        Constant Field Values
      • FORMAT_GROUP_NAME

        public static final java.lang.String FORMAT_GROUP_NAME
        The constant FORMAT_GROUP_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • CartHandler

        public CartHandler()
    • Method Detail

      • getResourceName

        public java.lang.String getResourceName()
        Description copied from interface: IResourceHandler
        This method returns the name of the resource used primarily to determine the representation of the resource. This class can be overridden to change the name of the resource and therefore the representation, while keeping all the methods in this class.
        Returns:
        the resource name
      • getHelper

        public OrderHelper getHelper()
        This method returns the Cart helper used to cart contents.
        Returns:
        the helper
      • getCart

        @GET
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="@self")
        public javax.ws.rs.core.Response getCart(@PathParam(value="storeId")
                                                                                                                                                                                    java.lang.String storeId,
                                                                                                                                                                                    @QueryParam(value="responseFormat")
                                                                                                                                                                                    java.lang.String responseFormat,
                                                                                                                                                                                    @QueryParam(value="pageNumber")
                                                                                                                                                                                    int pageNumber,
                                                                                                                                                                                    @QueryParam(value="pageSize")
                                                                                                                                                                                    int pageSize)
        This method gets order details in the shopping cart.
        Parameters:
        storeId - the store Id of the request.
        responseFormat - the response format (xml or json).
        pageNumber - the page number
        pageSize - the page size
        Returns:
        a collection of Order nouns in the specified format.
      • scheduleOrder

        @POST
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="{orderId}/schedule_order")
        public javax.ws.rs.core.Response scheduleOrder(@PathParam(value="storeId")
                                                                                                                                                                                                              java.lang.String storeId,
                                                                                                                                                                                                              @PathParam(value="orderId")
                                                                                                                                                                                                              java.lang.String orderId,
                                                                                                                                                                                                              @QueryParam(value="responseFormat")
                                                                                                                                                                                                              java.lang.String responseFormat)
        Creates a scheduled order which is related to a scheduled job.
        Parameters:
        storeId - The store identifier
        responseFormat - The response format
        Returns:
        The response object containing the order identifier.
      • setPendingOrder

        @POST
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="{orderId}/set_pending_order")
        public javax.ws.rs.core.Response setPendingOrder(@PathParam(value="storeId")
                                                                                                                                                                                                                   java.lang.String storeId,
                                                                                                                                                                                                                   @PathParam(value="orderId")
                                                                                                                                                                                                                   java.lang.String orderId,
                                                                                                                                                                                                                   @QueryParam(value="responseFormat")
                                                                                                                                                                                                                   java.lang.String responseFormat)
                                                                                                                                                                                                            throws java.lang.Exception
        This method sets the order specified to be current working order
        Parameters:
        storeId - The store ID
        orderId - The order Id
        responseFormat - The resonseFormat
        Returns:
        The response
        Throws:
        java.lang.Exception
      • cancelOrder

        @DELETE
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="{orderId}/cancel_order")
        public javax.ws.rs.core.Response cancelOrder(@PathParam(value="storeId")
                                                                                                                                                                                                            java.lang.String storeId,
                                                                                                                                                                                                            @PathParam(value="orderId")
                                                                                                                                                                                                            java.lang.String orderId,
                                                                                                                                                                                                            @QueryParam(value="responseFormat")
                                                                                                                                                                                                            java.lang.String responseFormat,
                                                                                                                                                                                                            @QueryParam(value="forcedCancel")
                                                                                                                                                                                                            java.lang.String forcedCancel)
                                                                                                                                                                                                     throws java.lang.Exception
        This method cancels the order specified
        Parameters:
        storeId - The store ID
        orderId - The order Id
        responseFormat - The response format
        forcedCancel - This parameter is used by payment rule to perform a refund. If there are some deposit transactions for the order, the order cannot be canceled except when the parameter is made forcedCancel=true. The default value is false.
        Returns:
        The response
        Throws:
        java.lang.Exception
      • csrCancelOrder

        @DELETE
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="{orderId}/csrcancel_order")
        public javax.ws.rs.core.Response csrCancelOrder(@PathParam(value="storeId")
                                                                                                                                                                                                                  java.lang.String storeId,
                                                                                                                                                                                                                  @PathParam(value="orderId")
                                                                                                                                                                                                                  java.lang.String orderId,
                                                                                                                                                                                                                  @QueryParam(value="responseFormat")
                                                                                                                                                                                                                  java.lang.String responseFormat,
                                                                                                                                                                                                                  @QueryParam(value="forcedCancel")
                                                                                                                                                                                                                  java.lang.String forcedCancel)
                                                                                                                                                                                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • csrCancelOrderOnBehalf

        @DELETE
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="{orderId}/csrcancel_order_onbehalf")
        public javax.ws.rs.core.Response csrCancelOrderOnBehalf(@PathParam(value="storeId")
                                                                                                                                                                                                                                   java.lang.String storeId,
                                                                                                                                                                                                                                   @PathParam(value="orderId")
                                                                                                                                                                                                                                   java.lang.String orderId,
                                                                                                                                                                                                                                   @QueryParam(value="responseFormat")
                                                                                                                                                                                                                                   java.lang.String responseFormat,
                                                                                                                                                                                                                                   @QueryParam(value="forcedCancel")
                                                                                                                                                                                                                                   java.lang.String forcedCancel)
                                                                                                                                                                                                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createOrder

        @POST
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="create_order")
        public javax.ws.rs.core.Response createOrder(@PathParam(value="storeId")
                                                                                                                                                                                                java.lang.String storeId,
                                                                                                                                                                                                @QueryParam(value="responseFormat")
                                                                                                                                                                                                java.lang.String responseFormat,
                                                                                                                                                                                                @QueryParam(value="description")
                                                                                                                                                                                                java.lang.String description)
                                                                                                                                                                                         throws java.lang.Exception
        This method creates a order using a description that is provided
        Parameters:
        storeId - The store ID
        responseFormat - The response format
        description - The description
        Returns:
        The response contains the orderId for the order created
        Throws:
        java.lang.Exception
      • copyOrder

        @POST
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="copy_order")
        public javax.ws.rs.core.Response copyOrder(@PathParam(value="storeId")
                                                                                                                                                                                            java.lang.String storeId,
                                                                                                                                                                                            @QueryParam(value="responseFormat")
                                                                                                                                                                                            java.lang.String responseFormat)
        This method copies a specified order
        Parameters:
        storeId - The store ID
        responseFormat - The response format
        Returns:
        The response
      • deleteOrderItem

        @PUT
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="@self/delete_order_item")
        public javax.ws.rs.core.Response deleteOrderItem(@PathParam(value="storeId")
                                                                                                                                                                                                              java.lang.String storeId,
                                                                                                                                                                                                              @QueryParam(value="responseFormat")
                                                                                                                                                                                                              java.lang.String responseFormat)
        This method deletes the specified order item from the order.
        Parameters:
        storeId - The store identifier.
        responseFormat - The response format.
        Returns:
        The response.
      • calculateOrder

        @POST
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="calculate")
        public javax.ws.rs.core.Response calculateOrder(@PathParam(value="storeId")
                                                                                                                                                                                                java.lang.String storeId,
                                                                                                                                                                                                @QueryParam(value="responseFormat")
                                                                                                                                                                                                java.lang.String responseFormat)
        This method calculates the cost of the order
        Parameters:
        storeId - The store identifier
        responseFormat - The response format
        Returns:
        The response
      • calculateOrder

        @POST
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="{orderId}/calculate")
        public javax.ws.rs.core.Response calculateOrder(@PathParam(value="storeId")
                                                                                                                                                                                                          java.lang.String storeId,
                                                                                                                                                                                                          @PathParam(value="orderId")
                                                                                                                                                                                                          java.lang.String orderId,
                                                                                                                                                                                                          @QueryParam(value="responseFormat")
                                                                                                                                                                                                          java.lang.String responseFormat)
        This method calculates the cost of the order
        Parameters:
        storeId - The store identifier
        orderId - The order identifier or abbreviation
        responseFormat - The response format
        Returns:
        The response
      • getUsableShippingInfo

        @GET
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="@self/usable_shipping_info")
        public javax.ws.rs.core.Response getUsableShippingInfo(@PathParam(value="storeId")
                                                                                                                                                                                                                       java.lang.String storeId,
                                                                                                                                                                                                                       @QueryParam(value="responseFormat")
                                                                                                                                                                                                                       java.lang.String responseFormat,
                                                                                                                                                                                                                       @QueryParam(value="pageNumber")
                                                                                                                                                                                                                       int pageNumber,
                                                                                                                                                                                                                       @QueryParam(value="pageSize")
                                                                                                                                                                                                                       int pageSize)
        Get usable shipping information for the cart. If order id is specified, use the specified order id, otherwise find the order it through shopping cart.
        Parameters:
        storeId - the store id
        responseFormat - the response format
        pageNumber - the page number
        pageSize - the page size
        Returns:
        the usable shipping info
      • getUsableShippingMode

        @GET
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="@self/usable_shipping_mode")
        public javax.ws.rs.core.Response getUsableShippingMode(@PathParam(value="storeId")
                                                                                                                                                                                                                       java.lang.String storeId,
                                                                                                                                                                                                                       @QueryParam(value="responseFormat")
                                                                                                                                                                                                                       java.lang.String responseFormat,
                                                                                                                                                                                                                       @QueryParam(value="pageNumber")
                                                                                                                                                                                                                       int pageNumber,
                                                                                                                                                                                                                       @QueryParam(value="pageSize")
                                                                                                                                                                                                                       int pageSize)
        Get usable shipping mode for the cart by address, it will also return the shipping charge together with each shipping mode. If order id is specified, use the specified order id, otherwise find the order it through shopping cart.
        Parameters:
        storeId - the store id
        responseFormat - the response format
        pageNumber - the page number
        pageSize - the page size
        Returns:
        the usable shipping info
      • getUsableShipChargesByShipMode

        @GET
         @Path(value="{orderId}/usable_ship_charges_by_ship_mode")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response getUsableShipChargesByShipMode(@PathParam(value="storeId")
                                                                                                                                                                                                                                                java.lang.String storeId,
                                                                                                                                                                                                                                                @PathParam(value="orderId")
                                                                                                                                                                                                                                                java.lang.String orderId,
                                                                                                                                                                                                                                                @QueryParam(value="responseFormat")
                                                                                                                                                                                                                                                java.lang.String responseFormat,
                                                                                                                                                                                                                                                @QueryParam(value="profileName")
                                                                                                                                                                                                                                                java.lang.String profileName)
                                                                                                                                                                                                                                         throws com.ibm.commerce.foundation.rest.resourcehandler.RestException
        Gets usable ship charge information for order id.
        Parameters:
        storeId - the store id
        orderId - the order id
        responseFormat - the format of the response
        profileName - the profile name
        Returns:
        the usable ship charge information
        Throws:
        com.ibm.commerce.foundation.rest.resourcehandler.RestException
      • getBuyerPurchaseOrderDataBean

        @GET
         @Path(value="@self/buyer_purchase_order/{buyerPurchaseOrderId}")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response getBuyerPurchaseOrderDataBean(@PathParam(value="storeId")
                                                                                                                                                                                                                                                      java.lang.String storeId,
                                                                                                                                                                                                                                                      @PathParam(value="buyerPurchaseOrderId")
                                                                                                                                                                                                                                                      java.lang.String buyerPurchaseOrderId,
                                                                                                                                                                                                                                                      @QueryParam(value="responseFormat")
                                                                                                                                                                                                                                                      java.lang.String responseFormat,
                                                                                                                                                                                                                                                      @QueryParam(value="profileName")
                                                                                                                                                                                                                                                      java.lang.String profileName)
                                                                                                                                                                                                                                               throws com.ibm.commerce.foundation.rest.resourcehandler.RestException
        Gets buyer purchase order information for order id.
        Parameters:
        storeId - the store id
        buyerPurchaseOrderId - the buyer purchase order id
        responseFormat - the format of the response
        profileName - the profile name
        Returns:
        the buyer purchase order information
        Throws:
        com.ibm.commerce.foundation.rest.resourcehandler.RestException
      • getUsableBillingAddressListTCDataBean

        @GET
         @Path(value="@self/usable_billing_address/{orderId}")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response getUsableBillingAddressListTCDataBean(@PathParam(value="storeId")
                                                                                                                                                                                                                                                   java.lang.String storeId,
                                                                                                                                                                                                                                                   @PathParam(value="orderId")
                                                                                                                                                                                                                                                   java.lang.String orderId,
                                                                                                                                                                                                                                                   @QueryParam(value="responseFormat")
                                                                                                                                                                                                                                                   java.lang.String responseFormat,
                                                                                                                                                                                                                                                   @QueryParam(value="profileName")
                                                                                                                                                                                                                                                   java.lang.String profileName,
                                                                                                                                                                                                                                                   @QueryParam(value="paymentTCId")
                                                                                                                                                                                                                                                   java.lang.String paymentTCId)
                                                                                                                                                                                                                                            throws com.ibm.commerce.foundation.rest.resourcehandler.RestException
        Gets usable billing address information for order id.
        Parameters:
        storeId - The store identifier
        orderId - The purchase order id
        responseFormat - The response format
        profileName - The profile name
        paymentTCId - The payment terms and condition ID
        Returns:
        the billing address order information
        Throws:
        com.ibm.commerce.foundation.rest.resourcehandler.RestException
      • getPAttributeDataBean

        @GET
         @Path(value="@self/pattribute/{initKey_referenceNumber}")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response getPAttributeDataBean(@PathParam(value="storeId")
                                                                                                                                                                                                                                       java.lang.String storeId,
                                                                                                                                                                                                                                       @PathParam(value="initKey_referenceNumber")
                                                                                                                                                                                                                                       java.lang.String initKey_referenceNumber,
                                                                                                                                                                                                                                       @QueryParam(value="responseFormat")
                                                                                                                                                                                                                                       java.lang.String responseFormat,
                                                                                                                                                                                                                                       @QueryParam(value="profileName")
                                                                                                                                                                                                                                       java.lang.String profileName)
                                                                                                                                                                                                                                throws com.ibm.commerce.foundation.rest.resourcehandler.RestException
        Gets payment attribute order information for terms & conditions Id.
        Parameters:
        storeId - the store id
        initKey_referenceNumber - the attribute Id of the payment terms & conditions
        responseFormat - the format of the response
        profileName - the profile name
        Returns:
        the payment attribute order information
        Throws:
        com.ibm.commerce.foundation.rest.resourcehandler.RestException
      • getPaymentPolicyListDataBean

        @GET
         @Path(value="@self/payment_policy_list")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response getPaymentPolicyListDataBean(@PathParam(value="storeId")
                                                                                                                                                                                                                             java.lang.String storeId,
                                                                                                                                                                                                                             @QueryParam(value="responseFormat")
                                                                                                                                                                                                                             java.lang.String responseFormat,
                                                                                                                                                                                                                             @QueryParam(value="profileName")
                                                                                                                                                                                                                             java.lang.String profileName)
                                                                                                                                                                                                                      throws com.ibm.commerce.foundation.rest.resourcehandler.RestException
        Gets payment policy list information for store.
        Parameters:
        storeId - the store id
        responseFormat - the format of the response
        profileName - the profile name
        Returns:
        the payment policy list information
        Throws:
        com.ibm.commerce.foundation.rest.resourcehandler.RestException
      • applyCheckoutProfile

        @PUT
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="@self/applyCheckoutProfile")
        public javax.ws.rs.core.Response applyCheckoutProfile(@PathParam(value="storeId")
                                                                                                                                                                                                                      java.lang.String storeId,
                                                                                                                                                                                                                      @QueryParam(value="responseFormat")
                                                                                                                                                                                                                      java.lang.String responseFormat)
        Apply quick checkout profile to current shopping cart.
        Parameters:
        storeId - the store id
        responseFormat - the response format
        Returns:
        Response
      • getUsablePaymentInfo

        @GET
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="@self/usable_payment_info")
        public javax.ws.rs.core.Response getUsablePaymentInfo(@PathParam(value="storeId")
                                                                                                                                                                                                                     java.lang.String storeId,
                                                                                                                                                                                                                     @QueryParam(value="responseFormat")
                                                                                                                                                                                                                     java.lang.String responseFormat,
                                                                                                                                                                                                                     @QueryParam(value="pageNumber")
                                                                                                                                                                                                                     int pageNumber,
                                                                                                                                                                                                                     @QueryParam(value="pageSize")
                                                                                                                                                                                                                     int pageSize)
        Get usable payment information for the cart. If order id is specified, use the specified order id, otherwise find the order it through shopping cart.
        Parameters:
        storeId - the store id
        responseFormat - the response format
        pageNumber - the page number
        pageSize - the page size
        Returns:
        the usable payment info
      • addOrderItem

        @POST
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Consumes(value={"application/json","application/xml"})
        public javax.ws.rs.core.Response addOrderItem(@PathParam(value="storeId")
                                                                                                                                                                                                                             java.lang.String storeId,
                                                                                                                                                                                                                             @QueryParam(value="responseFormat")
                                                                                                                                                                                                                             java.lang.String responseFormat)
        This method adds one or multiple items to the shopping cart.
        Parameters:
        storeId - the store Id
        responseFormat - the response format (xml, json, or atom)
        Returns:
        the Order noun in the specified format
      • udpateOrderItem

        @PUT
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Consumes(value={"application/json","application/xml"})
         @Path(value="@self")
         @Deprecated
        public javax.ws.rs.core.Response udpateOrderItem(@PathParam(value="storeId")
                                                                                                                                                                                                                                                                  java.lang.String storeId,
                                                                                                                                                                                                                                                                  @QueryParam(value="responseFormat")
                                                                                                                                                                                                                                                                  java.lang.String responseFormat)
        Deprecated. Replaced by updateOrderItem(String, String)
        This method update existing item(s)in the shopping cart.
        Parameters:
        storeId - The store ID.
        responseFormat - The response format (XML, JSON, or Atom).
        Returns:
        Order map in the specified format.
      • updateOrderItem

        @PUT
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Consumes(value={"application/json","application/xml"})
         @Path(value="@self/update_order_item")
        public javax.ws.rs.core.Response updateOrderItem(@PathParam(value="storeId")
                                                                                                                                                                                                                                                                       java.lang.String storeId,
                                                                                                                                                                                                                                                                       @QueryParam(value="responseFormat")
                                                                                                                                                                                                                                                                       java.lang.String responseFormat)
        This method update existing item(s) in the shopping cart.
        Parameters:
        storeId - The store identifier.
        responseFormat - The response format (XML, JSON, or Atom).
        Returns:
        Order map in the specified format.
      • addConfigurationToCart

        @POST
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Consumes(value={"application/json","application/xml"})
         @Path(value="@self/add_configuration_to_cart")
        public javax.ws.rs.core.Response addConfigurationToCart(@PathParam(value="storeId")
                                                                                                                                                                                                                                                                                       java.lang.String storeId,
                                                                                                                                                                                                                                                                                       @QueryParam(value="responseFormat")
                                                                                                                                                                                                                                                                                       java.lang.String responseFormat)
        Adds a configuration of a dynamic kit to the cart.
        Parameters:
        storeId - The store identifier.
        responseFormat - The response format.
        Returns:
        A map of string [] with the order ID and order item ID.
      • addPreConfigurationToCart

        @POST
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Consumes(value={"application/json","application/xml"})
         @Path(value="@self/add_preconfiguration_to_cart")
        public javax.ws.rs.core.Response addPreConfigurationToCart(@PathParam(value="storeId")
                                                                                                                                                                                                                                                                                             java.lang.String storeId,
                                                                                                                                                                                                                                                                                             @QueryParam(value="responseFormat")
                                                                                                                                                                                                                                                                                             java.lang.String responseFormat)
        Adds a pre-configuration of a dynamic kit to the cart.
        Parameters:
        storeId - The store identifier.
        responseFormat - The response format.
        Returns:
        A map of string [] with the order ID and order item ID.
      • updateConfigurationInCart

        @PUT
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Consumes(value={"application/json","application/xml"})
         @Path(value="@self/update_configuration_in_cart")
        public javax.ws.rs.core.Response updateConfigurationInCart(@PathParam(value="storeId")
                                                                                                                                                                                                                                                                                            java.lang.String storeId,
                                                                                                                                                                                                                                                                                            @QueryParam(value="responseFormat")
                                                                                                                                                                                                                                                                                            java.lang.String responseFormat)
        Update a dynamic kit configuration in the cart.
        Parameters:
        storeId - The store identifier.
        responseFormat - The response format.
        Returns:
        The response
      • updateRewardOption

        @PUT
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Consumes(value={"application/json","application/xml"})
         @Path(value="@self/update_reward_option")
        public javax.ws.rs.core.Response updateRewardOption(@PathParam(value="storeId")
                                                                                                                                                                                                                                                                             java.lang.String storeId,
                                                                                                                                                                                                                                                                             @QueryParam(value="responseFormat")
                                                                                                                                                                                                                                                                             java.lang.String responseFormat)
        Updates the reward choice selection.
        Parameters:
        storeId - The store identifier.
        responseFormat - The response format
        Returns:
        A map of String array containing the order ID.
      • cancelOrderInCart

        @DELETE
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="@self")
        public javax.ws.rs.core.Response cancelOrderInCart(@PathParam(value="storeId")
                                                                                                                                                                                                 java.lang.String storeId,
                                                                                                                                                                                                 @QueryParam(value="responseFormat")
                                                                                                                                                                                                 java.lang.String responseFormat)
        Delete all items in the shopping cart.
        Parameters:
        storeId - the store Id.
        responseFormat - the response format (xml, json, or atom).
        Returns:
        The Cart noun in the specified format.
      • moveOrderItem

        @PUT
         @Path(value="move_order_item")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response moveOrderItem(@PathParam(value="storeId")
                                                                                                                                                                                                    java.lang.String storeId,
                                                                                                                                                                                                    @QueryParam(value="responseFormat")
                                                                                                                                                                                                    java.lang.String responseFormat)
        Moves order items from one order to another.
        Parameters:
        storeId - The store identifier.
        responseFormat - The response format.
        Returns:
        The response
      • preCheckout

        @PUT
         @Path(value="@self/precheckout")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response preCheckout(@PathParam(value="storeId")
                                                                                                                                                                                                    java.lang.String storeId,
                                                                                                                                                                                                    @QueryParam(value="responseFormat")
                                                                                                                                                                                                    java.lang.String responseFormat)
        This method prepares the shopping cart for checkout. It calculates charges, performs inventory actions, and locks the price of the order to indicate that the order can be submitted. If successful, it returns current orderId that's in the shopper's cart.

        It must be called before invoking shipping cart/@self/checkout service.

        Parameters:
        storeId - store id
        responseFormat - response format
        Returns:
        Response
      • checkOut

        @POST
         @Path(value="@self/checkout")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response checkOut(@PathParam(value="storeId")
                                                                                                                                                                                               java.lang.String storeId,
                                                                                                                                                                                               @QueryParam(value="responseFormat")
                                                                                                                                                                                               java.lang.String responseFormat)
        This method submits the shopping cart for checkout. Input data may be empty. You must first add payment instruction via URL store/{storeId}/cart/@self/payment_instruction or provide payment instruction with this method. If successful, it returns current orderId that's in the shopper's cart.
        Parameters:
        storeId - the store Id.
        responseFormat - the response format (xml, json, or atom).
        Returns:
        A map of String [] that contains the following response parameters: orderId, resourceId, resourceType
      • lockCart

        @POST
         @Path(value="{cartId}/lock")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response lockCart(@PathParam(value="storeId")
                                                                                                                                                                                              java.lang.String storeId,
                                                                                                                                                                                              @PathParam(value="cartId")
                                                                                                                                                                                              java.lang.String cartId,
                                                                                                                                                                                              @QueryParam(value="responseFormat")
                                                                                                                                                                                              java.lang.String responseFormat)
        This method locks the cart specified by CSR.
        Parameters:
        storeId - the store Id.
        cartId - the cart Id.
        responseFormat - the response format (xml, json, or atom).
        Returns:
        A map of String [] that contains the following response parameters: cartId, resourceId, resourceType
      • lockCartOnBehalf

        @POST
         @Path(value="{cartId}/lockOnBehalf")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response lockCartOnBehalf(@PathParam(value="storeId")
                                                                                                                                                                                                              java.lang.String storeId,
                                                                                                                                                                                                              @PathParam(value="cartId")
                                                                                                                                                                                                              java.lang.String cartId,
                                                                                                                                                                                                              @QueryParam(value="responseFormat")
                                                                                                                                                                                                              java.lang.String responseFormat)
        This method locks the cart specified when the buyer administrator/CSR has established a session to act on behalf of a user.
        Parameters:
        storeId - the store Id.
        cartId - the cart Id.
        responseFormat - the response format (xml, json, or atom).
        Returns:
        A map of String [] that contains the following response parameters: cartId, resourceId, resourceType
      • unlockCart

        @POST
         @Path(value="{cartId}/unlock")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response unlockCart(@PathParam(value="storeId")
                                                                                                                                                                                                  java.lang.String storeId,
                                                                                                                                                                                                  @PathParam(value="cartId")
                                                                                                                                                                                                  java.lang.String cartId,
                                                                                                                                                                                                  @QueryParam(value="responseFormat")
                                                                                                                                                                                                  java.lang.String responseFormat)
        This method unlocks the cart specified by CSR.
        Parameters:
        storeId - the store Id.
        cartId - the cart Id.
        responseFormat - the response format (xml, json, or atom).
        Returns:
        A map of String [] that contains the following response parameters: cartId, resourceId, resourceType
      • unlockCartOnBehalf

        @POST
         @Path(value="{cartId}/unlockOnBehalf")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response unlockCartOnBehalf(@PathParam(value="storeId")
                                                                                                                                                                                                                  java.lang.String storeId,
                                                                                                                                                                                                                  @PathParam(value="cartId")
                                                                                                                                                                                                                  java.lang.String cartId,
                                                                                                                                                                                                                  @QueryParam(value="responseFormat")
                                                                                                                                                                                                                  java.lang.String responseFormat)
        This method unlocks the cart specified when the buyer administrator/CSR has established a session to act on behalf of a user.
        Parameters:
        storeId - the store Id.
        cartId - the cart Id.
        responseFormat - the response format (xml, json, or atom).
        Returns:
        A map of String [] that contains the following response parameters: cartId, resourceId, resourceType
      • postProcess

        public void postProcess(java.util.Map<java.lang.String,java.lang.Object> responseMap)
        Method to provide post process in out of box JSON/XML entity providers after each DataObject has been converted to a Map and before constructing the REST response. By default, it does nothing. Overwrite this method in your resource handler class to perform any post process, for example, merge maps from multiple DataObjects into a single Map.
        Specified by:
        postProcess in interface IResourceHandler
        Overrides:
        postProcess in class AbstractBaseResourceHandler
        Parameters:
        responseMap - The response Map after each DataObject has been converted to a Map.
      • getAllowableShippingModes

        @Deprecated
         @GET
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="shipping_modes")
        public javax.ws.rs.core.Response getAllowableShippingModes(@PathParam(value="storeId")
                                                                                                                                                                                                                            java.lang.String storeId,
                                                                                                                                                                                                                            @QueryParam(value="langId")
                                                                                                                                                                                                                            java.lang.String langId,
                                                                                                                                                                                                                            @QueryParam(value="responseFormat")
                                                                                                                                                                                                                            java.lang.String responseFormat)
        Deprecated. Adding query parameter "locale"
        Get allowable shipping information for the store
        Parameters:
        storeId - the store id
        langId - the langId
        responseFormat - the response format
        Returns:
        the allowable shipping modes
      • getAllowableShippingModes

        @GET
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="shipping_modes")
        public javax.ws.rs.core.Response getAllowableShippingModes(@PathParam(value="storeId")
                                                                                                                                                                                                               java.lang.String storeId,
                                                                                                                                                                                                               @QueryParam(value="locale")
                                                                                                                                                                                                               java.lang.String locale,
                                                                                                                                                                                                               @QueryParam(value="langId")
                                                                                                                                                                                                               java.lang.String langId,
                                                                                                                                                                                                               @QueryParam(value="responseFormat")
                                                                                                                                                                                                               java.lang.String responseFormat)
        Get allowable shipping information for the store
        Parameters:
        storeId - the store id
        locale - the locale
        langId - the langId
        responseFormat - the response format
        Returns:
        the allowable shipping modes
      • orderItemDisplay

        @POST
         @Path(value="@self/renew_order_items")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response orderItemDisplay(@PathParam(value="storeId")
                                                                                                                                                                                                                java.lang.String storeId,
                                                                                                                                                                                                                @QueryParam(value="responseFormat")
                                                                                                                                                                                                                java.lang.String responseFormat)
                                                                                                                                                                                                         throws java.lang.Exception
        Renew order items in cart
        Parameters:
        storeId - store id
        responseFormat - response format
        Returns:
        the response
        Throws:
        java.lang.Exception
      • cancelApplePayOrder

        @POST
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="@self/applepay_cancel")
        public javax.ws.rs.core.Response cancelApplePayOrder(@PathParam(value="storeId")
                                                                                                                                                                                                                 java.lang.String storeId,
                                                                                                                                                                                                                 @QueryParam(value="responseFormat")
                                                                                                                                                                                                                 java.lang.String responseFormat)
                                                                                                                                                                                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • updateApplePayOrder

        @PUT
         @Path(value="@self/applepay_update")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response updateApplePayOrder(@PathParam(value="storeId")
                                                                                                                                                                                                                java.lang.String storeId,
                                                                                                                                                                                                                @QueryParam(value="responseFormat")
                                                                                                                                                                                                                java.lang.String responseFormat)
                                                                                                                                                                                                         throws java.lang.Exception
        Update the apple pay order, such as the address.
        Parameters:
        storeId -
        responseFormat -
        Returns:
        Throws:
        java.lang.Exception
      • processApplePayOrder

        @POST
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="@self/applepay_process")
        public javax.ws.rs.core.Response processApplePayOrder(@PathParam(value="storeId")
                                                                                                                                                                                                                   java.lang.String storeId,
                                                                                                                                                                                                                   @QueryParam(value="responseFormat")
                                                                                                                                                                                                                   java.lang.String responseFormat)
                                                                                                                                                                                                            throws java.lang.Exception
        Process the apple pay cart.
        Parameters:
        storeId -
        responseFormat -
        Returns:
        Throws:
        java.lang.Exception