1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Hborras\TwitterAdsSDK\TwitterAds\Campaign; |
4
|
|
|
|
5
|
|
|
use Hborras\TwitterAdsSDK\TwitterAds\Analytics; |
6
|
|
|
use Hborras\TwitterAdsSDK\TwitterAds\Fields\AnalyticsFields; |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* Created by PhpStorm. |
10
|
|
|
* User: hborras |
11
|
|
|
* Date: 3/04/16 |
12
|
|
|
* Time: 10:43. |
13
|
|
|
*/ |
14
|
|
|
class FundingInstrument extends Analytics |
15
|
|
|
{ |
16
|
|
|
const RESOURCE_COLLECTION = 'accounts/{account_id}/funding_instruments'; |
17
|
|
|
const RESOURCE = 'accounts/{account_id}/funding_instruments/{id}'; |
18
|
|
|
|
19
|
|
|
const ENTITY = 'FUNDING_INSTRUMENT'; |
20
|
|
|
|
21
|
|
|
protected $id; |
22
|
|
|
protected $name; |
23
|
|
|
protected $cancelled; |
24
|
|
|
protected $credit_limit_local_micro; |
25
|
|
|
protected $currency; |
26
|
|
|
protected $description; |
27
|
|
|
protected $funded_amount_local_micro; |
28
|
|
|
protected $type; |
29
|
|
|
protected $created_at; |
30
|
|
|
protected $updated_at; |
31
|
|
|
protected $deleted; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @param $metricGroups |
35
|
|
|
* @param array $params |
36
|
|
|
* @param bool $async |
37
|
|
|
* @return mixed |
38
|
|
|
*/ |
39
|
|
|
public function stats($metricGroups, $params = [], $async = false) |
40
|
|
|
{ |
41
|
|
|
$params[AnalyticsFields::ENTITY] = AnalyticsFields::FUNDING_INSTRUMENT; |
42
|
|
|
return parent::stats($metricGroups, $params, $async); |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* @return mixed |
47
|
|
|
*/ |
48
|
|
|
public function getId() |
49
|
|
|
{ |
50
|
|
|
return $this->id; |
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @return mixed |
55
|
|
|
*/ |
56
|
|
|
public function getName() |
57
|
|
|
{ |
58
|
|
|
return $this->name; |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* @return mixed |
63
|
|
|
*/ |
64
|
|
|
public function getCancelled() |
65
|
|
|
{ |
66
|
|
|
return $this->cancelled; |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* @return mixed |
71
|
|
|
*/ |
72
|
|
|
public function getCreditLimitLocalMicro() |
73
|
|
|
{ |
74
|
|
|
return $this->credit_limit_local_micro; |
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* @return mixed |
79
|
|
|
*/ |
80
|
|
|
public function getCurrency() |
81
|
|
|
{ |
82
|
|
|
return $this->currency; |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* @return mixed |
87
|
|
|
*/ |
88
|
|
|
public function getDescription() |
89
|
|
|
{ |
90
|
|
|
return $this->description; |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
/** |
94
|
|
|
* @return mixed |
95
|
|
|
*/ |
96
|
|
|
public function getFundedAmountLocalMicro() |
97
|
|
|
{ |
98
|
|
|
return $this->funded_amount_local_micro; |
99
|
|
|
} |
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* @return mixed |
103
|
|
|
*/ |
104
|
|
|
public function getType() |
105
|
|
|
{ |
106
|
|
|
return $this->type; |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* @return mixed |
111
|
|
|
*/ |
112
|
|
|
public function getCreatedAt() |
113
|
|
|
{ |
114
|
|
|
return $this->created_at; |
115
|
|
|
} |
116
|
|
|
|
117
|
|
|
/** |
118
|
|
|
* @return mixed |
119
|
|
|
*/ |
120
|
|
|
public function getUpdatedAt() |
121
|
|
|
{ |
122
|
|
|
return $this->updated_at; |
123
|
|
|
} |
124
|
|
|
|
125
|
|
|
/** |
126
|
|
|
* @return mixed |
127
|
|
|
*/ |
128
|
|
|
public function getDeleted() |
129
|
|
|
{ |
130
|
|
|
return $this->deleted; |
131
|
|
|
} |
132
|
|
|
} |
133
|
|
|
|