예제 #1
0
 /**
  * Return standard class from this class
  * @return stdClass
  */
 public function toStdClass()
 {
     $stdClass = new stdClass();
     $stdClass->billOfLading = $this->_billOfLading;
     $stdClass->parcelId = $this->_parcelId;
     $stdClass->packId = $this->_packId;
     $stdClass->weight = $this->_weight;
     if (isset($this->_size)) {
         $stdClass->size = $this->_size->toStdClass();
     }
     $stdClass->foreignParcelNumber = $this->_foreignParcelNumber;
     return $stdClass;
 }
예제 #2
0
 /**
  * Return standard class from this class
  * @return stdClass
  */
 public function toStdClass()
 {
     $stdClass = new stdClass();
     $stdClass->billOfLading = $this->_billOfLading;
     $stdClass->takingDate = $this->_takingDate;
     $stdClass->serviceTypeId = $this->_serviceTypeId;
     $stdClass->officeToBeCalledId = $this->_officeToBeCalledId;
     if (isset($this->_optionsBeforePayment)) {
         $stdClass->optionsBeforePayment = $this->_optionsBeforePayment->toStdClass();
     }
     $stdClass->fixedTimeDelivery = $this->_fixedTimeDelivery;
     $stdClass->deferredDeliveryWorkDays = $this->_deferredDeliveryWorkDays;
     $stdClass->backDocumentsRequest = $this->_backDocumentsRequest;
     $stdClass->backReceiptRequest = $this->_backReceiptRequest;
     $stdClass->willBringToOffice = $this->_willBringToOffice;
     $stdClass->willBringToOfficeId = $this->_willBringToOfficeId;
     $stdClass->specialDeliveryId = $this->_specialDeliveryId;
     $stdClass->amountInsuranceBase = $this->_amountInsuranceBase;
     $stdClass->amountCodBase = $this->_amountCodBase;
     $stdClass->payCodToThirdParty = $this->_payCodToThirdParty;
     $stdClass->retMoneyTransferReqAmount = $this->_retMoneyTransferReqAmount;
     $stdClass->retThirdPartyPayer = $this->_retThirdPartyPayer;
     $stdClass->parcelsCount = $this->_parcelsCount;
     if (isset($this->_size)) {
         $stdClass->size = $this->_size->toStdClass();
     }
     $stdClass->weightDeclared = $this->_weightDeclared;
     $stdClass->contents = $this->_contents;
     $stdClass->packing = $this->_packing;
     $arrStdClassParamPackings = array();
     if (isset($this->_packings)) {
         if (is_array($this->_packings)) {
             for ($i = 0; $i < count($this->_packings); $i++) {
                 $arrStdClassParamPackings[$i] = $this->_packings[$i]->toStdClass();
             }
         } else {
             $arrStdClassParamPackings[0] = $this->_packings->toStdClass();
         }
     }
     $stdClass->packings = $arrStdClassParamPackings;
     $stdClass->packId = $this->_packId;
     $stdClass->documents = $this->_documents;
     $stdClass->fragile = $this->_fragile;
     $stdClass->palletized = $this->_palletized;
     if (isset($this->_sender)) {
         $stdClass->sender = $this->_sender->toStdClass();
     }
     if (isset($this->_receiver)) {
         $stdClass->receiver = $this->_receiver->toStdClass();
     }
     $stdClass->payerType = $this->_payerType;
     $stdClass->payerRefId = $this->_payerRefId;
     $stdClass->payerTypeInsurance = $this->_payerTypeInsurance;
     $stdClass->payerTypePackings = $this->_payerTypePackings;
     $stdClass->payerRefInsuranceId = $this->_payerRefInsuranceId;
     $stdClass->payerRefPackingsId = $this->_payerRefPackingsId;
     $stdClass->noteClient = $this->_noteClient;
     if (isset($this->_discCalc)) {
         $stdClass->discCalc = $this->_discCalc->toStdClass();
     }
     $stdClass->retToClientId = $this->_retToClientId;
     $stdClass->ref1 = $this->_ref1;
     $stdClass->ref2 = $this->_ref2;
     $stdClass->clientSystemId = $this->_clientSystemId;
     $arrStdClassParamParcelInfo = array();
     if (isset($this->_parcels)) {
         if (is_array($this->_parcels)) {
             for ($i = 0; $i < count($this->_parcels); $i++) {
                 $arrStdClassParamParcelInfo[$i] = $this->_parcels[$i]->toStdClass();
             }
         } else {
             $arrStdClassParamParcelInfo[0] = $this->_parcels->toStdClass();
         }
     }
     $stdClass->parcels = $arrStdClassParamParcelInfo;
     $stdClass->skipAutomaticParcelsCreation = $this->_skipAutomaticParcelsCreation;
     $stdClass->pendingParcelsDescription = $this->_pendingParcelsDescription;
     $stdClass->pendingShipmentDescription = $this->_pendingShipmentDescription;
     $arrStdClassParamReturnServiceRequest = array();
     if (isset($this->_retServicesRequest)) {
         if (is_array($this->_retServicesRequest)) {
             for ($i = 0; $i < count($this->_retServicesRequest); $i++) {
                 $arrStdClassParamReturnServiceRequest[$i] = $this->_retServicesRequest[$i]->toStdClass();
             }
         } else {
             $arrStdClassParamReturnServiceRequest[0] = $this->_retServicesRequest->toStdClass();
         }
     }
     $stdClass->retServicesRequest = $arrStdClassParamReturnServiceRequest;
     if (isset($this->_retShipmentRequest)) {
         $stdClass->retShipmentRequest = $this->_retShipmentRequest->toStdClass();
     }
     return $stdClass;
 }