com.mozu.api.resources.commerce.CheckoutResource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mozu-api-core Show documentation
Show all versions of mozu-api-core Show documentation
Mozu Java is a SDK that enables you to create robust Java applications that integrate with the Mozu platform
/**
* This code was auto-generated by a Codezu.
*
* Changes to this file may cause incorrect behavior and will be lost if
* the code is regenerated.
*/
package com.mozu.api.resources.commerce;
import com.mozu.api.ApiContext;
import java.util.List;
import java.util.ArrayList;
import com.mozu.api.MozuClient;
import com.mozu.api.MozuClientFactory;
import com.mozu.api.MozuUrl;
import com.mozu.api.Headers;
import org.joda.time.DateTime;
import com.mozu.api.security.AuthTicket;
import org.apache.commons.lang.StringUtils;
/**
* Use this resource to track a shopper's order items and their intended destinations on sites that have the multiple shipment feature enabled. The Checkouts resource is active until the shopper submits the order, at which point one or many orders are created based on the data contained in the Checkouts resource.To learn more about this resource and the ability to ship items to multiple addresses, refer to the [Multiple Shipments API Overview](https://www.mozu.com/docs/Developer/api-guides/multi-ship.htm) topic.
*
*/
public class CheckoutResource {
///
///
///
private ApiContext _apiContext;
public CheckoutResource(ApiContext apiContext)
{
_apiContext = apiContext;
}
/**
*
*
* Checkout checkout = new Checkout();
* CheckoutCollection checkoutCollection = checkout.getCheckouts();
*
* @return com.mozu.api.contracts.commerceruntime.checkouts.CheckoutCollection
* @see com.mozu.api.contracts.commerceruntime.checkouts.CheckoutCollection
*/
public com.mozu.api.contracts.commerceruntime.checkouts.CheckoutCollection getCheckouts() throws Exception
{
return getCheckouts( null, null, null, null, null, null, null);
}
/**
*
*
* Checkout checkout = new Checkout();
* CheckoutCollection checkoutCollection = checkout.getCheckouts( startIndex, pageSize, sortBy, filter, q, qLimit, responseFields);
*
* @param filter A set of filter expressions representing the search parameters for a query. This parameter is optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for a list of supported filters.
* @param pageSize When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with this parameter set to 25, to get the 51st through the 75th items, set startIndex to 50.
* @param q A list of order search terms (not phrases) to use in the query when searching across order number and the name or email of the billing contact. When entering, separate multiple search terms with a space character.
* @param qLimit The maximum number of search results to return in the response. You can limit any range between 1-100.
* @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
* @param sortBy The element to sort the results by and the channel in which the results appear. Either ascending (a-z) or descending (z-a) channel. Optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for more information.
* @param startIndex When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with pageSize set to 25, to get the 51st through the 75th items, set this parameter to 50.
* @return com.mozu.api.contracts.commerceruntime.checkouts.CheckoutCollection
* @see com.mozu.api.contracts.commerceruntime.checkouts.CheckoutCollection
*/
public com.mozu.api.contracts.commerceruntime.checkouts.CheckoutCollection getCheckouts(Integer startIndex, Integer pageSize, String sortBy, String filter, String q, Integer qLimit, String responseFields) throws Exception
{
MozuClient client = com.mozu.api.clients.commerce.CheckoutClient.getCheckoutsClient( startIndex, pageSize, sortBy, filter, q, qLimit, responseFields);
client.setContext(_apiContext);
client.executeRequest();
return client.getResult();
}
/**
*
*
* Checkout checkout = new Checkout();
* string string = checkout.getAvailableActions( checkoutId);
*
* @param checkoutId The unique identifier of the checkout.
* @return List
* @see string
*/
public List getAvailableActions(String checkoutId) throws Exception
{
MozuClient> client = com.mozu.api.clients.commerce.CheckoutClient.getAvailableActionsClient( checkoutId);
client.setContext(_apiContext);
client.executeRequest();
return client.getResult();
}
/**
*
*
* Checkout checkout = new Checkout();
* CheckoutGroupRates checkoutGroupRates = checkout.getAvailableShippingMethods( checkoutId);
*
* @param checkoutId The unique identifier of the checkout.
* @return List
* @see com.mozu.api.contracts.commerceruntime.checkouts.CheckoutGroupRates
*/
public List getAvailableShippingMethods(String checkoutId) throws Exception
{
MozuClient> client = com.mozu.api.clients.commerce.CheckoutClient.getAvailableShippingMethodsClient( checkoutId);
client.setContext(_apiContext);
client.executeRequest();
return client.getResult();
}
/**
*
*
* Checkout checkout = new Checkout();
* Checkout checkout = checkout.getCheckout( checkoutId);
*
* @param checkoutId The unique identifier of the checkout.
* @return com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.checkouts.Checkout
*/
public com.mozu.api.contracts.commerceruntime.checkouts.Checkout getCheckout(String checkoutId) throws Exception
{
return getCheckout( checkoutId, null);
}
/**
*
*
* Checkout checkout = new Checkout();
* Checkout checkout = checkout.getCheckout( checkoutId, responseFields);
*
* @param checkoutId The unique identifier of the checkout.
* @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
* @return com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.checkouts.Checkout
*/
public com.mozu.api.contracts.commerceruntime.checkouts.Checkout getCheckout(String checkoutId, String responseFields) throws Exception
{
MozuClient client = com.mozu.api.clients.commerce.CheckoutClient.getCheckoutClient( checkoutId, responseFields);
client.setContext(_apiContext);
client.executeRequest();
return client.getResult();
}
/**
*
*
* Checkout checkout = new Checkout();
* Checkout checkout = checkout.createCheckoutFromCart( cartId);
*
* @param cartId Identifier of the cart to delete.
* @return com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.checkouts.Checkout
*/
public com.mozu.api.contracts.commerceruntime.checkouts.Checkout createCheckoutFromCart(String cartId) throws Exception
{
return createCheckoutFromCart( cartId, null);
}
/**
*
*
* Checkout checkout = new Checkout();
* Checkout checkout = checkout.createCheckoutFromCart( cartId, responseFields);
*
* @param cartId Identifier of the cart to delete.
* @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
* @return com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.checkouts.Checkout
*/
public com.mozu.api.contracts.commerceruntime.checkouts.Checkout createCheckoutFromCart(String cartId, String responseFields) throws Exception
{
MozuClient client = com.mozu.api.clients.commerce.CheckoutClient.createCheckoutFromCartClient( cartId, responseFields);
client.setContext(_apiContext);
client.executeRequest();
return client.getResult();
}
/**
*
*
* Checkout checkout = new Checkout();
* Checkout checkout = checkout.performCheckoutAction( action, checkoutId);
*
* @param checkoutId The unique identifier of the checkout.
* @param action The name of the action to perform.
* @return com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.checkouts.CheckoutAction
*/
public com.mozu.api.contracts.commerceruntime.checkouts.Checkout performCheckoutAction(com.mozu.api.contracts.commerceruntime.checkouts.CheckoutAction action, String checkoutId) throws Exception
{
return performCheckoutAction( action, checkoutId, null);
}
/**
*
*
* Checkout checkout = new Checkout();
* Checkout checkout = checkout.performCheckoutAction( action, checkoutId, responseFields);
*
* @param checkoutId The unique identifier of the checkout.
* @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
* @param action The name of the action to perform.
* @return com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.checkouts.CheckoutAction
*/
public com.mozu.api.contracts.commerceruntime.checkouts.Checkout performCheckoutAction(com.mozu.api.contracts.commerceruntime.checkouts.CheckoutAction action, String checkoutId, String responseFields) throws Exception
{
MozuClient client = com.mozu.api.clients.commerce.CheckoutClient.performCheckoutActionClient( action, checkoutId, responseFields);
client.setContext(_apiContext);
client.executeRequest();
return client.getResult();
}
/**
*
*
* Checkout checkout = new Checkout();
* Stream stream = checkout.resendCheckoutConfirmationEmail( checkoutId);
*
* @param checkoutId The unique identifier of the checkout.
* @return Stream
* @see Stream
*/
public java.io.InputStream resendCheckoutConfirmationEmail(String checkoutId) throws Exception
{
MozuClient client = com.mozu.api.clients.commerce.CheckoutClient.resendCheckoutConfirmationEmailClient( checkoutId);
client.setContext(_apiContext);
client.executeRequest();
return client.getResult();
}
/**
*
*
* Checkout checkout = new Checkout();
* Checkout checkout = checkout.setShippingMethods( groupShippingMethods, checkoutId);
*
* @param checkoutId The unique identifier of the checkout.
* @param groupShippingMethods The shipping methods for the grouping.
* @return com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.checkouts.CheckoutGroupShippingMethod
*/
public com.mozu.api.contracts.commerceruntime.checkouts.Checkout setShippingMethods(List groupShippingMethods, String checkoutId) throws Exception
{
return setShippingMethods( groupShippingMethods, checkoutId, null);
}
/**
*
*
* Checkout checkout = new Checkout();
* Checkout checkout = checkout.setShippingMethods( groupShippingMethods, checkoutId, responseFields);
*
* @param checkoutId The unique identifier of the checkout.
* @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
* @param groupShippingMethods The shipping methods for the grouping.
* @return com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.checkouts.CheckoutGroupShippingMethod
*/
public com.mozu.api.contracts.commerceruntime.checkouts.Checkout setShippingMethods(List groupShippingMethods, String checkoutId, String responseFields) throws Exception
{
MozuClient client = com.mozu.api.clients.commerce.CheckoutClient.setShippingMethodsClient( groupShippingMethods, checkoutId, responseFields);
client.setContext(_apiContext);
client.executeRequest();
return client.getResult();
}
/**
*
*
* Checkout checkout = new Checkout();
* Checkout checkout = checkout.updateCheckout( checkout, checkoutId);
*
* @param checkoutId The unique identifier of the checkout.
* @param checkout The checkout object.
* @return com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.checkouts.Checkout
*/
public com.mozu.api.contracts.commerceruntime.checkouts.Checkout updateCheckout(com.mozu.api.contracts.commerceruntime.checkouts.Checkout checkout, String checkoutId) throws Exception
{
return updateCheckout( checkout, checkoutId, null);
}
/**
*
*
* Checkout checkout = new Checkout();
* Checkout checkout = checkout.updateCheckout( checkout, checkoutId, responseFields);
*
* @param checkoutId The unique identifier of the checkout.
* @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
* @param checkout The checkout object.
* @return com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.checkouts.Checkout
*/
public com.mozu.api.contracts.commerceruntime.checkouts.Checkout updateCheckout(com.mozu.api.contracts.commerceruntime.checkouts.Checkout checkout, String checkoutId, String responseFields) throws Exception
{
MozuClient client = com.mozu.api.clients.commerce.CheckoutClient.updateCheckoutClient( checkout, checkoutId, responseFields);
client.setContext(_apiContext);
client.executeRequest();
return client.getResult();
}
/**
*
*
* Checkout checkout = new Checkout();
* Checkout checkout = checkout.processDigitalWallet( digitalWallet, checkoutId, digitalWalletType);
*
* @param checkoutId The unique identifier of the checkout.
* @param digitalWalletType The type of digital wallet.
* @param digitalWallet The digital wallet object.
* @return com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.orders.DigitalWallet
*/
public com.mozu.api.contracts.commerceruntime.checkouts.Checkout processDigitalWallet(com.mozu.api.contracts.commerceruntime.orders.DigitalWallet digitalWallet, String checkoutId, String digitalWalletType) throws Exception
{
return processDigitalWallet( digitalWallet, checkoutId, digitalWalletType, null);
}
/**
*
*
* Checkout checkout = new Checkout();
* Checkout checkout = checkout.processDigitalWallet( digitalWallet, checkoutId, digitalWalletType, responseFields);
*
* @param checkoutId The unique identifier of the checkout.
* @param digitalWalletType The type of digital wallet.
* @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
* @param digitalWallet The digital wallet object.
* @return com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.orders.DigitalWallet
*/
public com.mozu.api.contracts.commerceruntime.checkouts.Checkout processDigitalWallet(com.mozu.api.contracts.commerceruntime.orders.DigitalWallet digitalWallet, String checkoutId, String digitalWalletType, String responseFields) throws Exception
{
MozuClient client = com.mozu.api.clients.commerce.CheckoutClient.processDigitalWalletClient( digitalWallet, checkoutId, digitalWalletType, responseFields);
client.setContext(_apiContext);
client.executeRequest();
return client.getResult();
}
/**
*
*
* Checkout checkout = new Checkout();
* Checkout checkout = checkout.changeCheckoutPriceList( priceListCode, checkoutId);
*
* @param checkoutId The unique identifier of the checkout.
* @param priceListCode The unique identifier of the price list that applies to the checkout, if applicable.
* @return com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see string
*/
public com.mozu.api.contracts.commerceruntime.checkouts.Checkout changeCheckoutPriceList(String priceListCode, String checkoutId) throws Exception
{
return changeCheckoutPriceList( priceListCode, checkoutId, null);
}
/**
*
*
* Checkout checkout = new Checkout();
* Checkout checkout = checkout.changeCheckoutPriceList( priceListCode, checkoutId, responseFields);
*
* @param checkoutId The unique identifier of the checkout.
* @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
* @param priceListCode The unique identifier of the price list that applies to the checkout, if applicable.
* @return com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see com.mozu.api.contracts.commerceruntime.checkouts.Checkout
* @see string
*/
public com.mozu.api.contracts.commerceruntime.checkouts.Checkout changeCheckoutPriceList(String priceListCode, String checkoutId, String responseFields) throws Exception
{
MozuClient client = com.mozu.api.clients.commerce.CheckoutClient.changeCheckoutPriceListClient( priceListCode, checkoutId, responseFields);
client.setContext(_apiContext);
client.executeRequest();
return client.getResult();
}
}