001 002package com.commercetools.api.models.cart; 003 004import java.time.*; 005import java.util.*; 006 007import com.fasterxml.jackson.annotation.JsonCreator; 008import com.fasterxml.jackson.databind.annotation.*; 009 010import io.vrap.rmf.base.client.ModelBase; 011import io.vrap.rmf.base.client.utils.Generated; 012 013import org.apache.commons.lang3.builder.EqualsBuilder; 014import org.apache.commons.lang3.builder.HashCodeBuilder; 015 016/** 017 * <p>Changes the CartState from <code>Active</code> to <code>Frozen</code>. Results in a Frozen Cart. Fails with InvalidOperation error when the Cart is empty.</p> 018 */ 019@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 020public class CartFreezeCartActionImpl implements CartFreezeCartAction, ModelBase { 021 022 private String action; 023 024 /** 025 * create instance with all properties 026 */ 027 @JsonCreator 028 CartFreezeCartActionImpl() { 029 this.action = FREEZE_CART; 030 } 031 032 /** 033 * 034 */ 035 036 public String getAction() { 037 return this.action; 038 } 039 040 @Override 041 public boolean equals(Object o) { 042 if (this == o) 043 return true; 044 045 if (o == null || getClass() != o.getClass()) 046 return false; 047 048 CartFreezeCartActionImpl that = (CartFreezeCartActionImpl) o; 049 050 return new EqualsBuilder().append(action, that.action).isEquals(); 051 } 052 053 @Override 054 public int hashCode() { 055 return new HashCodeBuilder(17, 37).append(action).toHashCode(); 056 } 057 058}