001
002package com.commercetools.history.models.common;
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 * PaymentInfo
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class PaymentInfoImpl implements PaymentInfo, ModelBase {
022
023    private java.util.List<com.commercetools.history.models.common.Reference> payments;
024
025    /**
026     * create instance with all properties
027     */
028    @JsonCreator
029    PaymentInfoImpl(
030            @JsonProperty("payments") final java.util.List<com.commercetools.history.models.common.Reference> payments) {
031        this.payments = payments;
032    }
033
034    /**
035     * create empty instance
036     */
037    public PaymentInfoImpl() {
038    }
039
040    /**
041     *
042     */
043
044    public java.util.List<com.commercetools.history.models.common.Reference> getPayments() {
045        return this.payments;
046    }
047
048    public void setPayments(final com.commercetools.history.models.common.Reference... payments) {
049        this.payments = new ArrayList<>(Arrays.asList(payments));
050    }
051
052    public void setPayments(final java.util.List<com.commercetools.history.models.common.Reference> payments) {
053        this.payments = payments;
054    }
055
056    @Override
057    public boolean equals(Object o) {
058        if (this == o)
059            return true;
060
061        if (o == null || getClass() != o.getClass())
062            return false;
063
064        PaymentInfoImpl that = (PaymentInfoImpl) o;
065
066        return new EqualsBuilder().append(payments, that.payments).append(payments, that.payments).isEquals();
067    }
068
069    @Override
070    public int hashCode() {
071        return new HashCodeBuilder(17, 37).append(payments).toHashCode();
072    }
073
074}