Example #1
0
 protected function setFieldsFromJsonObj($jsonObj)
 {
     if (isset($jsonObj->nome)) {
         $this->setNome($jsonObj->nome);
     }
     if (isset($jsonObj->rapporto)) {
         $this->setRapporto(Rapporto::fromJson($jsonObj->rapporto, $this->_xapiClient));
     }
     if (isset($jsonObj->sede)) {
         $this->setSede(Sede::fromJson($jsonObj->sede, $this->_xapiClient));
     }
     if (isset($jsonObj->soggetto)) {
         $this->setSoggetto(Soggetto::fromJson($jsonObj->soggetto, $this->_xapiClient));
     }
 }
Example #2
0
 protected function setFieldsFromJsonObj($jsonObj)
 {
     if (isset($jsonObj->ragioneSociale)) {
         $this->setRagioneSociale($jsonObj->ragioneSociale);
     }
     if (isset($jsonObj->nome)) {
         $this->setNome($jsonObj->nome);
     }
     if (isset($jsonObj->cognome)) {
         $this->setCognome($jsonObj->cognome);
     }
     if (isset($jsonObj->partitaIva)) {
         $this->setPartitaIva($jsonObj->partitaIva);
     }
     if (isset($jsonObj->codiceFiscale)) {
         $this->setCodiceFiscale($jsonObj->codiceFiscale);
     }
     if (isset($jsonObj->sitoWeb)) {
         $this->setSitoWeb($jsonObj->sitoWeb);
     }
     if (isset($jsonObj->note)) {
         $this->setNote($jsonObj->note);
     }
     if (isset($jsonObj->soggettoInMora)) {
         $this->setSoggettoInMora($jsonObj->soggettoInMora);
     }
     if (isset($jsonObj->rapporti) && is_array($jsonObj->rapporti)) {
         $rapporti = array();
         foreach ($jsonObj->rapporti as $rapObj) {
             $rapporti[] = Rapporto::fromJson($rapObj, $this->_xapiClient);
         }
         $this->setRapporti($rapporti);
     }
     if (isset($jsonObj->contatti) && is_array($jsonObj->contatti)) {
         $contatti = array();
         foreach ($jsonObj->contatti as $conObj) {
             $contatti[] = Contatto::fromJson($conObj, $this->_xapiClient);
         }
         $this->setContatti($contatti);
     }
     if (isset($jsonObj->naturaGiuridica)) {
         $this->setNaturaGiuridica(NaturaGiuridica::fromJson($jsonObj->naturaGiuridica, $this->_xapiClient));
     }
     if (isset($jsonObj->nazione)) {
         $this->setNazione(Nazione::fromJson($jsonObj->nazione, $this->_xapiClient));
     }
 }
 protected function setFieldsFromJsonObj($jsonObj)
 {
     if (isset($jsonObj->anno)) {
         $this->setAnno($jsonObj->anno);
     }
     if (isset($jsonObj->cambioValuta)) {
         $this->setCambioValuta($jsonObj->cambioValuta);
     }
     if (isset($jsonObj->dataDocumento)) {
         $this->setDataDocumento($this->parseDate($jsonObj->dataDocumento));
     }
     if (isset($jsonObj->numeroDocumento)) {
         $this->setNumeroDocumento($jsonObj->numeroDocumento);
     }
     if (isset($jsonObj->serie)) {
         $this->setSerie($jsonObj->serie);
     }
     if (isset($jsonObj->codice)) {
         $this->setCodice($jsonObj->codice);
     }
     if (isset($jsonObj->contoCorrente)) {
         $this->setContoCorrente($jsonObj->contoCorrente);
     }
     if (isset($jsonObj->codicePaese)) {
         $this->setCodicePaese($jsonObj->codicePaese);
     }
     if (isset($jsonObj->iban)) {
         $this->setIban($jsonObj->iban);
     }
     if (isset($jsonObj->swift)) {
         $this->setSwift($jsonObj->swift);
     }
     if (isset($jsonObj->scontoPercentuale)) {
         $this->setScontoPercentuale($jsonObj->scontoPercentuale);
     }
     if (isset($jsonObj->scontoValore)) {
         $this->setScontoValore($jsonObj->scontoValore);
     }
     if (isset($jsonObj->scontoValorePercentuale)) {
         $this->setScontoValorePercentuale($jsonObj->scontoValorePercentuale);
     }
     if (isset($jsonObj->imponibile)) {
         $this->setImponibile($jsonObj->imponibile);
     }
     if (isset($jsonObj->imponibileScontato)) {
         $this->setImponibileScontato($jsonObj->imponibileScontato);
     }
     if (isset($jsonObj->imposta)) {
         $this->setImposta($jsonObj->imposta);
     }
     if (isset($jsonObj->totale)) {
         $this->setTotale($jsonObj->totale);
     }
     if (isset($jsonObj->noteTestata)) {
         $this->setNoteTestata($jsonObj->noteTestata);
     }
     if (isset($jsonObj->notePiede)) {
         $this->setNotePiede($jsonObj->notePiede);
     }
     if (isset($jsonObj->acconto)) {
         $this->setAcconto($jsonObj->acconto);
     }
     if (isset($jsonObj->speseBancarie)) {
         $this->setSpeseBancarie($jsonObj->speseBancarie);
     }
     if (isset($jsonObj->speseTrasporto)) {
         $this->setSpeseTrasporto($jsonObj->speseTrasporto);
     }
     if (isset($jsonObj->assegnaProtocollo)) {
         $this->setAssegnaProtocollo($jsonObj->assegnaProtocollo);
     }
     if (isset($jsonObj->numeroProtocollo)) {
         $this->setNumeroProtocollo($jsonObj->numeroProtocollo);
     }
     if (isset($jsonObj->dataProtocollo)) {
         $this->setDataProtocollo($this->parseDate($jsonObj->dataProtocollo));
     }
     if (isset($jsonObj->protocolloAssegnato)) {
         $this->setProtocolloAssegnato($jsonObj->protocolloAssegnato);
     }
     if (isset($jsonObj->protocolloAggiuntivo)) {
         $this->setProtocolloAggiuntivo($jsonObj->protocolloAggiuntivo);
     }
     if (isset($jsonObj->noteImballo)) {
         $this->setNoteImballo($jsonObj->noteImballo);
     }
     if (isset($jsonObj->dataConsegna)) {
         $this->setDataConsegna($this->parseDate($jsonObj->dataConsegna));
     }
     if (isset($jsonObj->riferimentoDocumento)) {
         $this->setRiferimentoDocumento($jsonObj->riferimentoDocumento);
     }
     if (isset($jsonObj->sequenziale)) {
         $this->setSequenziale($jsonObj->sequenziale);
     }
     if (isset($jsonObj->terminiConsegna)) {
         $this->setTerminiConsegna($jsonObj->terminiConsegna);
     }
     if (isset($jsonObj->jolly)) {
         $this->setJolly($jsonObj->jolly);
     }
     if (isset($jsonObj->valuta)) {
         $this->setValuta(Valuta::fromJson($jsonObj->valuta, $this->_xapiClient));
     }
     if (isset($jsonObj->causaleMagazzino)) {
         $this->setCausaleMagazzino(CausaleMagazzino::fromJson($jsonObj->causaleMagazzino, $this->_xapiClient));
     }
     if (isset($jsonObj->causaleMagazzino2)) {
         $this->setCausaleMagazzino2(CausaleMagazzino::fromJson($jsonObj->causaleMagazzino2, $this->_xapiClient));
     }
     if (isset($jsonObj->causaleContabile)) {
         $this->setCausaleContabile(CausaleContabile::fromJson($jsonObj->causaleContabile, $this->_xapiClient));
     }
     if (isset($jsonObj->tipoDocumento)) {
         $this->setTipoDocumento(TipoDocumento::fromJson($jsonObj->tipoDocumento, $this->_xapiClient));
     }
     if (isset($jsonObj->divisione)) {
         $this->setDivisione(Divisione::fromJson($jsonObj->divisione, $this->_xapiClient));
     }
     if (isset($jsonObj->soggetto)) {
         $this->setSoggetto(Soggetto::fromJson($jsonObj->soggetto, $this->_xapiClient));
     }
     if (isset($jsonObj->rapporto)) {
         $this->setRapporto(Rapporto::fromJson($jsonObj->rapporto, $this->_xapiClient));
     }
     if (isset($jsonObj->sedeLegale)) {
         $this->setSedeLegale(Sede::fromJson($jsonObj->sedeLegale, $this->_xapiClient));
     }
     if (isset($jsonObj->sedeDocumento)) {
         $this->setSedeDocumento(Sede::fromJson($jsonObj->sedeDocumento, $this->_xapiClient));
     }
     if (isset($jsonObj->sedeMerce)) {
         $this->setSedeMerce(Sede::fromJson($jsonObj->sedeMerce, $this->_xapiClient));
     }
     if (isset($jsonObj->agente)) {
         $this->setAgente(Agente::fromJson($jsonObj->agente, $this->_xapiClient));
     }
     if (isset($jsonObj->deposito)) {
         $this->setDeposito(Deposito::fromJson($jsonObj->deposito, $this->_xapiClient));
     }
     if (isset($jsonObj->deposito2)) {
         $this->setDeposito2(Deposito::fromJson($jsonObj->deposito2, $this->_xapiClient));
     }
     if (isset($jsonObj->porto)) {
         $this->setPorto(Porto::fromJson($jsonObj->porto, $this->_xapiClient));
     }
     if (isset($jsonObj->vettore)) {
         $this->setVettore(Vettore::fromJson($jsonObj->vettore, $this->_xapiClient));
     }
     if (isset($jsonObj->modalitaTrasporto)) {
         $this->setModalitaTrasporto(ModalitaTrasporto::fromJson($jsonObj->modalitaTrasporto, $this->_xapiClient));
     }
     if (isset($jsonObj->banca)) {
         $this->setBanca(Banca::fromJson($jsonObj->banca, $this->_xapiClient));
     }
     if (isset($jsonObj->modalitaPagamento)) {
         $this->setModalitaPagamento(ModalitaPagamento::fromJson($jsonObj->modalitaPagamento, $this->_xapiClient));
     }
     if (isset($jsonObj->assoggettamentoIva)) {
         $this->setAssoggettamentoIva(Iva::fromJson($jsonObj->assoggettamentoIva, $this->_xapiClient));
     }
     if (isset($jsonObj->imballo)) {
         $this->setImballo(Imballo::fromJson($jsonObj->imballo, $this->_xapiClient));
     }
     if (isset($jsonObj->listino)) {
         $this->setListino(Listino::fromJson($jsonObj->listino, $this->_xapiClient));
     }
     if (isset($jsonObj->ordine)) {
         $this->setOrdine(DocumentoTestata::fromJson($jsonObj->ordine, $this->_xapiClient));
     }
     if (isset($jsonObj->documentiDettaglio) && is_array($jsonObj->documentiDettaglio)) {
         $documentiDettaglio = array();
         foreach ($jsonObj->documentiDettaglio as $dettaglioObj) {
             $documentiDettaglio[] = DocumentoDettaglio::fromJson($dettaglioObj, $this->_xapiClient);
         }
         $this->setDocumentiDettaglio($documentiDettaglio);
     }
 }