/** * 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.orders; import com.mozu.api.MozuUrl; import com.mozu.api.utils.UrlFormatter; import org.joda.time.DateTime; public class AppliedDiscountUrl { /** * Get Resource Url for ApplyCoupon * @param couponCode Alphanumeric code associated with the coupon or promotion that results in a discounted price. * @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 applyCouponUrl(String couponCode, String orderId, String responseFields, String updateMode, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/coupons/{couponCode}?updatemode={updateMode}&version={version}&responseFields={responseFields}"); formatter.formatUrl("couponCode", couponCode); 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 RemoveCoupon * @param couponCode Alphanumeric code associated with the coupon or promotion that results in a discounted price. * @param orderId Unique identifier of the order. * @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 removeCouponUrl(String couponCode, String orderId, String updateMode, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/coupons/{couponcode}?updatemode={updateMode}&version={version}"); formatter.formatUrl("couponCode", couponCode); formatter.formatUrl("orderId", orderId); formatter.formatUrl("updateMode", updateMode); formatter.formatUrl("version", version); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } /** * Get Resource Url for RemoveCoupons * @param orderId Unique identifier of the order. * @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 removeCouponsUrl(String orderId, String updateMode, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/coupons?updatemode={updateMode}&version={version}"); formatter.formatUrl("orderId", orderId); formatter.formatUrl("updateMode", updateMode); formatter.formatUrl("version", version); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } }