001 002package com.commercetools.api.models.order_edit; 003 004import java.time.*; 005import java.util.*; 006 007import com.fasterxml.jackson.annotation.JsonCreator; 008import com.fasterxml.jackson.annotation.JsonProperty; 009import com.fasterxml.jackson.databind.annotation.*; 010 011import io.vrap.rmf.base.client.ModelBase; 012import io.vrap.rmf.base.client.utils.Generated; 013 014import org.apache.commons.lang3.builder.EqualsBuilder; 015import org.apache.commons.lang3.builder.HashCodeBuilder; 016 017/** 018 * <p>Setting the Order's <code>customerId</code> does not recalculate prices or discounts on the Order. If the Customer belongs to a Customer Group, <code>customerGroup</code> on the Order is updated automatically.</p> 019 * <p>Produces the OrderCustomerSet Message.</p> 020 */ 021@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 022public class StagedOrderSetCustomerIdActionImpl implements StagedOrderSetCustomerIdAction, ModelBase { 023 024 private String action; 025 026 private String customerId; 027 028 /** 029 * create instance with all properties 030 */ 031 @JsonCreator 032 StagedOrderSetCustomerIdActionImpl(@JsonProperty("customerId") final String customerId) { 033 this.customerId = customerId; 034 this.action = SET_CUSTOMER_ID; 035 } 036 037 /** 038 * create empty instance 039 */ 040 public StagedOrderSetCustomerIdActionImpl() { 041 this.action = SET_CUSTOMER_ID; 042 } 043 044 /** 045 * 046 */ 047 048 public String getAction() { 049 return this.action; 050 } 051 052 /** 053 * <p><code>id</code> of an existing Customer. If empty, any existing value is removed.</p> 054 */ 055 056 public String getCustomerId() { 057 return this.customerId; 058 } 059 060 public void setCustomerId(final String customerId) { 061 this.customerId = customerId; 062 } 063 064 @Override 065 public boolean equals(Object o) { 066 if (this == o) 067 return true; 068 069 if (o == null || getClass() != o.getClass()) 070 return false; 071 072 StagedOrderSetCustomerIdActionImpl that = (StagedOrderSetCustomerIdActionImpl) o; 073 074 return new EqualsBuilder().append(action, that.action) 075 .append(customerId, that.customerId) 076 .append(action, that.action) 077 .append(customerId, that.customerId) 078 .isEquals(); 079 } 080 081 @Override 082 public int hashCode() { 083 return new HashCodeBuilder(17, 37).append(action).append(customerId).toHashCode(); 084 } 085 086}