Skip to content

Commit ab7ff64

Browse files
committed
getEmailEventReport spec update
1 parent 2e5f526 commit ab7ff64

File tree

3 files changed

+47
-12
lines changed

3 files changed

+47
-12
lines changed

docs/Model/GetEmailEventReportEvents.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ Name | Type | Description | Notes
88
**subject** | **string** | Subject of the event | [optional]
99
**messageId** | **string** | Message ID which generated the event |
1010
**event** | **string** | Event which occurred |
11-
**reason** | **string** | Reason of bounce (only available if the event is hardbounce or softbounce) |
11+
**reason** | **string** | Reason of bounce (only available if the event is hardbounce or softbounce) | [optional]
1212
**tag** | **string** | Tag of the email which generated the event |
1313
**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]
1414
**link** | **string** | The link which is sent to the user (only available if the event is requests or opened or clicks) | [optional]
15+
**from** | **string** | Sender email from which the emails are sent |
1516

1617
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
1718

lib/Model/GetEmailEventReportEvents.php

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ class GetEmailEventReportEvents implements ArrayAccess
6262
'reason' => 'string',
6363
'tag' => 'string',
6464
'ip' => 'string',
65-
'link' => 'string'
65+
'link' => 'string',
66+
'from' => 'string'
6667
];
6768

6869
/**
@@ -71,14 +72,15 @@ class GetEmailEventReportEvents implements ArrayAccess
7172
*/
7273
protected static $swaggerFormats = [
7374
'email' => 'email',
74-
'date' => 'date',
75+
'date' => 'date-time',
7576
'subject' => null,
7677
'messageId' => null,
7778
'event' => null,
7879
'reason' => null,
7980
'tag' => null,
8081
'ip' => null,
81-
'link' => null
82+
'link' => null,
83+
'from' => 'email'
8284
];
8385

8486
public static function swaggerTypes()
@@ -104,7 +106,8 @@ public static function swaggerFormats()
104106
'reason' => 'reason',
105107
'tag' => 'tag',
106108
'ip' => 'ip',
107-
'link' => 'link'
109+
'link' => 'link',
110+
'from' => 'from'
108111
];
109112

110113

@@ -121,7 +124,8 @@ public static function swaggerFormats()
121124
'reason' => 'setReason',
122125
'tag' => 'setTag',
123126
'ip' => 'setIp',
124-
'link' => 'setLink'
127+
'link' => 'setLink',
128+
'from' => 'setFrom'
125129
];
126130

127131

@@ -138,7 +142,8 @@ public static function swaggerFormats()
138142
'reason' => 'getReason',
139143
'tag' => 'getTag',
140144
'ip' => 'getIp',
141-
'link' => 'getLink'
145+
'link' => 'getLink',
146+
'from' => 'getFrom'
142147
];
143148

144149
public static function attributeMap()
@@ -213,6 +218,7 @@ public function __construct(array $data = null)
213218
$this->container['tag'] = isset($data['tag']) ? $data['tag'] : null;
214219
$this->container['ip'] = isset($data['ip']) ? $data['ip'] : null;
215220
$this->container['link'] = isset($data['link']) ? $data['link'] : null;
221+
$this->container['from'] = isset($data['from']) ? $data['from'] : null;
216222
}
217223

218224
/**
@@ -244,12 +250,12 @@ public function listInvalidProperties()
244250
);
245251
}
246252

247-
if ($this->container['reason'] === null) {
248-
$invalid_properties[] = "'reason' can't be null";
249-
}
250253
if ($this->container['tag'] === null) {
251254
$invalid_properties[] = "'tag' can't be null";
252255
}
256+
if ($this->container['from'] === null) {
257+
$invalid_properties[] = "'from' can't be null";
258+
}
253259
return $invalid_properties;
254260
}
255261

@@ -278,10 +284,10 @@ public function valid()
278284
if (!in_array($this->container['event'], $allowed_values)) {
279285
return false;
280286
}
281-
if ($this->container['reason'] === null) {
287+
if ($this->container['tag'] === null) {
282288
return false;
283289
}
284-
if ($this->container['tag'] === null) {
290+
if ($this->container['from'] === null) {
285291
return false;
286292
}
287293
return true;
@@ -485,6 +491,27 @@ public function setLink($link)
485491

486492
return $this;
487493
}
494+
495+
/**
496+
* Gets from
497+
* @return string
498+
*/
499+
public function getFrom()
500+
{
501+
return $this->container['from'];
502+
}
503+
504+
/**
505+
* Sets from
506+
* @param string $from Sender email from which the emails are sent
507+
* @return $this
508+
*/
509+
public function setFrom($from)
510+
{
511+
$this->container['from'] = $from;
512+
513+
return $this;
514+
}
488515
/**
489516
* Returns true if offset exists. False otherwise.
490517
* @param integer $offset Offset

test/Model/GetEmailEventReportEventsTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,11 @@ public function testPropertyIp()
139139
public function testPropertyLink()
140140
{
141141
}
142+
143+
/**
144+
* Test attribute "from"
145+
*/
146+
public function testPropertyFrom()
147+
{
148+
}
142149
}

0 commit comments

Comments
 (0)