Interface Cart.Service
- All Superinterfaces:
Maskable
,Quote.Service
,ResultLimitable
,Service
- Enclosing class:
- Cart
@ApiService("SoftLayer_Billing_Order_Cart") public static interface Cart.Service extends Quote.Service
The [[SoftLayer_Billing_Order_Cart]] service allows customers to save their order in a state that can be continually modified. The difference between a cart and a quote is that a quote has locked-in prices while a cart does not. This allows customers to save their order configuration for up to 30 days. After 30 days, the cart is deleted and cannot be retrieved again.
- See Also:
- SoftLayer_Billing_Order_Cart
-
Method Summary
Modifier and Type Method Description Cart.ServiceAsync
asAsync()
Get an async version of this serviceLong
createCart(Order orderData)
When creating a new cart, the order data is sent through SoftLayer_Product_Order::verifyOrder to make sure that the cart contains valid data.Boolean
deleteCart()
If a cart is no longer needed, it can be deleted using this service.Cart
getCartByCartKey(String cartKey)
Retrieve a valid cart record of a SoftLayer order.Cart
getObjectForCart()
byte[]
getPdfForCart()
Retrieve a PDF copy of the cart.Order
getRecalculatedOrderContainer(Order orderData, Boolean orderBeingPlacedFlag)
This method allows the customer to retrieve a saved cart and put it in a format that's suitable to be sent to SoftLayer_Billing_Order_Cart::createCart to create a new cart or to SoftLayer_Billing_Order_Cart::updateCart to update an existing cart.void
setMask(Cart.Mask mask)
Long
updateCart(Order orderData)
Like SoftLayer_Billing_Order_Cart::createCart, the order data will be sent through SoftLayer_Product_Order::verifyOrder to make sure that the updated cart information is valid.Cart.Mask
withMask()
Use the existing mask on this service or create it if not presentCart.Mask
withNewMask()
Overwrite the existing mask on this service with a new one and return itMethods inherited from interface com.softlayer.api.service.billing.order.Quote.Service
claim, deleteQuote, getAccount, getDoNotContactFlag, getObject, getOrder, getOrdersFromQuote, getPdf, getQuoteByQuoteKey, placeOrder, placeQuote, saveQuote, setMask, verifyOrder, withdrawGdprAcceptance
Methods inherited from interface com.softlayer.api.ResultLimitable
getLastResponseTotalItemCount, getResultLimit, setResultLimit
-
Method Details
-
asAsync
Cart.ServiceAsync asAsync()Description copied from interface:Service
Get an async version of this service- Specified by:
asAsync
in interfaceQuote.Service
- Specified by:
asAsync
in interfaceService
-
withNewMask
Cart.Mask withNewMask()Description copied from interface:Maskable
Overwrite the existing mask on this service with a new one and return it- Specified by:
withNewMask
in interfaceMaskable
- Specified by:
withNewMask
in interfaceQuote.Service
-
withMask
Cart.Mask withMask()Description copied from interface:Maskable
Use the existing mask on this service or create it if not present- Specified by:
withMask
in interfaceMaskable
- Specified by:
withMask
in interfaceQuote.Service
-
setMask
-
createCart
When creating a new cart, the order data is sent through SoftLayer_Product_Order::verifyOrder to make sure that the cart contains valid data. If an issue is found with the order, an exception will be thrown and you will receive the same response as if SoftLayer_Product_Order::verifyOrder were called directly. Once the order verification is complete, the cart will be created.
The response is the new cart id.- See Also:
- SoftLayer_Billing_Order_Cart::createCart
-
deleteCart
If a cart is no longer needed, it can be deleted using this service. Once a cart has been deleted, it cannot be retrieved again.- See Also:
- SoftLayer_Billing_Order_Cart::deleteCart
-
getCartByCartKey
Retrieve a valid cart record of a SoftLayer order. -
getObjectForCart
- See Also:
- SoftLayer_Billing_Order_Cart::getObject
-
getPdfForCart
Retrieve a PDF copy of the cart.- See Also:
- SoftLayer_Billing_Order_Cart::getPdf
-
getRecalculatedOrderContainer
@ApiMethod(instanceRequired=true) Order getRecalculatedOrderContainer(Order orderData, Boolean orderBeingPlacedFlag)This method allows the customer to retrieve a saved cart and put it in a format that's suitable to be sent to SoftLayer_Billing_Order_Cart::createCart to create a new cart or to SoftLayer_Billing_Order_Cart::updateCart to update an existing cart.- Specified by:
getRecalculatedOrderContainer
in interfaceQuote.Service
- See Also:
- SoftLayer_Billing_Order_Cart::getRecalculatedOrderContainer
-
updateCart
Like SoftLayer_Billing_Order_Cart::createCart, the order data will be sent through SoftLayer_Product_Order::verifyOrder to make sure that the updated cart information is valid. Once it has been verified, the new order data will be saved.
This will return the cart id.- See Also:
- SoftLayer_Billing_Order_Cart::updateCart
-