From ab7ff6427d32e2e32d999c2c33411ff4ae013903 Mon Sep 17 00:00:00 2001 From: ekta-slt Date: Thu, 26 Oct 2017 14:58:58 +0530 Subject: [PATCH] getEmailEventReport spec update --- docs/Model/GetEmailEventReportEvents.md | 3 +- lib/Model/GetEmailEventReportEvents.php | 49 +++++++++++++++----- test/Model/GetEmailEventReportEventsTest.php | 7 +++ 3 files changed, 47 insertions(+), 12 deletions(-) diff --git a/docs/Model/GetEmailEventReportEvents.md b/docs/Model/GetEmailEventReportEvents.md index 6e30411b..92e45b93 100644 --- a/docs/Model/GetEmailEventReportEvents.md +++ b/docs/Model/GetEmailEventReportEvents.md @@ -8,10 +8,11 @@ Name | Type | Description | Notes **subject** | **string** | Subject of the event | [optional] **messageId** | **string** | Message ID which generated the event | **event** | **string** | Event which occurred | -**reason** | **string** | Reason of bounce (only available if the event is hardbounce or softbounce) | +**reason** | **string** | Reason of bounce (only available if the event is hardbounce or softbounce) | [optional] **tag** | **string** | Tag of the email which generated the event | **ip** | **string** | IP from which the user has opened the email or clicked on the link (only available if the event is opened or clicks) | [optional] **link** | **string** | The link which is sent to the user (only available if the event is requests or opened or clicks) | [optional] +**from** | **string** | Sender email from which the emails are sent | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/lib/Model/GetEmailEventReportEvents.php b/lib/Model/GetEmailEventReportEvents.php index a47e2ab2..193583cb 100644 --- a/lib/Model/GetEmailEventReportEvents.php +++ b/lib/Model/GetEmailEventReportEvents.php @@ -62,7 +62,8 @@ class GetEmailEventReportEvents implements ArrayAccess 'reason' => 'string', 'tag' => 'string', 'ip' => 'string', - 'link' => 'string' + 'link' => 'string', + 'from' => 'string' ]; /** @@ -71,14 +72,15 @@ class GetEmailEventReportEvents implements ArrayAccess */ protected static $swaggerFormats = [ 'email' => 'email', - 'date' => 'date', + 'date' => 'date-time', 'subject' => null, 'messageId' => null, 'event' => null, 'reason' => null, 'tag' => null, 'ip' => null, - 'link' => null + 'link' => null, + 'from' => 'email' ]; public static function swaggerTypes() @@ -104,7 +106,8 @@ public static function swaggerFormats() 'reason' => 'reason', 'tag' => 'tag', 'ip' => 'ip', - 'link' => 'link' + 'link' => 'link', + 'from' => 'from' ]; @@ -121,7 +124,8 @@ public static function swaggerFormats() 'reason' => 'setReason', 'tag' => 'setTag', 'ip' => 'setIp', - 'link' => 'setLink' + 'link' => 'setLink', + 'from' => 'setFrom' ]; @@ -138,7 +142,8 @@ public static function swaggerFormats() 'reason' => 'getReason', 'tag' => 'getTag', 'ip' => 'getIp', - 'link' => 'getLink' + 'link' => 'getLink', + 'from' => 'getFrom' ]; public static function attributeMap() @@ -213,6 +218,7 @@ public function __construct(array $data = null) $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; $this->container['link'] = isset($data['link']) ? $data['link'] : null; + $this->container['from'] = isset($data['from']) ? $data['from'] : null; } /** @@ -244,12 +250,12 @@ public function listInvalidProperties() ); } - if ($this->container['reason'] === null) { - $invalid_properties[] = "'reason' can't be null"; - } if ($this->container['tag'] === null) { $invalid_properties[] = "'tag' can't be null"; } + if ($this->container['from'] === null) { + $invalid_properties[] = "'from' can't be null"; + } return $invalid_properties; } @@ -278,10 +284,10 @@ public function valid() if (!in_array($this->container['event'], $allowed_values)) { return false; } - if ($this->container['reason'] === null) { + if ($this->container['tag'] === null) { return false; } - if ($this->container['tag'] === null) { + if ($this->container['from'] === null) { return false; } return true; @@ -485,6 +491,27 @@ public function setLink($link) return $this; } + + /** + * Gets from + * @return string + */ + public function getFrom() + { + return $this->container['from']; + } + + /** + * Sets from + * @param string $from Sender email from which the emails are sent + * @return $this + */ + public function setFrom($from) + { + $this->container['from'] = $from; + + return $this; + } /** * Returns true if offset exists. False otherwise. * @param integer $offset Offset diff --git a/test/Model/GetEmailEventReportEventsTest.php b/test/Model/GetEmailEventReportEventsTest.php index 862efeb8..3fe3a90f 100644 --- a/test/Model/GetEmailEventReportEventsTest.php +++ b/test/Model/GetEmailEventReportEventsTest.php @@ -139,4 +139,11 @@ public function testPropertyIp() public function testPropertyLink() { } + + /** + * Test attribute "from" + */ + public function testPropertyFrom() + { + } }