diff options
-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) ); } |