com.mozu.api.resources.commerce.LocationResource 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 Location resource to retrieve details about a location from a hosted storefront.
*
*/
public class LocationResource {
///
///
///
private ApiContext _apiContext;
public LocationResource(ApiContext apiContext)
{
_apiContext = apiContext;
}
/**
*
*
* Location location = new Location();
* Location location = location.getLocation( locationCode);
*
* @param locationCode The unique, user-defined code that identifies a location.
* @return com.mozu.api.contracts.location.Location
* @see com.mozu.api.contracts.location.Location
*/
public com.mozu.api.contracts.location.Location getLocation(String locationCode) throws Exception
{
return getLocation( locationCode, null, null);
}
/**
*
*
* Location location = new Location();
* Location location = location.getLocation( locationCode, includeAttributeDefinition, responseFields);
*
* @param includeAttributeDefinition True if you want to include the custom attribute defintion for the location.
* @param locationCode The unique, user-defined code that identifies a location.
* @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.location.Location
* @see com.mozu.api.contracts.location.Location
*/
public com.mozu.api.contracts.location.Location getLocation(String locationCode, Boolean includeAttributeDefinition, String responseFields) throws Exception
{
MozuClient client = com.mozu.api.clients.commerce.LocationClient.getLocationClient( locationCode, includeAttributeDefinition, responseFields);
client.setContext(_apiContext);
client.executeRequest();
return client.getResult();
}
/**
*
*
* Location location = new Location();
* LocationCollection locationCollection = location.getLocationsInUsageType( locationUsageType);
*
* @param locationUsageType System-defined location usage type code, which is DS for direct ship, SP for in-store pickup, or storeFinder.
* @return com.mozu.api.contracts.location.LocationCollection
* @see com.mozu.api.contracts.location.LocationCollection
*/
public com.mozu.api.contracts.location.LocationCollection getLocationsInUsageType(String locationUsageType) throws Exception
{
return getLocationsInUsageType( locationUsageType, null, null, null, null, null, null);
}
/**
*
*
* Location location = new Location();
* LocationCollection locationCollection = location.getLocationsInUsageType( locationUsageType, startIndex, pageSize, sortBy, filter, includeAttributeDefinition, 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 includeAttributeDefinition True if you want to include the custom attribute defintion for the location.
* @param locationUsageType System-defined location usage type code, which is DS for direct ship, SP for in-store pickup, or storeFinder.
* @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.location.LocationCollection
* @see com.mozu.api.contracts.location.LocationCollection
*/
public com.mozu.api.contracts.location.LocationCollection getLocationsInUsageType(String locationUsageType, Integer startIndex, Integer pageSize, String sortBy, String filter, Boolean includeAttributeDefinition, String responseFields) throws Exception
{
MozuClient client = com.mozu.api.clients.commerce.LocationClient.getLocationsInUsageTypeClient( locationUsageType, startIndex, pageSize, sortBy, filter, includeAttributeDefinition, responseFields);
client.setContext(_apiContext);
client.executeRequest();
return client.getResult();
}
/**
*
*
* Location location = new Location();
* Location location = location.getDirectShipLocation();
*
* @return com.mozu.api.contracts.location.Location
* @see com.mozu.api.contracts.location.Location
*/
public com.mozu.api.contracts.location.Location getDirectShipLocation() throws Exception
{
return getDirectShipLocation( null, null);
}
/**
*
*
* Location location = new Location();
* Location location = location.getDirectShipLocation( includeAttributeDefinition, responseFields);
*
* @param includeAttributeDefinition
* @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.location.Location
* @see com.mozu.api.contracts.location.Location
*/
public com.mozu.api.contracts.location.Location getDirectShipLocation(Boolean includeAttributeDefinition, String responseFields) throws Exception
{
MozuClient client = com.mozu.api.clients.commerce.LocationClient.getDirectShipLocationClient( includeAttributeDefinition, responseFields);
client.setContext(_apiContext);
client.executeRequest();
return client.getResult();
}
/**
*
*
* Location location = new Location();
* Location location = location.getInStorePickupLocation( locationCode);
*
* @param locationCode The unique, user-defined code that identifies a location.
* @return com.mozu.api.contracts.location.Location
* @see com.mozu.api.contracts.location.Location
*/
public com.mozu.api.contracts.location.Location getInStorePickupLocation(String locationCode) throws Exception
{
return getInStorePickupLocation( locationCode, null, null);
}
/**
*
*
* Location location = new Location();
* Location location = location.getInStorePickupLocation( locationCode, includeAttributeDefinition, responseFields);
*
* @param includeAttributeDefinition True if you want to include the custom attribute definition for the location.
* @param locationCode The unique, user-defined code that identifies a location.
* @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.location.Location
* @see com.mozu.api.contracts.location.Location
*/
public com.mozu.api.contracts.location.Location getInStorePickupLocation(String locationCode, Boolean includeAttributeDefinition, String responseFields) throws Exception
{
MozuClient client = com.mozu.api.clients.commerce.LocationClient.getInStorePickupLocationClient( locationCode, includeAttributeDefinition, responseFields);
client.setContext(_apiContext);
client.executeRequest();
return client.getResult();
}
/**
*
*
* Location location = new Location();
* LocationCollection locationCollection = location.getInStorePickupLocations();
*
* @return com.mozu.api.contracts.location.LocationCollection
* @see com.mozu.api.contracts.location.LocationCollection
*/
public com.mozu.api.contracts.location.LocationCollection getInStorePickupLocations() throws Exception
{
return getInStorePickupLocations( null, null, null, null, null, null);
}
/**
*
*
* Location location = new Location();
* LocationCollection locationCollection = location.getInStorePickupLocations( startIndex, pageSize, sortBy, filter, includeAttributeDefinition, 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 includeAttributeDefinition True if you want to include the custom attribute definition for the location.
* @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.location.LocationCollection
* @see com.mozu.api.contracts.location.LocationCollection
*/
public com.mozu.api.contracts.location.LocationCollection getInStorePickupLocations(Integer startIndex, Integer pageSize, String sortBy, String filter, Boolean includeAttributeDefinition, String responseFields) throws Exception
{
MozuClient client = com.mozu.api.clients.commerce.LocationClient.getInStorePickupLocationsClient( startIndex, pageSize, sortBy, filter, includeAttributeDefinition, responseFields);
client.setContext(_apiContext);
client.executeRequest();
return client.getResult();
}
}