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

com.braintreegateway.IndividualDetails Maven / Gradle / Ivy

There is a newer version: 3.32.0_1
Show newest version
package com.braintreegateway;

import com.braintreegateway.util.NodeWrapper;

public final class IndividualDetails {
    private final String firstName;
    private final String lastName;
    private final String dateOfBirth;
    private final String email;
    private final String phone;
    private final Address address;
    private final String ssnLast4;

    public IndividualDetails(NodeWrapper node) {
        firstName = node.findString("first-name");
        lastName = node.findString("last-name");
        dateOfBirth = node.findString("date-of-birth");
        email = node.findString("email");
        phone = node.findString("phone");
        ssnLast4 = node.findString("ssn-last-4");
        NodeWrapper addressNode = node.findFirst("address");
        if (addressNode != null) {
            this.address = new Address(addressNode);
        } else {
            this.address = null;
        }
    }

    public String getFirstName() {
        return firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public String getDateOfBirth() {
        return dateOfBirth;
    }

    public String getEmail() {
        return email;
    }

    public String getPhone() {
        return phone;
    }

    public Address getAddress() {
        return address;
    }

    public String getSsnLast4() {
        return ssnLast4;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy