示例#1
0
 /**
  * Deletes the location specified in the request.
  *
  * <p>
  *
  * <pre><code>
  * MozuClient mozuClient=DeleteLocationClient( locationCode);
  * client.setBaseAddress(url);
  * client.executeRequest();
  * </code></pre>
  *
  * @param locationCode The unique, user-defined code that identifies a location.
  * @return Mozu.Api.MozuClient
  */
 public static MozuClient deleteLocationClient(String locationCode) throws Exception {
   MozuUrl url = com.mozu.api.urls.commerce.admin.LocationUrl.deleteLocationUrl(locationCode);
   String verb = "DELETE";
   MozuClient mozuClient = (MozuClient) MozuClientFactory.getInstance();
   mozuClient.setVerb(verb);
   mozuClient.setResourceUrl(url);
   return mozuClient;
 }
示例#2
0
 /**
  * Creates a new physical location for the tenant specified in the request header.
  *
  * <p>
  *
  * <pre><code>
  * MozuClient<com.mozu.api.contracts.location.Location> mozuClient=AddLocationClient( location,  responseFields);
  * client.setBaseAddress(url);
  * client.executeRequest();
  * Location location = client.Result();
  * </code></pre>
  *
  * @param responseFields A list or array of fields returned for a call. These fields may be
  *     customized and may be used for various types of data calls in Mozu. For example,
  *     responseFields are returned for retrieving or updating attributes, carts, and messages in
  *     Mozu.
  * @param location Properties of a physical location a tenant uses to manage inventory and
  *     fulfills orders, provide store finder functionality, or both.
  * @return Mozu.Api.MozuClient <com.mozu.api.contracts.location.Location>
  * @see com.mozu.api.contracts.location.Location
  * @see com.mozu.api.contracts.location.Location
  */
 public static MozuClient<com.mozu.api.contracts.location.Location> addLocationClient(
     com.mozu.api.contracts.location.Location location, String responseFields) throws Exception {
   MozuUrl url = com.mozu.api.urls.commerce.admin.LocationUrl.addLocationUrl(responseFields);
   String verb = "POST";
   Class<?> clz = com.mozu.api.contracts.location.Location.class;
   MozuClient<com.mozu.api.contracts.location.Location> mozuClient =
       (MozuClient<com.mozu.api.contracts.location.Location>) MozuClientFactory.getInstance(clz);
   mozuClient.setVerb(verb);
   mozuClient.setResourceUrl(url);
   mozuClient.setBody(location);
   return mozuClient;
 }
示例#3
0
 /**
  * Retrieves a list of all locations associated with a tenant, according to any filter and sort
  * criteria specified in the request.
  *
  * <p>
  *
  * <pre><code>
  * MozuClient<com.mozu.api.contracts.location.LocationCollection> mozuClient=GetLocationsClient( startIndex,  pageSize,  sortBy,  filter,  responseFields);
  * client.setBaseAddress(url);
  * client.executeRequest();
  * LocationCollection locationCollection = client.Result();
  * </code></pre>
  *
  * @param filter A set of expressions that consist of a field, operator, and value and represent
  *     search parameter syntax when filtering results of a query. Valid operators include equals
  *     (eq), does not equal (ne), greater than (gt), less than (lt), greater than or equal to
  *     (ge), less than or equal to (le), starts with (sw), or contains (cont). For example -
  *     "filter=IsDisplayed+eq+true"
  * @param pageSize The number of results to display on each page when creating paged results from
  *     a query. The maximum value is 200.
  * @param responseFields Use this field to include those fields which are not included by default.
  * @param sortBy The property by which to sort results and whether the results appear in ascending
  *     (a-z) order, represented by ASC or in descending (z-a) order, represented by DESC. The
  *     sortBy parameter follows an available property. For example: "sortBy=productCode+asc"
  * @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 a
  *     PageSize of 25, to get the 51st through the 75th items, use startIndex=3.
  * @return Mozu.Api.MozuClient <com.mozu.api.contracts.location.LocationCollection>
  * @see com.mozu.api.contracts.location.LocationCollection
  */
 public static MozuClient<com.mozu.api.contracts.location.LocationCollection> getLocationsClient(
     Integer startIndex, Integer pageSize, String sortBy, String filter, String responseFields)
     throws Exception {
   MozuUrl url =
       com.mozu.api.urls.commerce.admin.LocationUrl.getLocationsUrl(
           filter, pageSize, responseFields, sortBy, startIndex);
   String verb = "GET";
   Class<?> clz = com.mozu.api.contracts.location.LocationCollection.class;
   MozuClient<com.mozu.api.contracts.location.LocationCollection> mozuClient =
       (MozuClient<com.mozu.api.contracts.location.LocationCollection>)
           MozuClientFactory.getInstance(clz);
   mozuClient.setVerb(verb);
   mozuClient.setResourceUrl(url);
   return mozuClient;
 }