<?php

namespace Ezypay\Object;

/**
 * Class Customer
 *
 * Customer object class
 *
 * @package Ezypay\Object
 */
class Customer
{
    /**
     * @var string The ID of the customer. A unique identifier generated by the system.
     */
    private $customerId;
    /**
     * @var string Customer's first name.
     */
    private $firstName ;
    /**
     * @var string Customer's last name.
     */
    private $surname;
    /**
     * @var string Customer's email address.
     */
    private $email;
    /**
     * @var string Customer's gender.
     */
    private $gender;
    /**
     * @var string Customer's date of birth.
     */
    private $dateOfBirth;
    /**
     * @var string Customer's company name.
     */
    private $companyName;
    /**
     * @var string The ID of the merchant. A unique identifier to filter customers that belong to a merchant.
     */
    private $merchantId;
    /**
     * @var integer Customer's unique number.
     */
    private $customerNumber;
    /**
     * @var string Customer's home phone number.
     */
    private $homePhone;
    /**
     * @var string Customer's mobile phone number.
     */
    private $mobilePhone;
    /**
     * @var string The reference ID of the customer. A unique identifier from a third-party software integration.
     */
    private $referenceId;
    /**
     * @var array[string]Customer's statuses.
     */
  //  private $customerStatuses;
    /**
     * @var  $address array CustomerAddressResultCustomer's address.
     */
    private $address;
    /**
     * @var array[PaymentMethodResult]Customer's payment methods.
     */
    //private $paymentMethods;
    /**
     * @var array[SubscriptionResult]Customer's subscriptions.
     */
    //private $subscriptions;
    /**
     * @var string Date record is created.
     */
    private $createdOn;

    /**
     * Customer constructor.
     * @param $data array
     */
    function __construct($data)
    {
        foreach ( $data as $key => $value ){
            $this->$key = $value;
        }
    }

    /**
     * fullName
     *
     * Return full nema for customer
     *
     * @return string
     */
    public function fullName(){
        return $this->firstName . ' ' . $this->surname;
    }

    /**
     * Return customer first name
     *
     * @return string
     */
    public function getFirstName(){
        return $this->firstName;
    }

    /**
     * Return customer surname
     *
     * @return string
     */
    public function getSurname(){
        return $this->surname;
    }

    /**
     * Return customer email
     *
     * @return string
     */
    public function getEmail(){
        return $this->email;
    }

    /**
     * Return customer ID (ezypay ID)
     *
     * @return string return ezypay id
     */
    public function getCustomerId(){
        return $this->customerId;
    }

    /**
     * Return customer reference ID
     * 
     * @return string return refernece ID
     */
    public function getrefernceId(){
        return $this->referenceId;
    }
}
