|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Hborras\TwitterAdsSDK\TwitterAds\Creative; |
|
4
|
|
|
|
|
5
|
|
|
use Hborras\TwitterAdsSDK\TwitterAds\Resource; |
|
6
|
|
|
use Hborras\TwitterAdsSDK\TwitterAds\Fields\WebsiteCardFields; |
|
7
|
|
|
|
|
8
|
|
|
/** |
|
9
|
|
|
* Class WebsiteCard |
|
10
|
|
|
* @package Hborras\TwitterAdsSDK\TwitterAds\Creative |
|
11
|
|
|
*/ |
|
12
|
|
|
class WebsiteCard extends Resource |
|
13
|
|
|
{ |
|
14
|
|
|
const RESOURCE_COLLECTION = 'accounts/{account_id}/cards/website'; |
|
15
|
|
|
const RESOURCE = 'accounts/{account_id}/cards/website/{id}'; |
|
16
|
|
|
|
|
17
|
|
|
/** Read Only */ |
|
18
|
|
|
protected $id; |
|
19
|
|
|
protected $card_uri; |
|
20
|
|
|
protected $created_at; |
|
21
|
|
|
protected $updated_at; |
|
22
|
|
|
protected $deleted; |
|
23
|
|
|
|
|
24
|
|
|
protected $properties = [ |
|
25
|
|
|
WebsiteCardFields::NAME, |
|
26
|
|
|
WebsiteCardFields::WEBSITE_TITLE, |
|
27
|
|
|
WebsiteCardFields::WEBSITE_URL, |
|
28
|
|
|
WebsiteCardFields::IMAGE_MEDIA_ID, |
|
29
|
|
|
]; |
|
30
|
|
|
|
|
31
|
|
|
/** Writable */ |
|
32
|
|
|
protected $name; |
|
33
|
|
|
protected $website_title; |
|
34
|
|
|
protected $website_url; |
|
35
|
|
|
protected $image_media_id; |
|
36
|
|
|
|
|
37
|
|
|
/** |
|
38
|
|
|
* @return mixed |
|
39
|
|
|
*/ |
|
40
|
|
|
public function getId() |
|
41
|
|
|
{ |
|
42
|
|
|
return $this->id; |
|
43
|
|
|
} |
|
44
|
|
|
|
|
45
|
|
|
/** |
|
46
|
|
|
* @param array $properties |
|
47
|
|
|
*/ |
|
48
|
|
|
public function setProperties($properties) |
|
49
|
|
|
{ |
|
50
|
|
|
$this->properties = $properties; |
|
51
|
|
|
} |
|
52
|
|
|
|
|
53
|
|
|
/** |
|
54
|
|
|
* @return mixed |
|
55
|
|
|
*/ |
|
56
|
|
|
public function getName() |
|
57
|
|
|
{ |
|
58
|
|
|
return $this->name; |
|
59
|
|
|
} |
|
60
|
|
|
|
|
61
|
|
|
/** |
|
62
|
|
|
* @param mixed $name |
|
63
|
|
|
*/ |
|
64
|
|
|
public function setName($name) |
|
65
|
|
|
{ |
|
66
|
|
|
$this->name = $name; |
|
67
|
|
|
} |
|
68
|
|
|
|
|
69
|
|
|
/** |
|
70
|
|
|
* @return mixed |
|
71
|
|
|
*/ |
|
72
|
|
|
public function getWebsiteTitle() |
|
73
|
|
|
{ |
|
74
|
|
|
return $this->website_title; |
|
75
|
|
|
} |
|
76
|
|
|
|
|
77
|
|
|
/** |
|
78
|
|
|
* @param mixed $website_title |
|
79
|
|
|
*/ |
|
80
|
|
|
public function setWebsiteTitle($website_title) |
|
81
|
|
|
{ |
|
82
|
|
|
$this->website_title = $website_title; |
|
83
|
|
|
} |
|
84
|
|
|
|
|
85
|
|
|
/** |
|
86
|
|
|
* @return mixed |
|
87
|
|
|
*/ |
|
88
|
|
|
public function getWebsiteUrl() |
|
89
|
|
|
{ |
|
90
|
|
|
return $this->website_url; |
|
91
|
|
|
} |
|
92
|
|
|
|
|
93
|
|
|
/** |
|
94
|
|
|
* @param mixed $website_url |
|
95
|
|
|
*/ |
|
96
|
|
|
public function setWebsiteUrl($website_url) |
|
97
|
|
|
{ |
|
98
|
|
|
$this->website_url = $website_url; |
|
99
|
|
|
} |
|
100
|
|
|
|
|
101
|
|
|
/** |
|
102
|
|
|
* @return mixed |
|
103
|
|
|
*/ |
|
104
|
|
|
public function getImageMediaId() |
|
105
|
|
|
{ |
|
106
|
|
|
return $this->image_media_id; |
|
107
|
|
|
} |
|
108
|
|
|
|
|
109
|
|
|
/** |
|
110
|
|
|
* @param mixed $image_media_id |
|
111
|
|
|
*/ |
|
112
|
|
|
public function setImageMediaId($image_media_id) |
|
113
|
|
|
{ |
|
114
|
|
|
$this->image_media_id = $image_media_id; |
|
115
|
|
|
} |
|
116
|
|
|
|
|
117
|
|
|
/** |
|
118
|
|
|
* @return mixed |
|
119
|
|
|
*/ |
|
120
|
|
|
public function getCardUri() |
|
121
|
|
|
{ |
|
122
|
|
|
return $this->card_uri; |
|
123
|
|
|
} |
|
124
|
|
|
|
|
125
|
|
|
/** |
|
126
|
|
|
* @return mixed |
|
127
|
|
|
*/ |
|
128
|
|
|
public function getCreatedAt() |
|
129
|
|
|
{ |
|
130
|
|
|
return $this->created_at; |
|
131
|
|
|
} |
|
132
|
|
|
|
|
133
|
|
|
/** |
|
134
|
|
|
* @return mixed |
|
135
|
|
|
*/ |
|
136
|
|
|
public function getUpdatedAt() |
|
137
|
|
|
{ |
|
138
|
|
|
return $this->updated_at; |
|
139
|
|
|
} |
|
140
|
|
|
|
|
141
|
|
|
/** |
|
142
|
|
|
* @return mixed |
|
143
|
|
|
*/ |
|
144
|
|
|
public function getDeleted() |
|
145
|
|
|
{ |
|
146
|
|
|
return $this->deleted; |
|
147
|
|
|
} |
|
148
|
|
|
} |
|
149
|
|
|
|