com.mozu.api.resources.commerce.InStockNotificationSubscriptionResource 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 the Customer In-Stock Notification Subscription resource to manage the subscriptions customer accounts use to send product notifications. This resource can send a notification when a product in a catalog returns to a site's active inventory after it is out of stock, or when a new product becomes available for the first time.
*
*/
public class InStockNotificationSubscriptionResource {
///
///
///
private ApiContext _apiContext;
public InStockNotificationSubscriptionResource(ApiContext apiContext)
{
_apiContext = apiContext;
}
/**
*
*
* InStockNotificationSubscription instocknotificationsubscription = new InStockNotificationSubscription();
* InStockNotificationSubscriptionCollection inStockNotificationSubscriptionCollection = instocknotificationsubscription.getInStockNotificationSubscriptions();
*
* @return com.mozu.api.contracts.customer.InStockNotificationSubscriptionCollection
* @see com.mozu.api.contracts.customer.InStockNotificationSubscriptionCollection
*/
public com.mozu.api.contracts.customer.InStockNotificationSubscriptionCollection getInStockNotificationSubscriptions() throws Exception
{
return getInStockNotificationSubscriptions( null, null, null, null, null);
}
/**
*
*
* InStockNotificationSubscription instocknotificationsubscription = new InStockNotificationSubscription();
* InStockNotificationSubscriptionCollection inStockNotificationSubscriptionCollection = instocknotificationsubscription.getInStockNotificationSubscriptions( startIndex, pageSize, sortBy, filter, 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 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.customer.InStockNotificationSubscriptionCollection
* @see com.mozu.api.contracts.customer.InStockNotificationSubscriptionCollection
*/
public com.mozu.api.contracts.customer.InStockNotificationSubscriptionCollection getInStockNotificationSubscriptions(Integer startIndex, Integer pageSize, String sortBy, String filter, String responseFields) throws Exception
{
MozuClient client = com.mozu.api.clients.commerce.InStockNotificationSubscriptionClient.getInStockNotificationSubscriptionsClient( startIndex, pageSize, sortBy, filter, responseFields);
client.setContext(_apiContext);
client.executeRequest();
return client.getResult();
}
/**
*
*
* InStockNotificationSubscription instocknotificationsubscription = new InStockNotificationSubscription();
* InStockNotificationSubscription inStockNotificationSubscription = instocknotificationsubscription.getInStockNotificationSubscription( id);
*
* @param id Unique identifier of the customer segment to retrieve.
* @return com.mozu.api.contracts.customer.InStockNotificationSubscription
* @see com.mozu.api.contracts.customer.InStockNotificationSubscription
*/
public com.mozu.api.contracts.customer.InStockNotificationSubscription getInStockNotificationSubscription(Integer id) throws Exception
{
return getInStockNotificationSubscription( id, null);
}
/**
*
*
* InStockNotificationSubscription instocknotificationsubscription = new InStockNotificationSubscription();
* InStockNotificationSubscription inStockNotificationSubscription = instocknotificationsubscription.getInStockNotificationSubscription( id, responseFields);
*
* @param id Unique identifier of the customer segment to retrieve.
* @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.customer.InStockNotificationSubscription
* @see com.mozu.api.contracts.customer.InStockNotificationSubscription
*/
public com.mozu.api.contracts.customer.InStockNotificationSubscription getInStockNotificationSubscription(Integer id, String responseFields) throws Exception
{
MozuClient client = com.mozu.api.clients.commerce.InStockNotificationSubscriptionClient.getInStockNotificationSubscriptionClient( id, responseFields);
client.setContext(_apiContext);
client.executeRequest();
return client.getResult();
}
/**
*
*
* InStockNotificationSubscription instocknotificationsubscription = new InStockNotificationSubscription();
* InStockNotificationSubscription inStockNotificationSubscription = instocknotificationsubscription.addInStockNotificationSubscription( inStockNotificationSubscription);
*
* @param inStockNotificationSubscription Properties of a push notification to which the shopper subscribes. This notification sends the shopper an alert when a new product or a product previously out of stock becomes available in the specified location's active product inventory.
* @return com.mozu.api.contracts.customer.InStockNotificationSubscription
* @see com.mozu.api.contracts.customer.InStockNotificationSubscription
* @see com.mozu.api.contracts.customer.InStockNotificationSubscription
*/
public com.mozu.api.contracts.customer.InStockNotificationSubscription addInStockNotificationSubscription(com.mozu.api.contracts.customer.InStockNotificationSubscription inStockNotificationSubscription) throws Exception
{
return addInStockNotificationSubscription( inStockNotificationSubscription, null);
}
/**
*
*
* InStockNotificationSubscription instocknotificationsubscription = new InStockNotificationSubscription();
* InStockNotificationSubscription inStockNotificationSubscription = instocknotificationsubscription.addInStockNotificationSubscription( inStockNotificationSubscription, 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 inStockNotificationSubscription Properties of a push notification to which the shopper subscribes. This notification sends the shopper an alert when a new product or a product previously out of stock becomes available in the specified location's active product inventory.
* @return com.mozu.api.contracts.customer.InStockNotificationSubscription
* @see com.mozu.api.contracts.customer.InStockNotificationSubscription
* @see com.mozu.api.contracts.customer.InStockNotificationSubscription
*/
public com.mozu.api.contracts.customer.InStockNotificationSubscription addInStockNotificationSubscription(com.mozu.api.contracts.customer.InStockNotificationSubscription inStockNotificationSubscription, String responseFields) throws Exception
{
MozuClient client = com.mozu.api.clients.commerce.InStockNotificationSubscriptionClient.addInStockNotificationSubscriptionClient( inStockNotificationSubscription, responseFields);
client.setContext(_apiContext);
client.executeRequest();
return client.getResult();
}
/**
*
*
* InStockNotificationSubscription instocknotificationsubscription = new InStockNotificationSubscription();
* Stream stream = instocknotificationsubscription.deleteInStockNotificationSubscription( id);
*
* @param id Unique identifier of the customer segment to retrieve.
* @return Stream
* @see Stream
*/
public java.io.InputStream deleteInStockNotificationSubscription(Integer id) throws Exception
{
MozuClient client = com.mozu.api.clients.commerce.InStockNotificationSubscriptionClient.deleteInStockNotificationSubscriptionClient( id);
client.setContext(_apiContext);
client.executeRequest();
return client.getResult();
}
}