diff options
author | Hannes Kindströmmer <hannes@kindstrommer.se> | 2017-03-20 17:27:17 +0100 |
---|---|---|
committer | Hannes Kindströmmer <hannes@kindstrommer.se> | 2017-03-21 11:35:46 +0100 |
commit | f313441ad70905c67e5a81c88f57b3d9d2535570 (patch) | |
tree | 27ad2093b80695ac9802aad16bddd6503f0a5ef9 /src | |
parent | e3f2ed7d4ac64d23983739c90c97d7bee8df4dd3 (diff) | |
download | ip1-php-sdk-f313441ad70905c67e5a81c88f57b3d9d2535570.zip ip1-php-sdk-f313441ad70905c67e5a81c88f57b3d9d2535570.tar.gz ip1-php-sdk-f313441ad70905c67e5a81c88f57b3d9d2535570.tar.bz2 |
Implement OwnerID into Membership
Signed-off-by: Hannes Kindströmmer <hannes@kindstrommer.se>
Diffstat (limited to 'src')
-rw-r--r-- | src/Recipient/ProcessedMembership.php | 17 | ||||
-rw-r--r-- | src/Recipient/RecipientFactory.php | 1 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/Recipient/ProcessedMembership.php b/src/Recipient/ProcessedMembership.php index 28160d6..830354e 100644 --- a/src/Recipient/ProcessedMembership.php +++ b/src/Recipient/ProcessedMembership.php @@ -31,16 +31,23 @@ class ProcessedMembership extends Membership implements ProcessedComponentInterf */ private $created; /** + * ID of account owning the membership + * @var string $ownerID + */ + private $ownerID; + /** * ProcessedMembership Constructor * @param integer $groupID The ID of the group. * @param integer $contactID The ID of the contact. * @param integer $membershipID The ID of the membership. + * @param string $ownerID ID of account owning the membership. * @param \DateTime $created When the Membership was created. */ - public function __construct(int $groupID, int $contactID, int $membershipID, \DateTime $created) + public function __construct(int $groupID, int $contactID, int $membershipID, string $ownerID, \DateTime $created) { parent::__construct($groupID, $contactID); $this->membershipID = $membershipID; + $this->ownerID = $ownerID; $this->created = $created; } @@ -53,6 +60,14 @@ class ProcessedMembership extends Membership implements ProcessedComponentInterf return $this->membershipID; } /** + * Returns ID of account owning the Membership + * @return string ID of account owning the Membership + */ + public function getOwnerID(): string + { + return $this->ownerID; + } + /** * @param \DateTimeZone $timezone The timezone that the user wants to get the DateTime in. Default is UTC. * @return \DateTime|null When the Component was added. */ diff --git a/src/Recipient/RecipientFactory.php b/src/Recipient/RecipientFactory.php index 3fffe39..0003b44 100644 --- a/src/Recipient/RecipientFactory.php +++ b/src/Recipient/RecipientFactory.php @@ -191,6 +191,7 @@ class RecipientFactory $stdMembership->Group, $stdMembership->Contact, $stdMembership->ID, + $stdMembership->OwnerID, new \DateTime($stdMembership->Created) ); } |