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

mx.openpay.client.BankAccount Maven / Gradle / Ivy

There is a newer version: 1.7.4
Show newest version
/*
 * Copyright 2013 Opencard Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package mx.openpay.client;

import java.util.Date;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import com.google.gson.annotations.SerializedName;

/**
 * Represents the Bank Account of either a Customer or the Merchant.
 * @author elopez
 */
@Getter
@Setter
@ToString
public class BankAccount {

    /** Identifier. This field is autogenerated by Openpay. */
    private String id;

    /** Name of the bank. This field is filled by Openpay. */
    @SerializedName("bank_name")
    private String bankName;

    /** Name of the bank account's owner. Required. */
    @SerializedName("holder_name")
    private String holderName;

    /** CLABE of the account. Required. */
    private String clabe;

    /** An optional name to assign to the account. Optional. */
    private String alias;

    /** The Bank Code of the account. This field is filled by Openpay. */
    @SerializedName("bank_code")
    private String bankCode;

    /** The date the Bank Account was registered in Openpay. This field is filled by Openpay. */
    @SerializedName("creation_date")
    private Date creationDate;

    /**
     * Name of the bank account's owner. Required.
     */
    public BankAccount holderName(final String holderName) {
        this.holderName = holderName;
        return this;
    }

    /**
     * Bank account's CLABE. Required. See this for an explanation.
     */
    public BankAccount clabe(final String clabe) {
        this.clabe = clabe;
        return this;
    }

    /**
     * An alias to identify the bank account. Optional.
     */
    public BankAccount alias(final String alias) {
        this.alias = alias;
        return this;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy