|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Hborras\TwitterAdsSDK\TwitterAds\Creative; |
|
4
|
|
|
|
|
5
|
|
|
use Hborras\TwitterAdsSDK\TwitterAds\Fields\VideoConversationCardFields; |
|
6
|
|
|
use Hborras\TwitterAdsSDK\TwitterAds\Resource; |
|
7
|
|
|
|
|
8
|
|
|
class VideoConversationCard extends Resource |
|
9
|
|
|
{ |
|
10
|
|
|
const RESOURCE_COLLECTION = 'accounts/{account_id}/cards/video_conversation'; |
|
11
|
|
|
const RESOURCE = 'accounts/{account_id}/cards/video_conversation/{id}'; |
|
12
|
|
|
|
|
13
|
|
|
/** Read Only */ |
|
14
|
|
|
protected $id; |
|
15
|
|
|
protected $video_url; |
|
16
|
|
|
protected $video_poster_url; |
|
17
|
|
|
protected $created_at; |
|
18
|
|
|
protected $updated_at; |
|
19
|
|
|
protected $deleted; |
|
20
|
|
|
|
|
21
|
|
|
protected $properties = [ |
|
22
|
|
|
VideoConversationCardFields::NAME, |
|
23
|
|
|
VideoConversationCardFields::TITLE, |
|
24
|
|
|
VideoConversationCardFields::FIRST_CTA, |
|
25
|
|
|
VideoConversationCardFields::FIRST_CTA_TWEET, |
|
26
|
|
|
VideoConversationCardFields::SECOND_CTA, |
|
27
|
|
|
VideoConversationCardFields::SECOND_CTA_TWEET, |
|
28
|
|
|
VideoConversationCardFields::THANK_YOU_TEXT, |
|
29
|
|
|
VideoConversationCardFields::THANK_YOU_URL, |
|
30
|
|
|
VideoConversationCardFields::IMAGE_MEDIA_ID, |
|
31
|
|
|
VideoConversationCardFields::VIDEO_ID, |
|
32
|
|
|
]; |
|
33
|
|
|
|
|
34
|
|
|
/** Writable */ |
|
35
|
|
|
protected $name; |
|
36
|
|
|
protected $title; |
|
37
|
|
|
protected $first_cta; |
|
38
|
|
|
protected $first_cta_tweet; |
|
39
|
|
|
protected $second_cta; |
|
40
|
|
|
protected $second_cta_tweet; |
|
41
|
|
|
protected $thank_you_text; |
|
42
|
|
|
protected $thank_you_url; |
|
43
|
|
|
protected $image_media_id; |
|
44
|
|
|
protected $video_id; |
|
45
|
|
|
|
|
46
|
|
|
/** |
|
47
|
|
|
* @return mixed |
|
48
|
|
|
*/ |
|
49
|
|
|
public function getId() |
|
50
|
|
|
{ |
|
51
|
|
|
return $this->id; |
|
52
|
|
|
} |
|
53
|
|
|
|
|
54
|
|
|
/** |
|
55
|
|
|
* @return mixed |
|
56
|
|
|
*/ |
|
57
|
|
|
public function getCreatedAt() |
|
58
|
|
|
{ |
|
59
|
|
|
return $this->created_at; |
|
60
|
|
|
} |
|
61
|
|
|
|
|
62
|
|
|
/** |
|
63
|
|
|
* @return mixed |
|
64
|
|
|
*/ |
|
65
|
|
|
public function getUpdatedAt() |
|
66
|
|
|
{ |
|
67
|
|
|
return $this->updated_at; |
|
68
|
|
|
} |
|
69
|
|
|
|
|
70
|
|
|
/** |
|
71
|
|
|
* @return mixed |
|
72
|
|
|
*/ |
|
73
|
|
|
public function getDeleted() |
|
74
|
|
|
{ |
|
75
|
|
|
return $this->deleted; |
|
76
|
|
|
} |
|
77
|
|
|
|
|
78
|
|
|
/** |
|
79
|
|
|
* @return array |
|
80
|
|
|
*/ |
|
81
|
|
|
public function getProperties() |
|
82
|
|
|
{ |
|
83
|
|
|
return $this->properties; |
|
84
|
|
|
} |
|
85
|
|
|
|
|
86
|
|
|
/** |
|
87
|
|
|
* @param array $properties |
|
88
|
|
|
*/ |
|
89
|
|
|
public function setProperties($properties) |
|
90
|
|
|
{ |
|
91
|
|
|
$this->properties = $properties; |
|
92
|
|
|
} |
|
93
|
|
|
|
|
94
|
|
|
/** |
|
95
|
|
|
* @return mixed |
|
96
|
|
|
*/ |
|
97
|
|
|
public function getName() |
|
98
|
|
|
{ |
|
99
|
|
|
return $this->name; |
|
100
|
|
|
} |
|
101
|
|
|
|
|
102
|
|
|
/** |
|
103
|
|
|
* @param mixed $name |
|
104
|
|
|
*/ |
|
105
|
|
|
public function setName($name) |
|
106
|
|
|
{ |
|
107
|
|
|
$this->name = $name; |
|
108
|
|
|
} |
|
109
|
|
|
|
|
110
|
|
|
/** |
|
111
|
|
|
* @return mixed |
|
112
|
|
|
*/ |
|
113
|
|
|
public function getTitle() |
|
114
|
|
|
{ |
|
115
|
|
|
return $this->title; |
|
116
|
|
|
} |
|
117
|
|
|
|
|
118
|
|
|
/** |
|
119
|
|
|
* @param mixed $title |
|
120
|
|
|
*/ |
|
121
|
|
|
public function setTitle($title) |
|
122
|
|
|
{ |
|
123
|
|
|
$this->title = $title; |
|
124
|
|
|
} |
|
125
|
|
|
|
|
126
|
|
|
/** |
|
127
|
|
|
* @return mixed |
|
128
|
|
|
*/ |
|
129
|
|
|
public function getFirstCta() |
|
130
|
|
|
{ |
|
131
|
|
|
return $this->first_cta; |
|
132
|
|
|
} |
|
133
|
|
|
|
|
134
|
|
|
/** |
|
135
|
|
|
* @param mixed $first_cta |
|
136
|
|
|
*/ |
|
137
|
|
|
public function setFirstCta($first_cta) |
|
138
|
|
|
{ |
|
139
|
|
|
$this->first_cta = $first_cta; |
|
140
|
|
|
} |
|
141
|
|
|
|
|
142
|
|
|
/** |
|
143
|
|
|
* @return mixed |
|
144
|
|
|
*/ |
|
145
|
|
|
public function getFirstCtaTweet() |
|
146
|
|
|
{ |
|
147
|
|
|
return $this->first_cta_tweet; |
|
148
|
|
|
} |
|
149
|
|
|
|
|
150
|
|
|
/** |
|
151
|
|
|
* @param mixed $first_cta_tweet |
|
152
|
|
|
*/ |
|
153
|
|
|
public function setFirstCtaTweet($first_cta_tweet) |
|
154
|
|
|
{ |
|
155
|
|
|
$this->first_cta_tweet = $first_cta_tweet; |
|
156
|
|
|
} |
|
157
|
|
|
|
|
158
|
|
|
/** |
|
159
|
|
|
* @return mixed |
|
160
|
|
|
*/ |
|
161
|
|
|
public function getSecondCta() |
|
162
|
|
|
{ |
|
163
|
|
|
return $this->second_cta; |
|
164
|
|
|
} |
|
165
|
|
|
|
|
166
|
|
|
/** |
|
167
|
|
|
* @param mixed $second_cta |
|
168
|
|
|
*/ |
|
169
|
|
|
public function setSecondCta($second_cta) |
|
170
|
|
|
{ |
|
171
|
|
|
$this->second_cta = $second_cta; |
|
172
|
|
|
} |
|
173
|
|
|
|
|
174
|
|
|
/** |
|
175
|
|
|
* @return mixed |
|
176
|
|
|
*/ |
|
177
|
|
|
public function getSecondCtaTweet() |
|
178
|
|
|
{ |
|
179
|
|
|
return $this->second_cta_tweet; |
|
180
|
|
|
} |
|
181
|
|
|
|
|
182
|
|
|
/** |
|
183
|
|
|
* @param mixed $second_cta_tweet |
|
184
|
|
|
*/ |
|
185
|
|
|
public function setSecondCtaTweet($second_cta_tweet) |
|
186
|
|
|
{ |
|
187
|
|
|
$this->second_cta_tweet = $second_cta_tweet; |
|
188
|
|
|
} |
|
189
|
|
|
|
|
190
|
|
|
/** |
|
191
|
|
|
* @return mixed |
|
192
|
|
|
*/ |
|
193
|
|
|
public function getThankYouText() |
|
194
|
|
|
{ |
|
195
|
|
|
return $this->thank_you_text; |
|
196
|
|
|
} |
|
197
|
|
|
|
|
198
|
|
|
/** |
|
199
|
|
|
* @param mixed $thank_you_text |
|
200
|
|
|
*/ |
|
201
|
|
|
public function setThankYouText($thank_you_text) |
|
202
|
|
|
{ |
|
203
|
|
|
$this->thank_you_text = $thank_you_text; |
|
204
|
|
|
} |
|
205
|
|
|
|
|
206
|
|
|
/** |
|
207
|
|
|
* @return mixed |
|
208
|
|
|
*/ |
|
209
|
|
|
public function getThankYouUrl() |
|
210
|
|
|
{ |
|
211
|
|
|
return $this->thank_you_url; |
|
212
|
|
|
} |
|
213
|
|
|
|
|
214
|
|
|
/** |
|
215
|
|
|
* @param mixed $thank_you_url |
|
216
|
|
|
*/ |
|
217
|
|
|
public function setThankYouUrl($thank_you_url) |
|
218
|
|
|
{ |
|
219
|
|
|
$this->thank_you_url = $thank_you_url; |
|
220
|
|
|
} |
|
221
|
|
|
|
|
222
|
|
|
/** |
|
223
|
|
|
* @return mixed |
|
224
|
|
|
*/ |
|
225
|
|
|
public function getImageMediaId() |
|
226
|
|
|
{ |
|
227
|
|
|
return $this->image_media_id; |
|
228
|
|
|
} |
|
229
|
|
|
|
|
230
|
|
|
/** |
|
231
|
|
|
* @param mixed $image_media_id |
|
232
|
|
|
*/ |
|
233
|
|
|
public function setImageMediaId($image_media_id) |
|
234
|
|
|
{ |
|
235
|
|
|
$this->image_media_id = $image_media_id; |
|
236
|
|
|
} |
|
237
|
|
|
|
|
238
|
|
|
/** |
|
239
|
|
|
* @return mixed |
|
240
|
|
|
*/ |
|
241
|
|
|
public function getVideoId() |
|
242
|
|
|
{ |
|
243
|
|
|
return $this->video_id; |
|
244
|
|
|
} |
|
245
|
|
|
|
|
246
|
|
|
/** |
|
247
|
|
|
* @param mixed $video_id |
|
248
|
|
|
*/ |
|
249
|
|
|
public function setVideoId($video_id) |
|
250
|
|
|
{ |
|
251
|
|
|
$this->video_id = $video_id; |
|
252
|
|
|
} |
|
253
|
|
|
|
|
254
|
|
|
/** |
|
255
|
|
|
* @return mixed |
|
256
|
|
|
*/ |
|
257
|
|
|
public function getVideoUrl() |
|
258
|
|
|
{ |
|
259
|
|
|
return $this->video_url; |
|
260
|
|
|
} |
|
261
|
|
|
|
|
262
|
|
|
/** |
|
263
|
|
|
* @return mixed |
|
264
|
|
|
*/ |
|
265
|
|
|
public function getVideoPosterUrl() |
|
266
|
|
|
{ |
|
267
|
|
|
return $this->video_poster_url; |
|
268
|
|
|
} |
|
269
|
|
|
} |
|
270
|
|
|
|