/*
 * 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.math.BigDecimal;
import java.util.Date;

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

import com.google.gson.annotations.SerializedName;

@Getter
@Setter
@ToString
public class Customer {

    private String name;

    private String id;

    private String email;

    @SerializedName("last_name")
    private String lastName;

    @SerializedName("phone_number")
    private String phoneNumber;

    private Address address;

    private String status;

    private BigDecimal balance;

	@SerializedName("external_id")
	private String externalId;

    @SerializedName("creation_date")
    private Date creationDate;

    /**
     * Customer first or only name. Required.
     */
    public Customer name(final String name) {
        this.name = name;
        return this;
    }

    /**
     * Customer last name. Optional.
     */
    public Customer lastName(final String lastName) {
        this.lastName = lastName;
        return this;
    }

    /**
     * Customer email. Required.
     */
    public Customer email(final String email) {
        this.email = email;
        return this;
    }

    /**
     * Customer phone number. Optional
     */
    public Customer phoneNumber(final String phoneNumber) {
        this.phoneNumber = phoneNumber;
        return this;
    }

    /**
     * Customer address. Optional.
     */
    public Customer address(final Address address) {
        this.address = address;
        return this;
    }

	public Customer externalId(final String externalId) {
		this.externalId = externalId;
		return this;
	}

}

@@ -1198,24 +1198,96 @@
 xternalId;%0A%0A
+%09@SerializedName(%22requires_account%22)%0A%09private boolean requiresAccount;%0A%0A
     @Seriali
@@ -2174,16 +2174,60 @@
 %0A    %7D%0A%0A
+%09/**%0A%09 * Customer externaId. Optional.%0A%09 */%0A
 %09public 
@@ -2324,10 +2324,202 @@
 is;%0A%09%7D%0A%0A
+%09/**%0A%09 * Customer requires account. Optional. Default true.%0A%09 */%0A%09public Customer requiresAccount(final boolean requiresAccount) %7B%0A%09%09this.requiresAccount = requiresAccount;%0A%09%09return this;%0A%09%7D%0A%0A
 %7D%0A

Add requiresAccount