001 002package com.commercetools.api.models.me; 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 * <ul> 019 * <li>When <code>External</code> TaxMode is changed to <code>Platform</code> or <code>Disabled</code>, all previously set external Tax Rates are removed.</li> 020 * <li>When set to <code>Platform</code>, Line Items, Custom Line Items, and Shipping Method require a Tax Category with a Tax Rate for the Cart's <code>shippingAddress</code>.</li> 021 * </ul> 022 */ 023@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 024public class MyCartChangeTaxModeActionImpl implements MyCartChangeTaxModeAction, ModelBase { 025 026 private String action; 027 028 private com.commercetools.api.models.cart.TaxMode taxMode; 029 030 /** 031 * create instance with all properties 032 */ 033 @JsonCreator 034 MyCartChangeTaxModeActionImpl(@JsonProperty("taxMode") final com.commercetools.api.models.cart.TaxMode taxMode) { 035 this.taxMode = taxMode; 036 this.action = CHANGE_TAX_MODE; 037 } 038 039 /** 040 * create empty instance 041 */ 042 public MyCartChangeTaxModeActionImpl() { 043 this.action = CHANGE_TAX_MODE; 044 } 045 046 /** 047 * 048 */ 049 050 public String getAction() { 051 return this.action; 052 } 053 054 /** 055 * <p>The new TaxMode.</p> 056 */ 057 058 public com.commercetools.api.models.cart.TaxMode getTaxMode() { 059 return this.taxMode; 060 } 061 062 public void setTaxMode(final com.commercetools.api.models.cart.TaxMode taxMode) { 063 this.taxMode = taxMode; 064 } 065 066 @Override 067 public boolean equals(Object o) { 068 if (this == o) 069 return true; 070 071 if (o == null || getClass() != o.getClass()) 072 return false; 073 074 MyCartChangeTaxModeActionImpl that = (MyCartChangeTaxModeActionImpl) o; 075 076 return new EqualsBuilder().append(action, that.action).append(taxMode, that.taxMode).isEquals(); 077 } 078 079 @Override 080 public int hashCode() { 081 return new HashCodeBuilder(17, 37).append(action).append(taxMode).toHashCode(); 082 } 083 084}