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