package co.paystack.android.model;

import android.util.Patterns;

import co.paystack.android.exceptions.InvalidEmailException;

/**
 * Created by i on 24/08/2016.
 */
public class Charge extends PaystackModel {
    private Card card;
    private String pin;
    private String email;
    private int amount;

    public Card getCard() {
        return card;
    }

    public Charge setCard(Card card) {
        this.card = card;
        return this;
    }

    public String getPin() {
        return pin;
    }

    public Charge setPin(String pin) {
        this.pin = pin;
        return this;
    }

    public String getEmail() {
        return email;
    }

    public Charge setEmail(String email) {
        if (!Patterns.EMAIL_ADDRESS.matcher(email).matches()) {
            throw new InvalidEmailException(email);
        }
        this.email = email;
        return this;
    }

    public int getAmount() {
        return amount;
    }

    public Charge setAmount(int amount) {
        this.amount = amount;
        return this;
    }
}

@@ -232,32 +232,8 @@
 rd;%0A
-    private String pin;%0A
     
@@ -432,155 +432,8 @@
  %7D%0A%0A
-    public String getPin() %7B%0A        return pin;%0A    %7D%0A%0A    public Charge setPin(String pin) %7B%0A        this.pin = pin;%0A        return this;%0A    %7D%0A%0A
     

Remove pin from Charge Model