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

br.com.moip.request.TransferInstrumentRequest Maven / Gradle / Ivy

There is a newer version: 4.7.6
Show newest version
package br.com.moip.request;

public class TransferInstrumentRequest {

    private Method method;
    private BankAccountRequest bankAccount;
    private MoipAccountRequest moipAccount;

    public TransferInstrumentRequest bankAccount(BankAccountRequest bankAccount) {
        this.method = Method.BANK_ACCOUNT;
        this.bankAccount = bankAccount;

        return this;
    }

    public TransferInstrumentRequest moipAccount(MoipAccountRequest moipAccount) {
        this.method = Method.MOIP_ACCOUNT;
        this.moipAccount = moipAccount;

        return this;
    }

    public enum Method{
        BANK_ACCOUNT, MOIP_ACCOUNT
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("TransferInstrument{");
        sb.append("method=").append(method);
        sb.append(", bankAccount=").append(bankAccount);
        sb.append(", moipAccount=").append(moipAccount);
        sb.append('}');
        return sb.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy