All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mozu.api.resources.commerce.OrderResource Maven / Gradle / Ivy

Go to download

Mozu Java is a SDK that enables you to create robust Java applications that integrate with the Mozu platform

There is a newer version: 2.6.1-RC1
Show newest version
/**
 *     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 the Orders resource to manage all components of order processing, payment, and fulfillment.
 * 
 */
public class OrderResource {
	///
	/// 
	///
	private ApiContext _apiContext;


	public OrderResource(ApiContext apiContext) 
	{
		_apiContext = apiContext;
	}

	
	/**
	 * 
	 * 


	 *	Order order = new Order();
	 *	OrderCollection orderCollection = order.getOrders();
	 * 

* @return com.mozu.api.contracts.commerceruntime.orders.OrderCollection * @see com.mozu.api.contracts.commerceruntime.orders.OrderCollection */ public com.mozu.api.contracts.commerceruntime.orders.OrderCollection getOrders() throws Exception { return getOrders( null, null, null, null, null, null, null, null, null); } /** * *


	 *	Order order = new Order();
	 *	OrderCollection orderCollection = order.getOrders( startIndex,  pageSize,  sortBy,  filter,  q,  qLimit,  includeBin,  mode,  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 includeBin * @param mode * @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.orders.OrderCollection * @see com.mozu.api.contracts.commerceruntime.orders.OrderCollection */ public com.mozu.api.contracts.commerceruntime.orders.OrderCollection getOrders(Integer startIndex, Integer pageSize, String sortBy, String filter, String q, Integer qLimit, Boolean includeBin, String mode, String responseFields) throws Exception { MozuClient client = com.mozu.api.clients.commerce.OrderClient.getOrdersClient( startIndex, pageSize, sortBy, filter, q, qLimit, includeBin, mode, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * *


	 *	Order order = new Order();
	 *	string string = order.getAvailableActions( orderId);
	 * 

* @param orderId Unique identifier of the order. * @return List * @see string */ public List getAvailableActions(String orderId) throws Exception { MozuClient> client = com.mozu.api.clients.commerce.OrderClient.getAvailableActionsClient( orderId); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * *


	 *	Order order = new Order();
	 *	TaxableOrder taxableOrder = order.getTaxableOrders( orderId);
	 * 

* @param orderId Unique identifier of the order. * @return List * @see com.mozu.api.contracts.pricingruntime.TaxableOrder */ public List getTaxableOrders(String orderId) throws Exception { MozuClient> client = com.mozu.api.clients.commerce.OrderClient.getTaxableOrdersClient( orderId); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * *


	 *	Order order = new Order();
	 *	Order order = order.getOrder( orderId);
	 * 

* @param orderId Unique identifier of the order. * @return com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order */ public com.mozu.api.contracts.commerceruntime.orders.Order getOrder(String orderId) throws Exception { return getOrder( orderId, null, null, null, null); } /** * *


	 *	Order order = new Order();
	 *	Order order = order.getOrder( orderId,  draft,  includeBin,  mode,  responseFields);
	 * 

* @param draft If true, retrieve the draft version of the order, which might include uncommitted changes to the order or its components. * @param includeBin * @param mode * @param orderId Unique identifier of the order. * @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.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order */ public com.mozu.api.contracts.commerceruntime.orders.Order getOrder(String orderId, Boolean draft, Boolean includeBin, String mode, String responseFields) throws Exception { MozuClient client = com.mozu.api.clients.commerce.OrderClient.getOrderClient( orderId, draft, includeBin, mode, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * *


	 *	Order order = new Order();
	 *	Order order = order.createOrderFromCart( cartId);
	 * 

* @param cartId Identifier of the cart to delete. * @return com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order */ public com.mozu.api.contracts.commerceruntime.orders.Order createOrderFromCart(String cartId) throws Exception { return createOrderFromCart( cartId, null); } /** * *


	 *	Order order = new Order();
	 *	Order order = order.createOrderFromCart( 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.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order */ public com.mozu.api.contracts.commerceruntime.orders.Order createOrderFromCart(String cartId, String responseFields) throws Exception { MozuClient client = com.mozu.api.clients.commerce.OrderClient.createOrderFromCartClient( cartId, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * *


	 *	Order order = new Order();
	 *	Order order = order.createOrder( order);
	 * 

* @param order Properties of an order, including its components. * @return com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order */ public com.mozu.api.contracts.commerceruntime.orders.Order createOrder(com.mozu.api.contracts.commerceruntime.orders.Order order) throws Exception { return createOrder( order, null); } /** * *


	 *	Order order = new Order();
	 *	Order order = order.createOrder( order,  responseFields);
	 * 

* @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 order Properties of an order, including its components. * @return com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order */ public com.mozu.api.contracts.commerceruntime.orders.Order createOrder(com.mozu.api.contracts.commerceruntime.orders.Order order, String responseFields) throws Exception { MozuClient client = com.mozu.api.clients.commerce.OrderClient.createOrderClient( order, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * *


	 *	Order order = new Order();
	 *	Order order = order.performOrderAction( action,  orderId);
	 * 

* @param orderId Unique identifier of the order. * @param action The action to perform for the order. * @return com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.OrderAction */ public com.mozu.api.contracts.commerceruntime.orders.Order performOrderAction(com.mozu.api.contracts.commerceruntime.orders.OrderAction action, String orderId) throws Exception { return performOrderAction( action, orderId, null); } /** * *


	 *	Order order = new Order();
	 *	Order order = order.performOrderAction( action,  orderId,  responseFields);
	 * 

* @param orderId Unique identifier of the order. * @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 action to perform for the order. * @return com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.OrderAction */ public com.mozu.api.contracts.commerceruntime.orders.Order performOrderAction(com.mozu.api.contracts.commerceruntime.orders.OrderAction action, String orderId, String responseFields) throws Exception { MozuClient client = com.mozu.api.clients.commerce.OrderClient.performOrderActionClient( action, orderId, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * *


	 *	Order order = new Order();
	 *	Order order = order.priceOrder( order,  refreshShipping);
	 * 

* @param refreshShipping Specifies whether shipping rates should be re-evaluated while pricing. * @param order The order payload to price. * @return com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order */ public com.mozu.api.contracts.commerceruntime.orders.Order priceOrder(com.mozu.api.contracts.commerceruntime.orders.Order order, Boolean refreshShipping) throws Exception { return priceOrder( order, refreshShipping, null); } /** * *


	 *	Order order = new Order();
	 *	Order order = order.priceOrder( order,  refreshShipping,  responseFields);
	 * 

* @param refreshShipping Specifies whether shipping rates should be re-evaluated while pricing. * @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 order The order payload to price. * @return com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order */ public com.mozu.api.contracts.commerceruntime.orders.Order priceOrder(com.mozu.api.contracts.commerceruntime.orders.Order order, Boolean refreshShipping, String responseFields) throws Exception { MozuClient client = com.mozu.api.clients.commerce.OrderClient.priceOrderClient( order, refreshShipping, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * *


	 *	Order order = new Order();
	 *	Order order = order.processDigitalWallet( digitalWallet,  orderId,  digitalWalletType);
	 * 

* @param digitalWalletType The type of digital wallet to be processed. * @param orderId Unique identifier of the order. * @param digitalWallet The details of the digitial wallet. * @return com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.DigitalWallet */ public com.mozu.api.contracts.commerceruntime.orders.Order processDigitalWallet(com.mozu.api.contracts.commerceruntime.orders.DigitalWallet digitalWallet, String orderId, String digitalWalletType) throws Exception { return processDigitalWallet( digitalWallet, orderId, digitalWalletType, null); } /** * *


	 *	Order order = new Order();
	 *	Order order = order.processDigitalWallet( digitalWallet,  orderId,  digitalWalletType,  responseFields);
	 * 

* @param digitalWalletType The type of digital wallet to be processed. * @param orderId Unique identifier of the order. * @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 details of the digitial wallet. * @return com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.DigitalWallet */ public com.mozu.api.contracts.commerceruntime.orders.Order processDigitalWallet(com.mozu.api.contracts.commerceruntime.orders.DigitalWallet digitalWallet, String orderId, String digitalWalletType, String responseFields) throws Exception { MozuClient client = com.mozu.api.clients.commerce.OrderClient.processDigitalWalletClient( digitalWallet, orderId, digitalWalletType, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * *


	 *	Order order = new Order();
	 *	Order order = order.updateOrderDiscount( discount,  orderId,  discountId);
	 * 

* @param discountId discountId parameter description DOCUMENT_HERE * @param orderId Unique identifier of the order. * @param discount Properties of all applied discounts for an associated cart, order, or product. * @return com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.discounts.AppliedDiscount */ public com.mozu.api.contracts.commerceruntime.orders.Order updateOrderDiscount(com.mozu.api.contracts.commerceruntime.discounts.AppliedDiscount discount, String orderId, Integer discountId) throws Exception { return updateOrderDiscount( discount, orderId, discountId, null, null, null); } /** * *


	 *	Order order = new Order();
	 *	Order order = order.updateOrderDiscount( discount,  orderId,  discountId,  updateMode,  version,  responseFields);
	 * 

* @param discountId discountId parameter description DOCUMENT_HERE * @param orderId Unique identifier of the order. * @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 updateMode Specifies whether to update the original order, update the order in draft mode, or update the order in draft mode and then commit the changes to the original. Draft mode enables users to make incremental order changes before committing the changes to the original order. Valid values are "ApplyToOriginal," "ApplyToDraft," or "ApplyAndCommit." * @param version Determines whether or not to check versioning of items for concurrency purposes. * @param discount Properties of all applied discounts for an associated cart, order, or product. * @return com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.discounts.AppliedDiscount */ public com.mozu.api.contracts.commerceruntime.orders.Order updateOrderDiscount(com.mozu.api.contracts.commerceruntime.discounts.AppliedDiscount discount, String orderId, Integer discountId, String updateMode, String version, String responseFields) throws Exception { MozuClient client = com.mozu.api.clients.commerce.OrderClient.updateOrderDiscountClient( discount, orderId, discountId, updateMode, version, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * *


	 *	Order order = new Order();
	 *	Stream stream = order.deleteOrderDraft( orderId);
	 * 

* @param orderId Unique identifier of the order. * @return Stream * @see Stream */ public java.io.InputStream deleteOrderDraft(String orderId) throws Exception { return deleteOrderDraft( orderId, null); } /** * *


	 *	Order order = new Order();
	 *	Stream stream = order.deleteOrderDraft( orderId,  version);
	 * 

* @param orderId Unique identifier of the order. * @param version Determines whether or not to check versioning of items for concurrency purposes. * @return Stream * @see Stream */ public java.io.InputStream deleteOrderDraft(String orderId, String version) throws Exception { MozuClient client = com.mozu.api.clients.commerce.OrderClient.deleteOrderDraftClient( orderId, version); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * *


	 *	Order order = new Order();
	 *	Stream stream = order.resendOrderConfirmationEmail( action,  orderId);
	 * 

* @param orderId Unique identifier of the order. * @param action The action to perform for the order. * @return Stream * @see Stream * @see com.mozu.api.contracts.commerceruntime.orders.OrderAction */ public java.io.InputStream resendOrderConfirmationEmail(com.mozu.api.contracts.commerceruntime.orders.OrderAction action, String orderId) throws Exception { MozuClient client = com.mozu.api.clients.commerce.OrderClient.resendOrderConfirmationEmailClient( action, orderId); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * *


	 *	Order order = new Order();
	 *	Order order = order.changeOrderPriceList( priceListCode,  orderId);
	 * 

* @param orderId Unique identifier of the order. * @param priceListCode The unique price list code. * @return com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order * @see string */ public com.mozu.api.contracts.commerceruntime.orders.Order changeOrderPriceList(String priceListCode, String orderId) throws Exception { return changeOrderPriceList( priceListCode, orderId, null, null, null); } /** * *


	 *	Order order = new Order();
	 *	Order order = order.changeOrderPriceList( priceListCode,  orderId,  updateMode,  version,  responseFields);
	 * 

* @param orderId Unique identifier of the order. * @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 updateMode Specifies whether to update the original order, update the order in draft mode, or update the order in draft mode and then commit the changes to the original. Draft mode enables users to make incremental order changes before committing the changes to the original order. Valid values are "ApplyToOriginal," "ApplyToDraft," or "ApplyAndCommit." * @param version Determines whether or not to check versioning of items for concurrency purposes. * @param priceListCode The unique price list code. * @return com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order * @see string */ public com.mozu.api.contracts.commerceruntime.orders.Order changeOrderPriceList(String priceListCode, String orderId, String updateMode, String version, String responseFields) throws Exception { MozuClient client = com.mozu.api.clients.commerce.OrderClient.changeOrderPriceListClient( priceListCode, orderId, updateMode, version, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * *


	 *	Order order = new Order();
	 *	Order order = order.changeOrderUserId( orderId);
	 * 

* @param orderId Unique identifier of the order. * @return com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order */ public com.mozu.api.contracts.commerceruntime.orders.Order changeOrderUserId(String orderId) throws Exception { return changeOrderUserId( orderId, null); } /** * *


	 *	Order order = new Order();
	 *	Order order = order.changeOrderUserId( orderId,  responseFields);
	 * 

* @param orderId Unique identifier of the order. * @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.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order */ public com.mozu.api.contracts.commerceruntime.orders.Order changeOrderUserId(String orderId, String responseFields) throws Exception { MozuClient client = com.mozu.api.clients.commerce.OrderClient.changeOrderUserIdClient( orderId, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * *


	 *	Order order = new Order();
	 *	Order order = order.updateOrder( order,  orderId);
	 * 

* @param orderId Unique identifier of the order. * @param order Properties of an order, including its components. * @return com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order */ public com.mozu.api.contracts.commerceruntime.orders.Order updateOrder(com.mozu.api.contracts.commerceruntime.orders.Order order, String orderId) throws Exception { return updateOrder( order, orderId, null, null, null); } /** * *


	 *	Order order = new Order();
	 *	Order order = order.updateOrder( order,  orderId,  updateMode,  version,  responseFields);
	 * 

* @param orderId Unique identifier of the order. * @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 updateMode Specifies whether to update the original order, update the order in draft mode, or update the order in draft mode and then commit the changes to the original. Draft mode enables users to make incremental order changes before committing the changes to the original order. Valid values are "ApplyToOriginal," "ApplyToDraft," or "ApplyAndCommit." * @param version Determines whether or not to check versioning of items for concurrency purposes. * @param order Properties of an order, including its components. * @return com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order * @see com.mozu.api.contracts.commerceruntime.orders.Order */ public com.mozu.api.contracts.commerceruntime.orders.Order updateOrder(com.mozu.api.contracts.commerceruntime.orders.Order order, String orderId, String updateMode, String version, String responseFields) throws Exception { MozuClient client = com.mozu.api.clients.commerce.OrderClient.updateOrderClient( order, orderId, updateMode, version, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy