All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.adyen.model.marketpay.AccountStatus Maven / Gradle / Ivy

There is a newer version: 28.4.0
Show newest version
/*
 *                       ######
 *                       ######
 * ############    ####( ######  #####. ######  ############   ############
 * #############  #####( ######  #####. ######  #############  #############
 *        ######  #####( ######  #####. ######  #####  ######  #####  ######
 * ###### ######  #####( ######  #####. ######  #####  #####   #####  ######
 * ###### ######  #####( ######  #####. ######  #####          #####  ######
 * #############  #############  #############  #############  #####  ######
 *  ############   ############  #############   ############  #####  ######
 *                                      ######
 *                               #############
 *                               ############
 *
 * Adyen Java API Library
 *
 * Copyright (c) 2017 Adyen B.V.
 * This file is open source and available under the MIT license.
 * See the LICENSE file for more info.
 */
package com.adyen.model.marketpay;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;

/**
 * AccountStatus
 */
public class AccountStatus {
    @SerializedName("status")
    private String status = null;

    @SerializedName("states")
    private List states = new ArrayList();

    @SerializedName("accountEvents")
    private List accountEvents = new ArrayList();

    public AccountStatus status(String status) {
        this.status = status;
        return this;
    }

    /**
     * account status
     *
     * @return status
     **/
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public AccountStatus states(List states) {
        this.states = states;
        return this;
    }

    public AccountStatus addStatesItem(AccountState statesItem) {
        this.states.add(statesItem);
        return this;
    }

    /**
     * account states
     *
     * @return states
     **/
    public List getStates() {
        return states;
    }

    public void setStates(List states) {
        this.states = states;
    }

    public AccountStatus accountEvents(List accountEvents) {
        this.accountEvents = accountEvents;
        return this;
    }

    public AccountStatus addAccountEventsItem(AccountEvent accountEventsItem) {
        this.accountEvents.add(accountEventsItem);
        return this;
    }

    /**
     * account events
     *
     * @return accountEvents
     **/
    public List getAccountEvents() {
        return accountEvents;
    }

    public void setAccountEvents(List accountEvents) {
        this.accountEvents = accountEvents;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        AccountStatus accountStatus = (AccountStatus) o;
        return Objects.equals(this.status, accountStatus.status) && Objects.equals(this.states, accountStatus.states) && Objects.equals(this.accountEvents, accountStatus.accountEvents);
    }

    @Override
    public int hashCode() {
        return Objects.hash(status, states, accountEvents);
    }


    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class AccountStatus {\n");

        sb.append("    status: ").append(toIndentedString(status)).append("\n");
        sb.append("    states: ").append(toIndentedString(states)).append("\n");
        sb.append("    accountEvents: ").append(toIndentedString(accountEvents)).append("\n");
        sb.append("}");
        return sb.toString();
    }

    /**
     * Convert the given object to string with each line indented by 4 spaces
     * (except the first line).
     */
    private String toIndentedString(Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy