com.softlayer.api.service.billing.order.Cart Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of softlayer-api-client Show documentation
Show all versions of softlayer-api-client Show documentation
API client for accessing the SoftLayer API
The newest version!
package com.softlayer.api.service.billing.order;
import com.softlayer.api.ApiClient;
import com.softlayer.api.ResponseHandler;
import com.softlayer.api.annotation.ApiMethod;
import com.softlayer.api.annotation.ApiType;
import com.softlayer.api.service.billing.order.Quote;
import com.softlayer.api.service.container.product.Order;
import java.util.concurrent.Future;
/**
* 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 SoftLayer_Billing_Order_Cart
*/
@ApiType("SoftLayer_Billing_Order_Cart")
public class Cart extends Quote {
public Service asService(ApiClient client) {
return service(client, id);
}
public static Service service(ApiClient client) {
return client.createService(Service.class, null);
}
public static Service service(ApiClient client, Long id) {
return client.createService(Service.class, id == null ? null : id.toString());
}
/**
* 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 SoftLayer_Billing_Order_Cart
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Billing_Order_Cart")
public static interface Service extends Quote.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* 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 SoftLayer_Billing_Order_Cart::createCart
*/
@ApiMethod
public Long createCart(Order orderData);
/**
* 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 SoftLayer_Billing_Order_Cart::deleteCart
*/
@ApiMethod(instanceRequired = true)
public Boolean deleteCart();
/**
* Retrieve a valid cart record of a SoftLayer order.
*
* @see SoftLayer_Billing_Order_Cart::getCartByCartKey
*/
@ApiMethod
public Cart getCartByCartKey(String cartKey);
/**
* @see SoftLayer_Billing_Order_Cart::getObject
*/
@ApiMethod(value = "getObject", instanceRequired = true)
public Cart getObjectForCart();
/**
* Retrieve a PDF copy of the cart.
*
* @see SoftLayer_Billing_Order_Cart::getPdf
*/
@ApiMethod(value = "getPdf", instanceRequired = true)
public byte[] getPdfForCart();
/**
* 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.
*
* @see SoftLayer_Billing_Order_Cart::getRecalculatedOrderContainer
*/
@ApiMethod(instanceRequired = true)
public Order getRecalculatedOrderContainer(Order orderData, Boolean orderBeingPlacedFlag);
/**
* 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 SoftLayer_Billing_Order_Cart::updateCart
*/
@ApiMethod(instanceRequired = true)
public Long updateCart(Order orderData);
}
public static interface ServiceAsync extends Quote.ServiceAsync {
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Async version of {@link Service#createCart}
*/
public Future createCart(Order orderData);
public Future> createCart(Order orderData, ResponseHandler callback);
/**
* Async version of {@link Service#deleteCart}
*/
public Future deleteCart();
public Future> deleteCart(ResponseHandler callback);
/**
* Async version of {@link Service#getCartByCartKey}
*/
public Future getCartByCartKey(String cartKey);
public Future> getCartByCartKey(String cartKey, ResponseHandler callback);
/**
* Async version of {@link Service#getObjectForCart}
*/
public Future getObjectForCart();
public Future> getObjectForCart(ResponseHandler callback);
/**
* Async version of {@link Service#getPdfForCart}
*/
public Future getPdfForCart();
public Future> getPdfForCart(ResponseHandler callback);
/**
* Async version of {@link Service#getRecalculatedOrderContainer}
*/
public Future getRecalculatedOrderContainer(Order orderData, Boolean orderBeingPlacedFlag);
public Future> getRecalculatedOrderContainer(Order orderData, Boolean orderBeingPlacedFlag, ResponseHandler callback);
/**
* Async version of {@link Service#updateCart}
*/
public Future updateCart(Order orderData);
public Future> updateCart(Order orderData, ResponseHandler callback);
}
public static class Mask extends Quote.Mask {
}
}