public class CartLinkBuilder extends java.lang.Object implements LinkBuilder<Cart>
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
COUPON_ADD_EP6_LINK_REL |
private static java.lang.String |
COUPON_ADD_LINK_REL |
private static java.lang.String |
REMOVE_COUPON_LINK_REL |
private static java.lang.String |
SHIPPING_METHOD_LINK_REL |
Constructor and Description |
---|
CartLinkBuilder() |
Modifier and Type | Method and Description |
---|---|
java.util.List<Link> |
get(ShopRequestContext shopRequestContext,
Cart cart) |
private java.lang.String |
getCartHref(ShopRequestContext shopRequestContext,
GUID cartId) |
private java.lang.String |
getCouponLineItemHref(ShopRequestContext shopRequestContext,
GUID cartId) |
private java.lang.String |
getCouponLineItemHref(ShopRequestContext shopRequestContext,
GUID cartId,
GUID couponLineItemId) |
private java.util.Optional<Link> |
getCouponLink(ShopRequestContext shopRequestContext,
Cart cart) |
private java.lang.String |
getShippingMethodHref(ShopRequestContext shopRequestContext,
GUID shippingMethodId) |
private java.util.Optional<Link> |
getShippingMethodLink(ShopRequestContext shopRequestContext,
Cart cart) |
private static final java.lang.String SHIPPING_METHOD_LINK_REL
private static final java.lang.String COUPON_ADD_EP6_LINK_REL
private static final java.lang.String COUPON_ADD_LINK_REL
private static final java.lang.String REMOVE_COUPON_LINK_REL
public java.util.List<Link> get(ShopRequestContext shopRequestContext, Cart cart)
get
in interface LinkBuilder<Cart>
private java.util.Optional<Link> getCouponLink(ShopRequestContext shopRequestContext, Cart cart)
private java.lang.String getCartHref(ShopRequestContext shopRequestContext, GUID cartId)
private java.lang.String getCouponLineItemHref(ShopRequestContext shopRequestContext, GUID cartId)
private java.lang.String getCouponLineItemHref(ShopRequestContext shopRequestContext, GUID cartId, GUID couponLineItemId)
private java.util.Optional<Link> getShippingMethodLink(ShopRequestContext shopRequestContext, Cart cart)
private java.lang.String getShippingMethodHref(ShopRequestContext shopRequestContext, GUID shippingMethodId)