/** * 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.urls.commerce; import com.mozu.api.MozuUrl; import com.mozu.api.utils.UrlFormatter; import org.joda.time.DateTime; public class OrderUrl { /** * Get Resource Url for GetOrders * @param filter A set of filter expressions representing the search parameters for a query. This parameter is optional. Refer to [Sorting and Filtering](../../../../Developer/applications/sorting-filtering.htm) for a list of supported filters. * @param pageSize The number of results to display on each page when creating paged results from a query. The maximum value is 200. * @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 Use this field to include those fields which are not included by default. * @param sortBy * @param startIndex * @return String Resource Url */ public static MozuUrl getOrdersUrl(String filter, Integer pageSize, String q, Integer qLimit, String responseFields, String sortBy, Integer startIndex) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&filter={filter}&q={q}&qLimit={qLimit}&responseFields={responseFields}"); formatter.formatUrl("filter", filter); formatter.formatUrl("pageSize", pageSize); formatter.formatUrl("q", q); formatter.formatUrl("qLimit", qLimit); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("sortBy", sortBy); formatter.formatUrl("startIndex", startIndex); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } /** * Get Resource Url for GetAvailableActions * @param orderId Unique identifier of the order. * @return String Resource Url */ public static MozuUrl getAvailableActionsUrl(String orderId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/actions"); formatter.formatUrl("orderId", orderId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } /** * Get Resource Url for GetTaxableOrders * @param orderId Unique identifier of the order. * @return String Resource Url */ public static MozuUrl getTaxableOrdersUrl(String orderId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/taxableorders"); formatter.formatUrl("orderId", orderId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } /** * Get Resource Url for GetOrder * @param draft If true, retrieve the draft version of the order, which might include uncommitted changes to the order or its components. * @param orderId Unique identifier of the order. * @param responseFields Use this field to include those fields which are not included by default. * @return String Resource Url */ public static MozuUrl getOrderUrl(Boolean draft, String orderId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}?draft={draft}&responseFields={responseFields}"); formatter.formatUrl("draft", draft); formatter.formatUrl("orderId", orderId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } /** * Get Resource Url for CreateOrderFromCart * @param cartId Identifier of the cart to delete. * @param responseFields Use this field to include those fields which are not included by default. * @return String Resource Url */ public static MozuUrl createOrderFromCartUrl(String cartId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/?cartId={cartId}&responseFields={responseFields}"); formatter.formatUrl("cartId", cartId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } /** * Get Resource Url for CreateOrder * @param responseFields Use this field to include those fields which are not included by default. * @return String Resource Url */ public static MozuUrl createOrderUrl(String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/?responseFields={responseFields}"); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } /** * Get Resource Url for PerformOrderAction * @param orderId Unique identifier of the order. * @param responseFields Use this field to include those fields which are not included by default. * @return String Resource Url */ public static MozuUrl performOrderActionUrl(String orderId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/actions?responseFields={responseFields}"); formatter.formatUrl("orderId", orderId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } /** * Get Resource Url for ProcessDigitalWallet * @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. * @return String Resource Url */ public static MozuUrl processDigitalWalletUrl(String digitalWalletType, String orderId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/digitalWallet/{digitalWalletType}?responseFields={responseFields}"); formatter.formatUrl("digitalWalletType", digitalWalletType); formatter.formatUrl("orderId", orderId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } /** * Get Resource Url for UpdateOrderDiscount * @param discountId discountId parameter description DOCUMENT_HERE * @param orderId Unique identifier of the order. * @param responseFields Use this field to include those fields which are not included by default. * @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 System-supplied integer that represents the current version of the order, which prevents users from unintentionally overriding changes to the order. When a user performs an operation for a defined order, the system validates that the version of the updated order matches the version of the order on the server. After the operation completes successfully, the system increments the version number by one. * @return String Resource Url */ public static MozuUrl updateOrderDiscountUrl(Integer discountId, String orderId, String responseFields, String updateMode, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/discounts/{discountId}?updatemode={updateMode}&version={version}&responseFields={responseFields}"); formatter.formatUrl("discountId", discountId); formatter.formatUrl("orderId", orderId); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("updateMode", updateMode); formatter.formatUrl("version", version); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } /** * Get Resource Url for DeleteOrderDraft * @param orderId Unique identifier of the order. * @param version Determines whether or not to check versioning of items for concurrency purposes. * @return String Resource Url */ public static MozuUrl deleteOrderDraftUrl(String orderId, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/draft?version={version}"); formatter.formatUrl("orderId", orderId); formatter.formatUrl("version", version); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } /** * Get Resource Url for ResendOrderConfirmationEmail * @param orderId Unique identifier of the order. * @return String Resource Url */ public static MozuUrl resendOrderConfirmationEmailUrl(String orderId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/email/resend"); formatter.formatUrl("orderId", orderId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } /** * Get Resource Url for ChangeOrderPriceList * @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. * @return String Resource Url */ public static MozuUrl changeOrderPriceListUrl(String orderId, String responseFields, String updateMode, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/priceList?updatemode={updateMode}&version={version}&responseFields={responseFields}"); formatter.formatUrl("orderId", orderId); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("updateMode", updateMode); formatter.formatUrl("version", version); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } /** * Get Resource Url for ChangeOrderUserId * @param orderId Unique identifier of the order. * @param responseFields Use this field to include those fields which are not included by default. * @return String Resource Url */ public static MozuUrl changeOrderUserIdUrl(String orderId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/users?responseFields={responseFields}"); formatter.formatUrl("orderId", orderId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } /** * Get Resource Url for UpdateOrder * @param orderId Unique identifier of the order. * @param responseFields Use this field to include those fields which are not included by default. * @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 System-supplied integer that represents the current version of the order, which prevents users from unintentionally overriding changes to the order. When a user performs an operation for a defined order, the system validates that the version of the updated order matches the version of the order on the server. After the operation completes successfully, the system increments the version number by one. * @return String Resource Url */ public static MozuUrl updateOrderUrl(String orderId, String responseFields, String updateMode, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}?updatemode={updateMode}&version={version}&responseFields={responseFields}"); formatter.formatUrl("orderId", orderId); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("updateMode", updateMode); formatter.formatUrl("version", version); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } }