From 05e03b3d27b99b0aef294462497bf9fcbff968f9 Mon Sep 17 00:00:00 2001 From: Ondrej Piza Date: Wed, 8 Jun 2016 21:24:38 +0200 Subject: [PATCH] Added create message feature - updated dmEnvelope and DataBoxSimpleApi --- src/Api/dmEnvelope.php | 291 ++++++++++++++++++++++++++++++++++++++- src/DataBoxSimpleApi.php | 9 +- 2 files changed, 297 insertions(+), 3 deletions(-) diff --git a/src/Api/dmEnvelope.php b/src/Api/dmEnvelope.php index 904beda..0b0a90f 100644 --- a/src/Api/dmEnvelope.php +++ b/src/Api/dmEnvelope.php @@ -4,7 +4,296 @@ class dmEnvelope { - public function __construct() + /** + * @var string + */ + protected $dbIDRecipient; + + /** + * @var string + */ + protected $dmAnnotation; + + /** + * @var string + */ + protected $dmToHands; + + /** + * @var bool + */ + protected $dmPersonalDelivery; + + /** + * @var bool + */ + protected $dmAllowSubstDelivery; + + /** + * @var string + */ + protected $dmLegalTitleLaw; + + /** + * @var int + */ + protected $dmLegalTitleYear; + + /** + * @var int + */ + protected $dmLegalTitleSect; + + /** + * @var int + */ + protected $dmLegalTitlePar; + + /** + * @var string + */ + protected $dmLegalTitlePoint; + + /** + * @var bool + */ + protected $dmPublishOwnID; + + protected $dmType; + + /** + * dmEnvelope constructor. + * + * @param null $dbIDRecipient + * @param null $dmAnnotation + * @param null $dmToHands + * @param null $dmPersonalDelivery + * @param null $dmAllowSubstDelivery + * @param null $dmLegalTitleLaw + * @param null $dmLegalTitleYear + * @param null $dmLegalTitleSect + * @param null $dmLegalTitlePar + * @param null $dmLegalTitlePoint + * @param null $dmPublishOwnID + * @param null $dmType + */ + public function __construct( + $dbIDRecipient = null, + $dmAnnotation = null, + $dmToHands = null, + $dmPersonalDelivery = null, + $dmAllowSubstDelivery = null, + $dmLegalTitleLaw = null, + $dmLegalTitleYear = null, + $dmLegalTitleSect = null, + $dmLegalTitlePar = null, + $dmLegalTitlePoint = null, + $dmPublishOwnID = null, + $dmType = null ) + { + $this->dbIDRecipient = $dbIDRecipient; + $this->dmAnnotation = $dmAnnotation; + $this->dmToHands = $dmToHands; + $this->dmPersonalDelivery = $dmPersonalDelivery; + $this->dmAllowSubstDelivery = $dmAllowSubstDelivery; + $this->dmLegalTitleLaw = $dmLegalTitleLaw; + $this->dmLegalTitleYear = $dmLegalTitleYear; + $this->dmLegalTitleSect = $dmLegalTitleSect; + $this->dmLegalTitlePar = $dmLegalTitlePar; + $this->dmLegalTitlePoint = $dmLegalTitlePoint; + $this->dmPublishOwnID = $dmPublishOwnID; + $this->dmType = $dmType; + } + + /** + * @return string + */ + public function getDbIDRecipient() + { + return $this->dbIDRecipient; + } + + /** + * @param string $dbIDRecipient + */ + public function setDbIDRecipient($dbIDRecipient) + { + $this->dbIDRecipient = $dbIDRecipient; + } + + /** + * @return string + */ + public function getDmAnnotation() + { + return $this->dmAnnotation; + } + + /** + * @param string $dmAnnotation + */ + public function setDmAnnotation($dmAnnotation) + { + $this->dmAnnotation = $dmAnnotation; + } + + /** + * @return string + */ + public function getDmToHands() + { + return $this->dmToHands; + } + + /** + * @param string $dmToHands + */ + public function setDmToHands($dmToHands) + { + $this->dmToHands = $dmToHands; + } + + /** + * @return boolean + */ + public function isDmPersonalDelivery() + { + return $this->dmPersonalDelivery; + } + + /** + * @param boolean $dmPersonalDelivery + */ + public function setDmPersonalDelivery($dmPersonalDelivery) + { + $this->dmPersonalDelivery = $dmPersonalDelivery; + } + + /** + * @return boolean + */ + public function isDmAllowSubstDelivery() + { + return $this->dmAllowSubstDelivery; + } + + /** + * @param boolean $dmAllowSubstDelivery + */ + public function setDmAllowSubstDelivery($dmAllowSubstDelivery) + { + $this->dmAllowSubstDelivery = $dmAllowSubstDelivery; + } + + /** + * @return string + */ + public function getDmLegalTitleLaw() + { + return $this->dmLegalTitleLaw; + } + + /** + * @param string $dmLegalTitleLaw + */ + public function setDmLegalTitleLaw($dmLegalTitleLaw) + { + $this->dmLegalTitleLaw = $dmLegalTitleLaw; + } + + /** + * @return int + */ + public function getDmLegalTitleYear() + { + return $this->dmLegalTitleYear; + } + + /** + * @param int $dmLegalTitleYear + */ + public function setDmLegalTitleYear($dmLegalTitleYear) + { + $this->dmLegalTitleYear = $dmLegalTitleYear; + } + + /** + * @return int + */ + public function getDmLegalTitleSect() + { + return $this->dmLegalTitleSect; + } + + /** + * @param int $dmLegalTitleSect + */ + public function setDmLegalTitleSect($dmLegalTitleSect) + { + $this->dmLegalTitleSect = $dmLegalTitleSect; + } + + /** + * @return int + */ + public function getDmLegalTitlePar() + { + return $this->dmLegalTitlePar; + } + + /** + * @param int $dmLegalTitlePar + */ + public function setDmLegalTitlePar($dmLegalTitlePar) + { + $this->dmLegalTitlePar = $dmLegalTitlePar; + } + + /** + * @return string + */ + public function getDmLegalTitlePoint() + { + return $this->dmLegalTitlePoint; + } + + /** + * @param string $dmLegalTitlePoint + */ + public function setDmLegalTitlePoint($dmLegalTitlePoint) + { + $this->dmLegalTitlePoint = $dmLegalTitlePoint; + } + + /** + * @return boolean + */ + public function isDmPublishOwnID() + { + return $this->dmPublishOwnID; + } + + /** + * @param boolean $dmPublishOwnID + */ + public function setDmPublishOwnID($dmPublishOwnID) + { + $this->dmPublishOwnID = $dmPublishOwnID; + } + + /** + * @return mixed + */ + public function getDmType() + { + return $this->dmType; + } + + /** + * @param mixed $dmType + */ + public function setDmType($dmType) { + $this->dmType = $dmType; } } diff --git a/src/DataBoxSimpleApi.php b/src/DataBoxSimpleApi.php index cabf8bd..6509fc5 100644 --- a/src/DataBoxSimpleApi.php +++ b/src/DataBoxSimpleApi.php @@ -11,6 +11,8 @@ use Defr\CzechDataBox\Api\tIDMessInput; use Defr\CzechDataBox\Api\tListOfFReceivedInput; use Defr\CzechDataBox\Api\tListOfSentInput; +use Defr\CzechDataBox\Api\tMessageCreateInput; +use Defr\CzechDataBox\Api\tMessageCreateOutput; use Defr\CzechDataBox\Api\tNumOfMessagesInput; use Defr\CzechDataBox\Api\tRecord; @@ -231,11 +233,14 @@ public function getReceivedDataMessageAttachments($dataMessageId) /** * Pošle datovou zprávu. * + * @param tMessageCreateInput $messageToSent + * + * @return tMessageCreateOutput * @throws DataBoxException */ - public function sendDataMessage() + public function sendDataMessage(tMessageCreateInput $messageToSent) { - throw new DataBoxException('Not implemented yet.'); + return $this->dataBox->DmOperationsWebService()->CreateMessage($messageToSent); } /**