<?php
  include_once "../models/ClienteClass.php";

class ClienteCtl
{
    private $Cliente;

    private $codContaBancaria;

    private $cliId;
    private $bcoId;
    private $cliNomeRazao;
    private $cliFantasia;
    private $cliCpfCnpj;
    private $cliCpf;
    private $cliTipo;
    private $cliDataNascimento;
    private $cliSexo;
    private $cliRg;
    private $cliOrgaoEmissor;
    private $cliDataEmissaoRg;
    private $cliEmail;
    private $cliTelefone;
    private $cliNomePai;
    private $cliNomeMae;
    private $cliEstadoCivil;
    private $cliCodCbo;
    private $cliDescricaoCbo;
    private $cliPpe;

    private $cliLogradouro;
    private $cliNumero;
    private $cliComplemento;
    private $cliBairro;
    private $cliCidade;
    private $cliEstado;
    private $cliCep;

    private $cliDataAlteracao;
    private $cliStatus;

    private $cliSelfie;
    private $cliDocFrente;
    private $cliDocVerso;
    private $cliCompEndereco;

    private $cliDeviceId;

    private $cliSenha;
    private $cliSenhaPin;

    private $cliMostraSaldo;

    private $cliLoginBio;

    private $cliAgencia;
    private $cliConta;

    private $cliPushId;
    private $cliObs;
    private $cliRetornoKyc;

    private $planosId;

    private $cliRecebOutraConta;
    private $cliDepBanco;
    private $cliDepAgencia;
    private $cliDepConta;
    private $cliFaturamento;
    private $cliQtdeMaquinas;

    private $cliPolo;
    private $cliRepresentante;
    private $cliIdResponsavel;

    private $cliTipoTabela;
    private $cliTabela;
    private $cliCdxExpress;

    private $cliMcc;
    private $cliSoftDescriptor;

    private $retorno;
    private $mensagemRetorno;

    public function __construct()
    {
        $this->Cliente = new ClienteClass();
    }

    public function getClientePorId()
    {
        $this->Cliente->setCliId($this->getCliId());
        $resultado = $this->Cliente->getClientePorId();

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function getClientePorAtarId()
    {
        $this->Cliente->setCodContaBancaria($this->getCodContaBancaria());
        $resultado = $this->Cliente->getClientePorAtarId();

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function getClientePorAdgIdBcoId()
    {
        $this->Cliente->setCodContaBancaria($this->getCodContaBancaria());
        $this->Cliente->setBcoId($this->getBcoId());
        $resultado = $this->Cliente->getClientePorAdgIdBcoId();

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function getClientePorCpf()
    {
        $this->Cliente->setCliCpfCnpj($this->getCliCpfCnpj());
        $this->Cliente->setBcoId($this->getBcoId());
        $resultado = $this->Cliente->getClientePorCpf();

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function getClientePorCpfTodos()
    {
        $this->Cliente->setCliCpfCnpj($this->getCliCpfCnpj());
        $this->Cliente->setBcoId($this->getBcoId());
        $resultado = $this->Cliente->getClientePorCpfTodos();

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function getClientePorCpfEmail()
    {
        $this->Cliente->setCliCpfCnpj($this->getCliCpfCnpj());
        $this->Cliente->setBcoId($this->getBcoId());
        $this->Cliente->setCliEmail($this->getCliEmail());
        $resultado = $this->Cliente->getClientePorCpfEmail();

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function getClientePorTelefone()
    {
        $this->Cliente->setCliTelefone($this->getCliTelefone());
        $this->Cliente->setBcoId($this->getBcoId());
        $resultado = $this->Cliente->getClientePorTelefone();

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function getClientePorDeviceId()
    {
        $this->Cliente->setCliDeviceId($this->getCliDeviceId());
        $this->Cliente->setBcoId($this->getBcoId());
        $resultado = $this->Cliente->getClientePorDeviceId();

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function listarTodos()
    {
        $resultado = $this->Cliente->listarTodos();

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function listarTodosPorAdmId($admId)
    {
        $resultado = $this->Cliente->listarTodosPorAdmId($admId);

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function listarAtivos()
    {
        $resultado = $this->Cliente->listarAtivos();

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function listarPolosAtivos()
    {
        $resultado = $this->Cliente->listarPolosAtivos();

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function adicionarConta()
    {
        $this->Cliente->setCliId($this->getCliId());
        $this->Cliente->setCodContaBancaria($this->getCodContaBancaria());
        $resultado = $this->Cliente->adicionarConta();

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function retornoKyc()
    {
        $this->Cliente->setCliId($this->getCliId());
        $this->Cliente->setCliRetornoKyc($this->getCliRetornoKyc());
        $resultado = $this->Cliente->retornoKyc();

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function inserir()
    {
        $resultado = null;

        if (empty($this->getCliNomeRazao())){
            $this->setRetorno('ERRO');
            $this->setMensagemRetorno('Nome do Cliente não pode estar vazio.');
            return $resultado;
        }

        if (empty($this->getCliCpfCnpj())){
            $this->setRetorno('ERRO');
            $this->setMensagemRetorno('CPF ou CNPJ não pode estar vazio.');
            return $resultado;
        }

        if (empty($this->getCliTipo())){
            $this->setRetorno('ERRO');
            $this->setMensagemRetorno('Tipo de Cliente não pode estar vazio.');
            return $resultado;
        }

        if (empty($this->getCliEmail())){
            $this->setRetorno('ERRO');
            $this->setMensagemRetorno('Email não pode estar vazio.');
            return $resultado;
        }

        if (empty($this->getCliTelefone())){
            $this->setRetorno('ERRO');
            $this->setMensagemRetorno('Telefone não pode estar vazio.');
            return $resultado;
        }

        $this->Cliente->setCliNomeRazao($this->getCliNomeRazao());
        $this->Cliente->setCliFantasia($this->getCliFantasia());
        $this->Cliente->setCliCpfCnpj(preg_replace('/[^0-9]/', '', $this->getCliCpfCnpj()));
        $this->Cliente->setCliCpf(preg_replace('/[^0-9]/', '', $this->getCliCpf()));
        $this->Cliente->setCliTipo($this->getCliTipo());
        $this->Cliente->setCliDataNascimento($this->getCliDataNascimento());
        $this->Cliente->setCliSexo($this->getCliSexo());
        $this->Cliente->setCliRg($this->getCliRg());
        $this->Cliente->setCliOrgaoEmissor($this->getCliOrgaoEmissor());
        $this->Cliente->setCliDataEmissaoRg($this->getCliDataEmissaoRg());
        $this->Cliente->setCliEmail($this->getCliEmail());
        $this->Cliente->setCliTelefone($this->getCliTelefone());
        $this->Cliente->setCliNomePai($this->getCliNomePai());
        $this->Cliente->setCliNomeMae($this->getCliNomeMae());
        $this->Cliente->setCliEstadoCivil($this->getCliEstadoCivil());
        $this->Cliente->setCliCodCbo($this->getCliCodCbo());
        $this->Cliente->setCliDescricaoCbo($this->getCliDescricaoCbo());
        $this->Cliente->setCliPpe($this->getCliPpe());

        $this->Cliente->setCliLogradouro($this->getCliLogradouro());
        $this->Cliente->setCliNumero($this->getCliNumero());
        $this->Cliente->setCliComplemento($this->getCliComplemento());
        $this->Cliente->setCliBairro($this->getCliBairro());
        $this->Cliente->setCliCidade($this->getCliCidade());
        $this->Cliente->setCliEstado($this->getCliEstado());
        $this->Cliente->setCliCep($this->getCliCep());

        $this->Cliente->setCliSelfie($this->getCliSelfie());
        $this->Cliente->setCliDocFrente($this->getCliDocFrente());
        $this->Cliente->setCliDocVerso($this->getCliDocVerso());
        $this->Cliente->setCliCompEndereco($this->getCliCompEndereco());

        $this->Cliente->setCliDeviceId($this->getCliDeviceId());
        $this->Cliente->setBcoId($this->getBcoId());

        $this->Cliente->setCliRecebOutraConta($this->getCliRecebOutraConta());
        $this->Cliente->setCliDepBanco($this->getCliDepBanco());
        $this->Cliente->setCliDepAgencia($this->getCliDepAgencia());
        $this->Cliente->setCliDepConta($this->getCliDepConta());
        $this->Cliente->setCliFaturamento($this->getCliFaturamento());
        $this->Cliente->setCliQtdeMaquinas($this->getCliQtdeMaquinas());

        $this->Cliente->setCliIdResponsavel($this->getCliIdResponsavel());

        $this->Cliente->setCliTipoTabela($this->getCliTipoTabela());
        $this->Cliente->setCliTabela($this->getCliTabela());
        $this->Cliente->setCliCdxExpress($this->getCliCdxExpress());

        $this->Cliente->setCliMcc($this->getCliMcc());
        $this->Cliente->setCliSoftDescriptor($this->getCliSoftDescriptor());

        $this->Cliente->setCliStatus($this->getCliStatus());

        $resultado = $this->Cliente->inserir();

        $this->setCliId($this->Cliente->getCliId());

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function editar()
    {
        $resultado = null;

        if(empty($this->getCliId())){
            $this->setRetorno('ERRO');
            $this->setMensagemRetorno('Cód. Cliente não pode estar vazio.');
            return $resultado;
        }

        if (empty($this->getCliNomeRazao())){
            $this->setRetorno('ERRO');
            $this->setMensagemRetorno('Nome do Cliente não pode estar vazio.');
            return $resultado;
        }

        if (empty($this->getCliCpfCnpj())){
            $this->setRetorno('ERRO');
            $this->setMensagemRetorno('CPF ou CNPJ não pode estar vazio.');
            return $resultado;
        }

        if (empty($this->getCliTipo())){
            $this->setRetorno('ERRO');
            $this->setMensagemRetorno('Tipo de Cliente não pode estar vazio.');
            return $resultado;
        }

        if (empty($this->getCliTelefone())){
            $this->setRetorno('ERRO');
            $this->setMensagemRetorno('Telefone não pode estar vazio.');
            return $resultado;
        }

        $this->Cliente->setBcoId($this->getBcoId());
        $this->Cliente->setCliId($this->getCliId());
        $this->Cliente->setCliNomeRazao($this->getCliNomeRazao());
        $this->Cliente->setCliFantasia($this->getCliFantasia());
        $this->Cliente->setCliCpfCnpj($this->getCliCpfCnpj());
        $this->Cliente->setCliCpf($this->getCliCpf());
        $this->Cliente->setCliTipo($this->getCliTipo());
        $this->Cliente->setCliDataNascimento($this->getCliDataNascimento());
        $this->Cliente->setCliSexo($this->getCliSexo());
        $this->Cliente->setCliRg($this->getCliRg());
        $this->Cliente->setCliDataEmissaoRg($this->getCliDataEmissaoRg());
        $this->Cliente->setCliOrgaoEmissor($this->getCliOrgaoEmissor());
        $this->Cliente->setCliTelefone($this->getCliTelefone());
        $this->Cliente->setCliNomePai($this->getCliNomePai());
        $this->Cliente->setCliNomeMae($this->getCliNomeMae());
        $this->Cliente->setCliEstadoCivil($this->getCliEstadoCivil());
        $this->Cliente->setCliCodCbo($this->getCliCodCbo());
        $this->Cliente->setCliDescricaoCbo($this->getCliDescricaoCbo());
        $this->Cliente->setCliPpe($this->getCliPpe());

        $this->Cliente->setCliLogradouro($this->getCliLogradouro());
        $this->Cliente->setCliNumero($this->getCliNumero());
        $this->Cliente->setCliComplemento($this->getCliComplemento());
        $this->Cliente->setCliBairro($this->getCliBairro());
        $this->Cliente->setCliCidade($this->getCliCidade());
        $this->Cliente->setCliEstado($this->getCliEstado());

        $this->Cliente->setCliCep(preg_replace('/[^0-9]/', '', $this->getCliCep()));

        $this->Cliente->setCliPolo($this->getCliPolo());
        $this->Cliente->setCliRepresentante($this->getCliRepresentante());
        $this->Cliente->setCliIdResponsavel($this->getCliIdResponsavel());

        $this->Cliente->setCliMcc($this->getCliMcc());
        $this->Cliente->setCliSoftDescriptor($this->getCliSoftDescriptor());

        $this->Cliente->setCliStatus($this->getCliStatus());

        $resultado = $this->Cliente->editar();

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function alterarEndereco()
    {
        $resultado = null;

        if(empty($this->getCliId())){
            $this->setRetorno('ERRO');
            $this->setMensagemRetorno('Cód. Cliente não pode estar vazio.');
            return $resultado;
        }

        if(empty($this->getCliCep())){
            $this->setRetorno('ERRO');
            $this->setMensagemRetorno('CEP não pode estar vazio.');
            return $resultado;
        }

        if(empty($this->getCliLogradouro())){
            $this->setRetorno('ERRO');
            $this->setMensagemRetorno('Endereço não pode estar vazio.');
            return $resultado;
        }

        if(empty($this->getCliCidade())){
            $this->setRetorno('ERRO');
            $this->setMensagemRetorno('Cidade não pode estar vazio.');
            return $resultado;
        }

        if(empty($this->getCliEstado())){
            $this->setRetorno('ERRO');
            $this->setMensagemRetorno('Estado não pode estar vazio.');
            return $resultado;
        }

        if(empty($this->getCliBairro())){
            $this->setRetorno('ERRO');
            $this->setMensagemRetorno('Bairro não pode estar vazio.');
            return $resultado;
        }

        $this->Cliente->setCliId($this->getCliId());

        $this->Cliente->setCliLogradouro($this->getCliLogradouro());
        $this->Cliente->setCliNumero($this->getCliNumero());
        $this->Cliente->setCliComplemento($this->getCliComplemento());
        $this->Cliente->setCliBairro($this->getCliBairro());
        $this->Cliente->setCliCidade($this->getCliCidade());
        $this->Cliente->setCliEstado($this->getCliEstado());

        $this->Cliente->setCliCep(preg_replace('/[^0-9]/', '', $this->getCliCep()));

        $resultado = $this->Cliente->alterarEndereco();

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function criarAcesso()
    {
        $this->Cliente->setBcoId($this->getBcoId());
        $this->Cliente->setCliId($this->getCliId());
        $this->Cliente->setCliEmail($this->getCliEmail());
        $this->Cliente->setCliNomeRazao($this->getCliNomeRazao());
        $this->Cliente->setCliTelefone($this->getCliTelefone());

        $resultado = $this->Cliente->criarAcesso();

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function esqueciSenha()
    {
        $this->Cliente->setBcoId($this->getBcoId());
        $this->Cliente->setCliId($this->getCliId());
        $this->Cliente->setCliEmail($this->getCliEmail());
        $this->Cliente->setCliNomeRazao($this->getCliNomeRazao());
        $this->Cliente->setCliTelefone($this->getCliTelefone());

        $resultado = $this->Cliente->esqueciSenha();

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function login()
    {
        $this->Cliente->setBcoId($this->getBcoId());
        $this->Cliente->setCliCpfCnpj($this->getCliCpfCnpj());
        $this->Cliente->setCliSenha($this->getCliSenha());

        $resultado = $this->Cliente->login();

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function loginIdDevice()
    {
        $this->Cliente->setBcoId($this->getBcoId());
        $this->Cliente->setCliDeviceId($this->getCliDeviceId());

        $resultado = $this->Cliente->loginIdDevice();

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function alteraMostraSaldo()
    {
        $this->Cliente->setCliId($this->getCliId());
        $this->Cliente->setCliMostraSaldo($this->getCliMostraSaldo());

        $resultado = $this->Cliente->alteraMostraSaldo();

        return $resultado;
    }

    public function alteraLoginBio()
    {
        $this->Cliente->setCliId($this->getCliId());
        $this->Cliente->setCliLoginBio($this->getCliLoginBio());

        $resultado = $this->Cliente->alteraLoginBio();

        return $resultado;
    }

    public function alteraDispositivo()
    {
        $this->Cliente->setCliId($this->getCliId());
        $this->Cliente->setCliDeviceId($this->getCliDeviceId());

        $resultado = $this->Cliente->alteraDispositivo();

        return $resultado;
    }

    public function alteraSenha()
    {
        $this->Cliente->setCliId($this->getCliId());
        $this->Cliente->setCliDeviceId($this->getCliDeviceId());
        $this->Cliente->setCliSenha($this->getCliSenha());

        $resultado = $this->Cliente->alteraSenha();

        return $resultado;
    }

    public function alteraSenhaPin()
    {
        $this->Cliente->setCliId($this->getCliId());

        $this->Cliente->setCliSenhaPin($this->getCliSenhaPin());

        $resultado = $this->Cliente->alteraSenhaPin();

        return $resultado;
    }

    public function testaSenhaPin()
    {
        $this->Cliente->setCliId($this->getCliId());
        $this->Cliente->setCliSenhaPin($this->getCliSenhaPin());

        $resultado = $this->Cliente->testaSenhaPin();

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function adicionaAgenciaConta()
    {
        $this->Cliente->setCliId($this->getCliId());
        $this->Cliente->setCliAgencia($this->getCliAgencia());
        $this->Cliente->setCliConta($this->getCliConta());

        $resultado = $this->Cliente->adicionaAgenciaConta();

        return $resultado;
    }

    public function gravaPushId()
    {
        $this->Cliente->setCliDeviceId($this->getCliDeviceId());
        $this->Cliente->setBcoId($this->getBcoId());
        $this->Cliente->setCliPushId($this->getCliPushId());

        $resultado = $this->Cliente->gravaPushId();

        return $resultado;
    }

    public function reenvioDocumentos($texto)
    {
        $this->Cliente->setCliId($this->getCliId());
        $this->Cliente->setBcoId($this->getBcoId());
        $this->Cliente->setCliNomeRazao($this->getCliNomeRazao());
        $this->Cliente->setCliEmail($this->getCliEmail());

        $resultado = $this->Cliente->reenvioDocumentos($texto);

        return $resultado;
    }

    public function recusarCadastro()
    {
        $this->Cliente->setCliId($this->getCliId());
        $this->Cliente->setBcoId($this->getBcoId());
        $this->Cliente->setCliNomeRazao($this->getCliNomeRazao());
        $this->Cliente->setCliEmail($this->getCliEmail());
        $this->Cliente->setCliObs($this->getCliObs());

        $resultado = $this->Cliente->recusarCadastro();

        return $resultado;
    }

    public function editarReenvio()
    {
        $resultado = null;

        if(empty($this->getCliId())){
            $this->setRetorno('ERRO');
            $this->setMensagemRetorno('Cód. Cliente não pode estar vazio.');
            return $resultado;
        }

        if (empty($this->getCliNomeRazao())){
            $this->setRetorno('ERRO');
            $this->setMensagemRetorno('Nome do Cliente não pode estar vazio.');
            return $resultado;
        }

        if (empty($this->getCliCpfCnpj())){
            $this->setRetorno('ERRO');
            $this->setMensagemRetorno('CPF ou CNPJ não pode estar vazio.');
            return $resultado;
        }

        if (empty($this->getCliTipo())){
            $this->setRetorno('ERRO');
            $this->setMensagemRetorno('Tipo de Cliente não pode estar vazio.');
            return $resultado;
        }

        if (empty($this->getCliTelefone())){
            $this->setRetorno('ERRO');
            $this->setMensagemRetorno('Telefone não pode estar vazio.');
            return $resultado;
        }

        $this->Cliente->setBcoId($this->getBcoId());
        $this->Cliente->setCliId($this->getCliId());
        $this->Cliente->setCliNomeRazao($this->getCliNomeRazao());
        $this->Cliente->setCliFantasia($this->getCliFantasia());
        $this->Cliente->setCliCpfCnpj(preg_replace('/[^0-9]/', '', $this->getCliCpfCnpj()));
        $this->Cliente->setCliTipo($this->getCliTipo());
        $this->Cliente->setCliDataNascimento($this->getCliDataNascimento());
        $this->Cliente->setCliSexo($this->getCliSexo());
        $this->Cliente->setCliRg($this->getCliRg());
        $this->Cliente->setCliDataEmissaoRg($this->getCliDataEmissaoRg());
        $this->Cliente->setCliOrgaoEmissor($this->getCliOrgaoEmissor());
        $this->Cliente->setCliTelefone($this->getCliTelefone());
        $this->Cliente->setCliNomePai($this->getCliNomePai());
        $this->Cliente->setCliNomeMae($this->getCliNomeMae());
        $this->Cliente->setCliEstadoCivil($this->getCliEstadoCivil());
        $this->Cliente->setCliCodCbo($this->getCliCodCbo());
        $this->Cliente->setCliDescricaoCbo($this->getCliDescricaoCbo());
        $this->Cliente->setCliPpe($this->getCliPpe());

        $this->Cliente->setCliLogradouro($this->getCliLogradouro());
        $this->Cliente->setCliNumero($this->getCliNumero());
        $this->Cliente->setCliComplemento($this->getCliComplemento());
        $this->Cliente->setCliBairro($this->getCliBairro());
        $this->Cliente->setCliCidade($this->getCliCidade());
        $this->Cliente->setCliEstado($this->getCliEstado());

        //$this->Cliente->setCliCep(preg_replace('/[^0-9]/', '', $this->getCliCep()));
        $this->Cliente->setCliCep($this->getCliCep());

        $this->Cliente->setCliSelfie($this->getCliSelfie());
        $this->Cliente->setCliDocFrente($this->getCliDocFrente());
        $this->Cliente->setCliDocVerso($this->getCliDocVerso());
        $this->Cliente->setCliCompEndereco($this->getCliCompEndereco());

        $this->Cliente->setCliStatus($this->getCliStatus());

        $resultado = $this->Cliente->editarReenvio();

        $this->setRetorno($this->Cliente->getRetorno());
        $this->setMensagemRetorno($this->Cliente->getMensagemRetorno());

        return $resultado;
    }

    public function aplicarTabela()
    {
        $this->Cliente->setCliId($this->getCliId());
        $this->Cliente->setPlanosId($this->getPlanosId());

        $resultado = $this->Cliente->aplicarTabela();

        return $resultado;
    }

    /**
     * @return mixed
     */
    public function getCliId()
    {
        return $this->cliId;
    }

    /**
     * @param mixed $cliId
     */
    public function setCliId($cliId)
    {
        $this->cliId = $cliId;
    }

    /**
     * @return mixed
     */
    public function getCliNomeRazao()
    {
        return $this->cliNomeRazao;
    }

    /**
     * @param mixed $cliNomeRazao
     */
    public function setCliNomeRazao($cliNomeRazao)
    {
        $this->cliNomeRazao = $cliNomeRazao;
    }

    /**
     * @return mixed
     */
    public function getCliFantasia()
    {
        return $this->cliFantasia;
    }

    /**
     * @param mixed $cliFantasia
     */
    public function setCliFantasia($cliFantasia)
    {
        $this->cliFantasia = $cliFantasia;
    }

    /**
     * @return mixed
     */
    public function getCliCpfCnpj()
    {
        return $this->cliCpfCnpj;
    }

    /**
     * @param mixed $cliCpfCnpj
     */
    public function setCliCpfCnpj($cliCpfCnpj)
    {
        $this->cliCpfCnpj = $cliCpfCnpj;
    }

    /**
     * @return mixed
     */
    public function getCliTipo()
    {
        return $this->cliTipo;
    }

    /**
     * @param mixed $cliTipo
     */
    public function setCliTipo($cliTipo)
    {
        $this->cliTipo = $cliTipo;
    }

    /**
     * @return mixed
     */
    public function getCliDataNascimento()
    {
        return $this->cliDataNascimento;
    }

    /**
     * @param mixed $cliDataNascimento
     */
    public function setCliDataNascimento($cliDataNascimento)
    {
        $this->cliDataNascimento = $cliDataNascimento;
    }

    /**
     * @return mixed
     */
    public function getCliSexo()
    {
        return $this->cliSexo;
    }

    /**
     * @param mixed $cliSexo
     */
    public function setCliSexo($cliSexo)
    {
        $this->cliSexo = $cliSexo;
    }

    /**
     * @return mixed
     */
    public function getCliRg()
    {
        return $this->cliRg;
    }

    /**
     * @param mixed $cliRg
     */
    public function setCliRg($cliRg)
    {
        $this->cliRg = $cliRg;
    }

    /**
     * @return mixed
     */
    public function getCliOrgaoEmissor()
    {
        return $this->cliOrgaoEmissor;
    }

    /**
     * @param mixed $cliOrgaoEmissor
     */
    public function setCliOrgaoEmissor($cliOrgaoEmissor)
    {
        $this->cliOrgaoEmissor = $cliOrgaoEmissor;
    }

    /**
     * @return mixed
     */
    public function getCliDataEmissaoRg()
    {
        return $this->cliDataEmissaoRg;
    }

    /**
     * @param mixed $cliDataEmissaoRg
     */
    public function setCliDataEmissaoRg($cliDataEmissaoRg)
    {
        $this->cliDataEmissaoRg = $cliDataEmissaoRg;
    }

    /**
     * @return mixed
     */
    public function getCliEmail()
    {
        return $this->cliEmail;
    }

    /**
     * @param mixed $cliEmail
     */
    public function setCliEmail($cliEmail)
    {
        $this->cliEmail = $cliEmail;
    }

    /**
     * @return mixed
     */
    public function getCliTelefone()
    {
        return $this->cliTelefone;
    }

    /**
     * @param mixed $cliTelefone
     */
    public function setCliTelefone($cliTelefone)
    {
        $this->cliTelefone = $cliTelefone;
    }

    /**
     * @return mixed
     */
    public function getCliNomePai()
    {
        return $this->cliNomePai;
    }

    /**
     * @param mixed $cliNomePai
     */
    public function setCliNomePai($cliNomePai)
    {
        $this->cliNomePai = $cliNomePai;
    }

    /**
     * @return mixed
     */
    public function getCliNomeMae()
    {
        return $this->cliNomeMae;
    }

    /**
     * @param mixed $cliNomeMae
     */
    public function setCliNomeMae($cliNomeMae)
    {
        $this->cliNomeMae = $cliNomeMae;
    }

    /**
     * @return mixed
     */
    public function getCliEstadoCivil()
    {
        return $this->cliEstadoCivil;
    }

    /**
     * @param mixed $cliEstadoCivil
     */
    public function setCliEstadoCivil($cliEstadoCivil)
    {
        $this->cliEstadoCivil = $cliEstadoCivil;
    }

    /**
     * @return mixed
     */
    public function getCliCodCbo()
    {
        return $this->cliCodCbo;
    }

    /**
     * @param mixed $cliCodCbo
     */
    public function setCliCodCbo($cliCodCbo)
    {
        $this->cliCodCbo = $cliCodCbo;
    }

    /**
     * @return mixed
     */
    public function getCliDescricaoCbo()
    {
        return $this->cliDescricaoCbo;
    }

    /**
     * @param mixed $cliDescricaoCbo
     */
    public function setCliDescricaoCbo($cliDescricaoCbo)
    {
        $this->cliDescricaoCbo = $cliDescricaoCbo;
    }

    /**
     * @return mixed
     */
    public function getCliDataAlteracao()
    {
        return $this->cliDataAlteracao;
    }

    /**
     * @param mixed $cliDataAlteracao
     */
    public function setCliDataAlteracao($cliDataAlteracao)
    {
        $this->cliDataAlteracao = $cliDataAlteracao;
    }

    /**
     * @return mixed
     */
    public function getCliStatus()
    {
        return $this->cliStatus;
    }

    /**
     * @param mixed $cliStatus
     */
    public function setCliStatus($cliStatus)
    {
        $this->cliStatus = $cliStatus;
    }

    /**
     * @return mixed
     */
    public function getRetorno()
    {
        return $this->retorno;
    }

    /**
     * @param mixed $retorno
     */
    public function setRetorno($retorno)
    {
        $this->retorno = $retorno;
    }

    /**
     * @return mixed
     */
    public function getMensagemRetorno()
    {
        return $this->mensagemRetorno;
    }

    /**
     * @param mixed $mensagemRetorno
     */
    public function setMensagemRetorno($mensagemRetorno)
    {
        $this->mensagemRetorno = $mensagemRetorno;
    }

    /**
     * @return mixed
     */
    public function getCliLogradouro()
    {
        return $this->cliLogradouro;
    }

    /**
     * @param mixed $cliLogradouro
     */
    public function setCliLogradouro($cliLogradouro)
    {
        $this->cliLogradouro = $cliLogradouro;
    }

    /**
     * @return mixed
     */
    public function getCliNumero()
    {
        return $this->cliNumero;
    }

    /**
     * @param mixed $cliNumero
     */
    public function setCliNumero($cliNumero)
    {
        $this->cliNumero = $cliNumero;
    }

    /**
     * @return mixed
     */
    public function getCliComplemento()
    {
        return $this->cliComplemento;
    }

    /**
     * @param mixed $cliComplemento
     */
    public function setCliComplemento($cliComplemento)
    {
        $this->cliComplemento = $cliComplemento;
    }

    /**
     * @return mixed
     */
    public function getCliBairro()
    {
        return $this->cliBairro;
    }

    /**
     * @param mixed $cliBairro
     */
    public function setCliBairro($cliBairro)
    {
        $this->cliBairro = $cliBairro;
    }

    /**
     * @return mixed
     */
    public function getCliCidade()
    {
        return $this->cliCidade;
    }

    /**
     * @param mixed $cliCidade
     */
    public function setCliCidade($cliCidade)
    {
        $this->cliCidade = $cliCidade;
    }

    /**
     * @return mixed
     */
    public function getCliEstado()
    {
        return $this->cliEstado;
    }

    /**
     * @param mixed $cliEstado
     */
    public function setCliEstado($cliEstado)
    {
        $this->cliEstado = $cliEstado;
    }

    /**
     * @return mixed
     */
    public function getCliCep()
    {
        return $this->cliCep;
    }

    /**
     * @param mixed $cliCep
     */
    public function setCliCep($cliCep)
    {
        $this->cliCep = $cliCep;
    }

    /**
     * @return mixed
     */
    public function getCodContaBancaria()
    {
        return $this->codContaBancaria;
    }

    /**
     * @param mixed $codContaBancaria
     */
    public function setCodContaBancaria($codContaBancaria)
    {
        $this->codContaBancaria = $codContaBancaria;
    }

    /**
     * @return mixed
     */
    public function getBcoId()
    {
        return $this->bcoId;
    }

    /**
     * @param mixed $bcoId
     */
    public function setBcoId($bcoId)
    {
        $this->bcoId = $bcoId;
    }

    /**
     * @return mixed
     */
    public function getCliSelfie()
    {
        return $this->cliSelfie;
    }

    /**
     * @param mixed $cliSelfie
     */
    public function setCliSelfie($cliSelfie)
    {
        $this->cliSelfie = $cliSelfie;
    }

    /**
     * @return mixed
     */
    public function getCliDocFrente()
    {
        return $this->cliDocFrente;
    }

    /**
     * @param mixed $cliDocFrente
     */
    public function setCliDocFrente($cliDocFrente)
    {
        $this->cliDocFrente = $cliDocFrente;
    }

    /**
     * @return mixed
     */
    public function getCliDocVerso()
    {
        return $this->cliDocVerso;
    }

    /**
     * @param mixed $cliDocVerso
     */
    public function setCliDocVerso($cliDocVerso)
    {
        $this->cliDocVerso = $cliDocVerso;
    }

    /**
     * @return mixed
     */
    public function getCliCompEndereco()
    {
        return $this->cliCompEndereco;
    }

    /**
     * @param mixed $cliCompEndereco
     */
    public function setCliCompEndereco($cliCompEndereco)
    {
        $this->cliCompEndereco = $cliCompEndereco;
    }

    /**
     * @return mixed
     */
    public function getCliDeviceId()
    {
        return $this->cliDeviceId;
    }

    /**
     * @param mixed $cliDeviceId
     */
    public function setCliDeviceId($cliDeviceId)
    {
        $this->cliDeviceId = $cliDeviceId;
    }

    /**
     * @return mixed
     */
    public function getCliSenha()
    {
        return $this->cliSenha;
    }

    /**
     * @param mixed $cliSenha
     */
    public function setCliSenha($cliSenha)
    {
        $this->cliSenha = $cliSenha;
    }

    /**
     * @return mixed
     */
    public function getCliMostraSaldo()
    {
        return $this->cliMostraSaldo;
    }

    /**
     * @param mixed $cliMostraSaldo
     */
    public function setCliMostraSaldo($cliMostraSaldo)
    {
        $this->cliMostraSaldo = $cliMostraSaldo;
    }

    /**
     * @return mixed
     */
    public function getCliPpe()
    {
        return $this->cliPpe;
    }

    /**
     * @param mixed $cliPpe
     */
    public function setCliPpe($cliPpe)
    {
        $this->cliPpe = $cliPpe;
    }

    /**
     * @return mixed
     */
    public function getCliLoginBio()
    {
        return $this->cliLoginBio;
    }

    /**
     * @param mixed $cliLoginBio
     */
    public function setCliLoginBio($cliLoginBio)
    {
        $this->cliLoginBio = $cliLoginBio;
    }

    /**
     * @return mixed
     */
    public function getCliAgencia()
    {
        return $this->cliAgencia;
    }

    /**
     * @param mixed $cliAgencia
     */
    public function setCliAgencia($cliAgencia)
    {
        $this->cliAgencia = $cliAgencia;
    }

    /**
     * @return mixed
     */
    public function getCliConta()
    {
        return $this->cliConta;
    }

    /**
     * @param mixed $cliConta
     */
    public function setCliConta($cliConta)
    {
        $this->cliConta = $cliConta;
    }

    /**
     * @return mixed
     */
    public function getCliPushId()
    {
        return $this->cliPushId;
    }

    /**
     * @param mixed $cliPushId
     */
    public function setCliPushId($cliPushId)
    {
        $this->cliPushId = $cliPushId;
    }

    /**
     * @return mixed
     */
    public function getCliSenhaPin()
    {
        return $this->cliSenhaPin;
    }

    /**
     * @param mixed $cliSenhaPin
     */
    public function setCliSenhaPin($cliSenhaPin)
    {
        $this->cliSenhaPin = $cliSenhaPin;
    }

    /**
     * @return mixed
     */
    public function getCliObs()
    {
        return $this->cliObs;
    }

    /**
     * @param mixed $cliObs
     */
    public function setCliObs($cliObs)
    {
        $this->cliObs = $cliObs;
    }

    /**
     * @return mixed
     */
    public function getCliRetornoKyc()
    {
        return $this->cliRetornoKyc;
    }

    /**
     * @param mixed $cliRetornoKyc
     */
    public function setCliRetornoKyc($cliRetornoKyc)
    {
        $this->cliRetornoKyc = $cliRetornoKyc;
    }

    /**
     * @return mixed
     */
    public function getPlanosId()
    {
        return $this->planosId;
    }

    /**
     * @param mixed $planosId
     */
    public function setPlanosId($planosId): void
    {
        $this->planosId = $planosId;
    }

    /**
     * @return mixed
     */
    public function getCliDepBanco()
    {
        return $this->cliDepBanco;
    }

    /**
     * @param mixed $cliDepBanco
     */
    public function setCliDepBanco($cliDepBanco): void
    {
        $this->cliDepBanco = $cliDepBanco;
    }

    /**
     * @return mixed
     */
    public function getCliDepAgencia()
    {
        return $this->cliDepAgencia;
    }

    /**
     * @param mixed $cliDepAgencia
     */
    public function setCliDepAgencia($cliDepAgencia): void
    {
        $this->cliDepAgencia = $cliDepAgencia;
    }

    /**
     * @return mixed
     */
    public function getCliDepConta()
    {
        return $this->cliDepConta;
    }

    /**
     * @param mixed $cliDepConta
     */
    public function setCliDepConta($cliDepConta): void
    {
        $this->cliDepConta = $cliDepConta;
    }

    /**
     * @return mixed
     */
    public function getCliFaturamento()
    {
        return $this->cliFaturamento;
    }

    /**
     * @param mixed $cliFaturamento
     */
    public function setCliFaturamento($cliFaturamento): void
    {
        $this->cliFaturamento = $cliFaturamento;
    }

    /**
     * @return mixed
     */
    public function getCliQtdeMaquinas()
    {
        return $this->cliQtdeMaquinas;
    }

    /**
     * @param mixed $cliQtdeMaquinas
     */
    public function setCliQtdeMaquinas($cliQtdeMaquinas): void
    {
        $this->cliQtdeMaquinas = $cliQtdeMaquinas;
    }

    /**
     * @return mixed
     */
    public function getCliPolo()
    {
        return $this->cliPolo;
    }

    /**
     * @param mixed $cliPolo
     */
    public function setCliPolo($cliPolo): void
    {
        $this->cliPolo = $cliPolo;
    }

    /**
     * @return mixed
     */
    public function getCliRepresentante()
    {
        return $this->cliRepresentante;
    }

    /**
     * @param mixed $cliRepresentante
     */
    public function setCliRepresentante($cliRepresentante): void
    {
        $this->cliRepresentante = $cliRepresentante;
    }

    /**
     * @return mixed
     */
    public function getCliIdResponsavel()
    {
        return $this->cliIdResponsavel;
    }

    /**
     * @param mixed $cliIdResponsavel
     */
    public function setCliIdResponsavel($cliIdResponsavel): void
    {
        $this->cliIdResponsavel = $cliIdResponsavel;
    }

    /**
     * @return mixed
     */
    public function getCliCpf()
    {
        return $this->cliCpf;
    }

    /**
     * @param mixed $cliCpf
     */
    public function setCliCpf($cliCpf): void
    {
        $this->cliCpf = $cliCpf;
    }

    /**
     * @return mixed
     */
    public function getCliRecebOutraConta()
    {
        return $this->cliRecebOutraConta;
    }

    /**
     * @param mixed $cliRecebOutraConta
     */
    public function setCliRecebOutraConta($cliRecebOutraConta): void
    {
        $this->cliRecebOutraConta = $cliRecebOutraConta;
    }

    /**
     * @return mixed
     */
    public function getCliTipoTabela()
    {
        return $this->cliTipoTabela;
    }

    /**
     * @param mixed $cliTipoTabela
     */
    public function setCliTipoTabela($cliTipoTabela): void
    {
        $this->cliTipoTabela = $cliTipoTabela;
    }

    /**
     * @return mixed
     */
    public function getCliTabela()
    {
        return $this->cliTabela;
    }

    /**
     * @param mixed $cliTabela
     */
    public function setCliTabela($cliTabela): void
    {
        $this->cliTabela = $cliTabela;
    }

    /**
     * @return mixed
     */
    public function getCliCdxExpress()
    {
        return $this->cliCdxExpress;
    }

    /**
     * @param mixed $cliCdxExpress
     */
    public function setCliCdxExpress($cliCdxExpress): void
    {
        $this->cliCdxExpress = $cliCdxExpress;
    }

    /**
     * @return mixed
     */
    public function getCliMcc()
    {
        return $this->cliMcc;
    }

    /**
     * @param mixed $cliMcc
     */
    public function setCliMcc($cliMcc): void
    {
        $this->cliMcc = $cliMcc;
    }

    /**
     * @return mixed
     */
    public function getCliSoftDescriptor()
    {
        return $this->cliSoftDescriptor;
    }

    /**
     * @param mixed $cliSoftDescriptor
     */
    public function setCliSoftDescriptor($cliSoftDescriptor): void
    {
        $this->cliSoftDescriptor = $cliSoftDescriptor;
    }


}