<?php
namespace Cielo\API30\Ecommerce;

class ExternalAuthentication implements \JsonSerializable
{

    private $cavv;

    private $xid;

    private $eci;

    private $version;

    private $referenceID;

    public function jsonSerialize()
    {
        return get_object_vars($this);
    }

    public function populate(\stdClass $data)
    {
        $this->cavv = isset($data->Cavv) ? $data->Cavv: null;
        $this->xid = isset($data->Xid) ? $data->Xid: null;
        $this->eci = isset($data->Eci) ? $data->Eci: null;
        $this->version = isset($data->Version) ? $data->Version: null;
        $this->referenceID = isset($data->ReferenceID) ? $data->ReferenceID: false;

    }

    public function getCavv()
    {
        return $this->cavv;
    }

    public function setCavv($cavv)
    {
        $this->cavv = $cavv;
        return $this;
    }

    public function getXid()
    {
        return $this->xid;
    }

    public function setXid($xid)
    {
        $this->xid = $xid;
        return $this;
    }

    public function getEci()
    {
        return $this->eci;
    }

    public function setEci($eci)
    {
        $this->eci = $eci;
        return $this;
    }

    public function getVersion()
    {
        return $this->version;
    }

    public function setVersion($version)
    {
        $this->version = $version;
        return $this;
    }

    public function getReferenceID()
    {
        return $this->referenceID;
    }

    public function setReferenceID($referenceID)
    {
        $this->referenceID = $referenceID;
        return $this;
    }
 
}